Skip to content

The suggestion is indeed still valid and highly recommended to prevent environment variable leakage. To implement this fix, you should update the subprocess.run call in hermes_cli/tools_config.py at lines 911-916 to include the env parameter using the _sanitize_subprocess_env helper. #701

@badMade

Description

@badMade

The suggestion is indeed still valid and highly recommended to prevent environment variable leakage. To implement this fix, you should update the subprocess.run call in hermes_cli/tools_config.py at lines 911-916 to include the env parameter using the _sanitize_subprocess_env helper.

Here are the steps:

  1. Ensure from tools.environments.local import _sanitize_subprocess_env is present in your imports.
  2. Update the subprocess.run call to pass the sanitized environment dictionary.

Here is the corrected code snippet for lines 911-916:

            result = subprocess.run(
                [_npm_bin, "install", "--silent"],
                capture_output=True,
                text=True,
                cwd=str(PROJECT_ROOT),
                env=_sanitize_subprocess_env(os.environ.copy()),
            )

Originally posted by @gemini-code-assist[bot] in #681 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions