Repository navigation
Description
Found during release gate-3 audit (v0.34.1..HEAD, commit 1a3dd7b)
Class B finding (guard bypassed by a later commit; a join between two PRs), ranked
against the release ranking table as discloses. Blocking, per the release
audit's ranking table.
What changed
#724 built _codex_child_env() on the premise that Codex's --sandbox read-only
"still runs whatever commands the model issues", and that the allow-list plus an
empty cwd is "what actually bounds the blast radius" -- no credential was meant
to pass through (see the function's own docstring, still present at line 1176).
#751 (8bd5b7e, in this release's delta) adds CODEX_API_KEY, HTTPS_PROXY,
HTTP_PROXY, NO_PROXY, SSL_CERT_FILE and NODE_EXTRA_CA_CERTS to that
allow-list. #792 then makes the match case-insensitive, so https_proxy (which
can carry user:pass@) passes too. tests/test_summarizer_sandbox_724.py:162-167
asserts the API key is present in the child environment.
Why it matters
The summarizer's input is the session transcript, which contains third-party
text (see pipeline/haiku.py:1122-1131, 1176-1183, 1192-1199). Its output goes
into the memory store, which is later injected into future sessions and pushed
off the machine by the git-backup hook (hooks.d/after_save/50-git-backup.sh).
Reasoned, not observed: text inside a transcript could steer the Codex model
into running a command like env, whose output (the Codex API key, or a proxy
URL embedding credentials) then lands in a memory file that leaves the machine
via git-backup.
The fact that would settle it
Whether codex-cli (0.153.2 installed here), run with --ignore-user-config,
strips *KEY*-shaped variable names from the environment the model's shell
commands can see. If so, that covers CODEX_API_KEY -- it cannot cover the
proxy variables regardless, since their names contain no KEY/TOKEN/SECRET.
Not run: this needs a live model call and a real credential.
A candidate fix
Pass an explicit -c shell_environment_policy... on the argv built in
_build_codex_cmd, so the model's own shell does not inherit these variables
while the Codex process itself still does.
Provenance
Filed from the release-auditor's gate-3 report (dispatch token
RELTOK-9f31c7-r1, round 1) during the v0.35.0 release attempt for
Digital-Process-Tools/claude-remember. This finding stops the tag under
commands/release.md gate 3 until it is fixed or disproved.
[AI-generated]
Activity
fix(#798): stop the nested Codex sandbox from handing model-run comma…
fix(#898): the summarizer inherits the messaging handshake; Codex get…
test(#898): pin round 18 -- handshake inherited, no proxy/CA vars for…
fix(#898): release tree scrub + 5 new guards (typed-heredoc shipped a…
fix(#900): compile hooks.json-registered hooks self-contained at buil…