You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] global audit scans unmanaged Codex session history for hidden Unicode #3036
APM 0.31.0's global audit scans Codex session history under ~/.codex/sessions/ as deployed content. A literal U+202E RIGHT-TO-LEFT OVERRIDE in an unmanaged session file causes apm audit --ci to fail its content-integrity check and recommend apm audit --strip.
This reproduces with an empty global dependency list. APM did not install or record ownership of the session file.
Create ~/.codex/sessions/unmanaged.jsonl with a JSON string containing a literal U+202E character. For example, this Python expression produces the file contents (the character must be literal, not a JSON escape):
Run apm lock -g, then run apm audit --ci --no-policy --no-drift from ~/.apm in that same test home.
Observe exit code 1 and the content-integrity finding below.
Expected behavior
Audit excludes unrelated Codex application state such as session history. Hidden-Unicode scanning should still cover deployable primitive locations, including unrecorded files in those locations, and explicit deployment claims.
Environment (please complete the following information):
OS: macOS
Python Version: 3.14.7
APM Version: 0.31.0 (Homebrew); also reproduced with current main
Logs
content-integrity: 1 file(s) with critical hidden Unicode
-- run 'apm audit --strip' to clean Unicode
content-integrity details:
- unicode: .codex/sessions/unmanaged.jsonl
[x] 1 of 8 check(s) failed
Additional context
The Codex target declares .codex as its root. install_governance includes the whole root prefix, and the audit scanner recursively scans that prefix. This brings session history into the scan despite it being outside the target's primitive locations.
Closing as a duplicate of #2961, which covers the same over-broad target-root scan of unmanaged Codex/Claude session history and already has a proposed fix in #2962.
Activity
BrierAinz commentedon Sep 20, 2026
A useful boundary here may be: audit should follow deployable primitive roots, not the client application's whole state root.
For the Codex target, I would make the regression matrix distinguish these cases:
.codex/sessions/, caches, logs, or history when the package did not deploy there;apm audit --stripfrom rewriting unrelated app state, because that would be surprising even when the hidden-Unicode finding is technically real;That keeps the hidden-Unicode guard useful for shipped instructions/skills/hooks while avoiding a false ownership claim over Codex's runtime history.
DaveMeadAdjust commentedon Sep 20, 2026
Closing as a duplicate of #2961, which covers the same over-broad target-root scan of unmanaged Codex/Claude session history and already has a proposed fix in #2962.