Repository navigation
S6: retain secret denials across diagnostic exemptions - #960
Closed
seathatflowsinourveins wants to merge 3 commits into
Closed
seathatflowsinourveins wants to merge 3 commits into
seathatflowsinourveins wants to merge 3 commits into
Conversation
5 of 6 tasks
Collaborator
Author
|
Closing on the converged evidence (CC, 2026-10-10): three review rounds found 13 secret-read bypasses in the relaxed guard rules (9 verified as regressions at b97522c), against three minor false positives that already have workarounds. Main's guard stays as it is. Record: the CC owner brief of 2026-10-10 09:45 ET (research-cc-role-20261008/owner-brief-20261010-0945ET.md). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scope
This PR corrects secret-guard diagnostic false positives while retaining the existing denials. jq's recognized FILTER can mention the input member
.env, but the exemption retains refusal when that program executesenv/$ENV. Actual input files, file-taking options and redirections still use the original dotenv/store checks. Standalone single-TMPDIR and exact clearing-only env diagnostics are admitted; xargs provenance is copied through both shell/eval readings so replacement or appended operands cannot use those exceptions. Both after-source predicates conservatively refuse printenv after a credential file is sourced.a30c2188e4423f05a7448e5f7a3bcfd858e0f5b8(main when this slice began).lane:shared; both client lanes use the guard, and existing shared file evidence is updated. Other-lane acknowledgement remains a landing gate.scripts/hooks/secret_path_guard.py,tests/test_secret_path_guard.py,adoption/hooks/claude/SHA256SUMS,docs/decisions/2026-10-08-guard-hook-fails-closed.md, and four existing hash/length rows inmanifests/evidence.json.b97522c8c701e1035a1ef32e316438903def7d0c, exactly one forward commit after6a9d9f20; tested treef9c1f9fb38f148e82c7d31ff331a6d7a0bd5855b. Guard anchors: recursive current expansion at:1618/:1686, jq lexical/exemption checks at:1958/:2015, after-source checks at:2115/:2539, prior recursion at:2422.a30c2188e4423f05a7448e5f7a3bcfd858e0f5b8with their verified original line ranges. No heredoc body is exempted and no host hook is deployed by this PR.SOTA sources
/usr/share/man/man1/xargs.1.gz:16-25and:136-145: xargs appends stdin items after initial arguments, while-Ireplaces occurrences anywhere in the initial arguments, including a shell's program string. The guard copies recognized xargs provenance through current and prior shell/eval recursion and current substitution readings, then retains the ordinary diagnostic refusal. Independent outer command segments receive separate state./usr/share/man/man1/jq.1.gz:2235-2239, defines$ENVas the starting environment andenvas the current environment. jqlang/jqjq-1.8.1,src/lexer.l:41-46,99-133distinguishes comments, strings/interpolation, identifiers, FIELD tokens and bindings. The budgeted lexical check examines executable regions, including interpolation; ordinary.envmembers, literal strings and object keys stay distinct.jq-1.8.1,src/main.c:jq [options] <jq filter> [file...]and its file-option branches distinguish FILTER from filenames. Only the recognized filter's original argument position is removed from the dotenv read; unknown option shapes retain the conservative reading. There is no JSON-filename exception./usr/share/man/man1/bash.1.gz:5917-5923and:9016-9020: prefix assignments form the child command's environment andsourceexecutes in the current shell. A TMPDIR operand cannot establish a non-secret value after a credential source; both after-source predicates retain their original conservative printenv refusal independently of the standalone exception.0.10.0,printenv.rsand env.rs define per-name printenv output and removal of inherited variables for exact clearing-only env. Input redirections, commands/assignments, xargs-controlled diagnostics and after-source printenv receive no standalone exception.10.1.0, README, Supported file formats lists.env.jsonas environment key/value JSON. Those filenames continue to match the guard's unchanged dotenv matcher.Evidence-class table
guard.checkand JSON-hook denial assertions before its repair (18 failures). Exact reviewed-source replay confirms nine old allows per interface and nine final denials per interface. No payload command was executed..envmember, literal/string/object-key and standalone TMPDIR tests; 20 revised S6 methods pass.CI=true python3 -B -m unittest tests.test_secret_path_guard tests.test_install_claude_profile: 226 tests, four existing skips, rc 0. Installer tests use temporary homes.python3 scripts/validate.py: rc 0, 11,331 hashes, 70 components, four profiles, 239 receipts; current tooling-derived hashes/byte lengths.a30c2188e4423f05a7448e5f7a3bcfd858e0f5b8..HEAD: three commits, no leaks, rc 0; no full-history scan.Local commands run
The exact reviewed
6a9d9f20source was loaded from Git into an in-memory classifier and ephemeral JSON-hook snapshot: all nine reported texts allowed through both interfaces there, then denied through both final interfaces. The snapshot was removed. Command strings remained data throughout; no credential/environment payload was created or executed.CI=trueuses existing skip rules while deployment awaits review: host-copy equality, two scratch mutation adapters without their driver, and the installer context-mode test requiring its configured security module. No new skip was added. Main's pre-existing bare jq environment/indirect-expansion/uninventoried-name gaps remain the separately directed follow-up; the lexical rejection preserves refusals that the filter exemption would otherwise remove.Decision record
~/.local/state/native-agent-stack/research/harness-rules-20261010/S6-GPT-MICRO-FIX2-20261010.mdrecords primary-source verification, all nine failing-first cases, corrected scope/provenance, tooling-derived evidence rows, final gates and ONE exact-leased forward repair. Any subsequent demonstrated credential exposure requires another source-backed regression before its correction.Host evidence
No host default or live guard is changed. Hook rollout remains CC-owned after the required exact-head reads and landing.
Checklist