Skip to content

fix(core): narrow backtest subprocess environment#374

Merged
warren618 merged 1 commit into
mainfrom
codex/harden-backtest-runtime-env
Jul 2, 2026
Merged

fix(core): narrow backtest subprocess environment#374
warren618 merged 1 commit into
mainfrom
codex/harden-backtest-runtime-env

Conversation

@warren618

Copy link
Copy Markdown
Collaborator

Summary

  • narrow generated-backtest subprocess environment inheritance to OS/Python basics, proxy/certificate settings, allowed run-root config, and read-only market-data settings
  • avoid forwarding LLM provider keys, API auth tokens, shell-tool switches, broker trading secrets, and live/advisory toggles into generated strategy code
  • document the generated backtest trust boundary in README and SECURITY

Closes #332

Validation

  • PYTHONPATH=agent pytest agent/tests/test_runner_env.py agent/tests/test_run_card.py agent/tests/test_path_safety.py agent/tests/test_file_tool_sandbox_security.py -q
  • python -m ruff check agent/src/core/runner.py agent/tests/test_runner_env.py
  • python -m compileall -q agent/src/core/runner.py agent/tests/test_runner_env.py
  • git diff --check

@warren618 warren618 merged commit 38de446 into main Jul 2, 2026
1 check passed
@warren618 warren618 deleted the codex/harden-backtest-runtime-env branch July 2, 2026 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document and harden the trust boundary for executing LLM-generated backtest code (subprocess inherits full env + network)

1 participant