mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-22 00:31:44 +00:00
The version-resolver step echoes the resolved CLAUDE_CODE_VERSION into $BASH_ENV unquoted; CircleCI sources $BASH_ENV at the start of every subsequent step *before* any env -i wrapper can run, so the job env (with provider credentials in scope) is live at that moment. A malicious PR could make the resolver — which lives under tests/claude_code/ and is therefore PR-controlled — print a value containing a newline + shell snippet to exfiltrate ANTHROPIC_API_KEY / AWS_* / VERTEXAI_* / AZURE_FOUNDRY_* / GITHUB_TOKEN. Two defenses: - Reject anything that isn't a strict `N.N.N` semver via `[[ ... =~ ^N.N.N$ ]]` (whole-string match, not per-line grep). - shell-quote on write via `printf 'export ...=%q\n'` so a bypass of the regex still cannot break out of the export assignment. Pin both with a structural unit test alongside the existing scrub pins. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| test_bash_tool_restrictions.py | ||
| test_circleci_pr_gate_wiring.py | ||
| test_pr_gate_version_resolver.py | ||