fix(corpus): --require-consensus, git floor, scoped GIT_SSH_COMMAND (DSE-1528) - #106
Merged
Merged
Conversation
…DSE-1528) CSO re-verify follow-ups on check --against-community: - --require-consensus makes WRD-CONSENSUS-NOVEL / -INSUFFICIENT high + exit 1 so a corpus that withholds an entry cannot turn a MISMATCH into a pass; evidence suppression documented as the residual limit of a git corpus - git resolved to an absolute path once per process; refuse git < 2.14.1 - GIT_SSH_COMMAND forwarded only to the clone of an ssh:// or git@ source - docstring: statement is built from the coordinate that determines the directory - non-injective coordinate -> directory mapping documented as fail-closed - redundant pre-read of each corpus lock removed (stat() enforces the cap)
…nned corpus — CSO review of #106 - L1: -c credential.helper= -c core.askPass= on every git argv (closes the ~/.gitconfig exec vector on https clones); hardened-argv test asserts both - L3: --require-consensus with a local --corpus and no --corpus-ref prints one stderr warning that the tree is unpinned (tested both ways) - CHANGELOG: blank line before ### Fixed
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.
Closes the Low/Info residuals from the CSO re-verification of PR #100 (DSE-1515 phase 1) — DSE-1528.
What changed
NOVELexit 0--require-consensus:WRD-CONSENSUS-NOVEL/-INSUFFICIENTbecomehigh+ exit 1; limitation stated plainly indocs/COMMUNITY_CORPUS.md§2 with--corpus-refpinning as the other half of the controltest_require_consensus_makes_novel_and_insufficient_blocking,test_run_consensus_threads_require_consensus,test_require_consensus_blocks_novel_and_insufficient(CLI, JSONL + SARIFerrorlevel), stray-flag parametrizegit --versionparsed once per process;< 2.14.1→UNREACHABLEbefore any clone;ssh://kepttest_git_version_floor(5 cases),test_unparseable_git_version_is_unreachable,test_missing_git_is_unreachableGIT_SSH_COMMAND/PATHforwardedgitresolved to an absolute path once (shutil.which→resolve());GIT_SSH_COMMANDforwarded only to the clone of anssh:///git@source, never for https, never to checkout/rev-parsetest_git_argv_is_hardened_and_source_is_last(asserts absolute binary + noGIT_SSH_COMMANDon https),test_git_ssh_command_is_forwarded_only_for_ssh_sourcescorpus_verify.pynow says the statement is built from the coordinate that determines the directory@org/namevs@org__name)_check_bounded(stat only) replaces the read-then-discard;read_lockreads oncetest_size_capsAcceptance criteria
--require-consensusimplemented, documented, tested (NOVEL/INSUFFICIENT → exit 1 under the flag)docs/COMMUNITY_CORPUS.md§2 states the evidence-suppression limitation plainlyGIT_SSH_COMMANDforwarded only for ssh sources; env-subset test updatedSecurity review (CSO GREEN) — fold-ins before merge
~/.gitconfigcredential.helper/core.askPassis a program git execs on an https clone-c credential.helper=and-c core.askPass=added to_GIT_CONFIG(every git argv)test_git_argv_is_hardened_and_source_is_lastasserts both--require-consensuswith a local--corpusand no--corpus-refonly half-closes the evidence-suppression gap--corpus-reffixtest_require_consensus_blocks_novel_and_insufficient(warns) +test_require_consensus_unpinned_warning_is_silent_when_ref_is_pinned### Fixedin CHANGELOGBranch was merged with
origin/main(post-#103) before the fold-in. Full suite after fold-in: 1116 passed, 2 skipped, 88.08%;ruff check .clean; corpus tests 105/105.Verification (dse-builder-01, py3.12)
pytest tests/test_corpus.py tests/test_corpus_cli.py: 104 passedCOVERAGE_PROCESS_START): 1105 passed, 2 skipped, 88.10% (floor 80)ruff check .cleanAlso in this PR:
docs/COMMUNITY_CORPUS.md§8 no longer says phase 2 is pending — it links the livemcp-warden-lockscorpus (the text was stale after DSE-1515 phase 2 shipped).🤖 Generated with Claude Code
https://claude.ai/code/session_01Lu4ZLyWWL7TXMGYpNFU5Dc