Repository navigation
trap(#952): log two gate-3 misreports findings in 60-git-reconcile.sh - #967
Merged
Merged
Conversation
Logged from the v0.42.1 release's gate 3 security audit (round 1): swallowed git diff --name-only errors leaving _checkout_ok set with an empty touched-path list, and core.quotePath leaving non-ASCII restore-set paths unmatched. Both rank misreports (non-blocking); the blocking destroys-class finding from the same audit is filed separately as #966. Co-Authored-By: Claude Sonnet 5 <[email protected]>
fdaviddpt
added a commit
that referenced
this pull request
Oct 7, 2026
…#967) Logged from the v0.42.1 release's gate 3 security audit (round 1): swallowed git diff --name-only errors leaving _checkout_ok set with an empty touched-path list, and core.quotePath leaving non-ASCII restore-set paths unmatched. Both rank misreports (non-blocking); the blocking destroys-class finding from the same audit is filed separately as #966. Co-authored-by: Claude Sonnet 5 <[email protected]>
fdaviddpt
added a commit
that referenced
this pull request
Oct 7, 2026
…ix (#970) * fix(#969): hard-disable 60-git-reconcile.sh pending the real TOCTOU fix `hooks.d/after_save/60-git-reconcile.sh` has produced a destroys-class security finding in five consecutive release audits across two releases (#932, #939, #946, #952's regression, #966), each fix closing one race window and opening the next, narrower one. #969's gate-3 round-2 audit found a further one: a foreign write landing in the window from the start of `git rebase --no-autostash` through the conflict firing -- before #966's own pre/post-`rebase --quit` snapshot is even taken -- is still silently discarded by the scoped conflict restore, while the hook still logs "aborted, the tree is unchanged". Per the scheduler's ruling for v0.42.1: rather than attempt a sixth fix, the hook is hard-disabled. It now exits 0 immediately, printing a one-line notice naming #969, before even reading `git_reconcile.enabled` -- the kill switch does not itself depend on the flag whose read is downstream of the disabled code path. New regression test TestHardDisabledPending969 (in tests/test_git_reconcile_903.py) proves the kill switch itself: against the exact TOCTOU scenario #969 reports as still open (a shimmed `git` that injects a foreign, in-restore-set write at the `rebase --no-autostash` call), confirmed red against the pre-kill-switch hook (same assertions failing because the old hook ran normally and never emitted the #969 notice) and green after. Every other test in that file and in tests/test_git_reconcile_mapfile_floor_952.py that drives the hook's actual reconcile/conflict/restore/NDC-bump behavior is now class- or test-level skipped with a reason naming #969, kept as documentation of intended behavior for when the real fix lands and the kill switch is removed -- rather than left to fail, or silently passing for the wrong reason (nothing touches the tree because the hook never runs, not because the behavior under test is correct). docs/configuration.md's `git_reconcile.enabled` row now discloses the hard-disable up front. changelog.d/969.fixed.md names the user-visible change: anyone with git_reconcile.enabled=true sees no more automatic reconcile until #969's real fix ships. Co-Authored-By: Claude Sonnet 5 <[email protected]> * fix(#969): self-review follow-up: route kill-switch notice through report_error() oss:auditor self-review on the kill switch itself (Class A, absence the caller cannot read): the notice was a bare `echo ... >&2`, not routed through `report_error()` like every other notice in this hook file. `log()`/`report_error()` write by path to the daily log and hook-errors.log specifically so a hook's own disablement is never invisible to `/remember:doctor`'s "Recent errors" -- a hook that was silently skipped (#252) is the exact failure mode `report_error()` exists to close, and a raw echo reproduced it for this hook's own hard-disable. Switched to `report_error()`, and TestHardDisabledPending969 now asserts the notice reaches both the daily log and hook-errors.log instead of asserting on captured stderr, which the production dispatch path never routes anywhere persistent. Explore's self-review also found that hooks.d/after_save/50-git-backup.sh and scripts/user-prompt-hook.sh still describe the OLD "git_reconcile may act automatically" behavior -- now false while the kill switch is in place. Not fixed here: 50-git-backup.sh's wording is pinned by tests/test_git_backup_push_rejected_253.py::TestTheRejectionNoticeRespectsReconcile (#935), and correcting it needs that test class rewritten too -- a second file's protected test contract, past this diff's blast radius. Logged to trap.d/969.stale-reconcile-prose-not-updated.md for /oss:curate. Co-Authored-By: Claude Sonnet 5 <[email protected]> * trap(#952): log two gate-3 misreports findings in 60-git-reconcile.sh (#967) Logged from the v0.42.1 release's gate 3 security audit (round 1): swallowed git diff --name-only errors leaving _checkout_ok set with an empty touched-path list, and core.quotePath leaving non-ASCII restore-set paths unmatched. Both rank misreports (non-blocking); the blocking destroys-class finding from the same audit is filed separately as #966. Co-authored-by: Claude Sonnet 5 <[email protected]> --------- Co-authored-by: Claude Sonnet 5 <[email protected]>
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.
Two non-blocking (
misreports) findings from the v0.42.1 release's gate 3 security audit (round 1, rangev0.42.0..HEAD): swallowedgit diff --name-onlyerrors leaving_checkout_okset with an empty touched-path list, andcore.quotePathleaving non-ASCII restore-set paths unmatched inhooks.d/after_save/60-git-reconcile.sh. Logged astrap.d/fragments per the ranking table rather than filed as issues; the blockingdestroys-class finding from the same audit is filed separately as #966.Part-of-#952 (release gate 3 audit). No code changed -- prose fragments only.
🤖 Generated with Claude Code
[AI-generated]