Repository navigation
Run the Security review on security.harness when it is set - #932
Merged
Merged
Conversation
A Run's, a Spec run's and a Base fix's Security review now runs on the User config's security.harness, with that Harness's own Model and Effort, whatever the command's harness words ask. Every other session keeps the Command's Harness. The Run, or the Pass that dispatches it, checks the security Harness before any work, and child Runs are handed it already checked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…etup comment and ADR-0021 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…a Run An audit-only Security run, or architect --plan-only, failed on a check of a Harness it never used. The Run and the Pass now share one check, and its failure names what chose the review's Harness. The Run test now shows a Repair on the Command's Harness and the Run notification's session models, and a Continuation from the Recovery command reviews on security.harness again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d Codex calls Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
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.
Summary
A Security review now runs on the User config's
security.harnesswhen that is set, with that Harness's own[harness.<name>]Model and Effort. This applies wherever a review runs: in a Run, on a Spec run's Spec PR, and in a Base fix. Every other session keeps the Command's Harness. The command'sharness,modelandeffortwords don't move the review. Withsecurity.harnessblank or missing, nothing changes.How the review's
Choicereaches its session:Where the Harness shows up:
.models.jsonand the Run notification's "Session models" name the Harness it ran on. The Command log addssecurity-review: on claude · … · high, chosen by security.harness in the User config.security.harnessagain.[security]comments, the Harness section, a new Security review paragraph), Setup'ssecurity.harnesscomment and the regenerated site docs are updated. New ADR-0021 says a Command may use more than one Harness, starting with the Security review.Seams under test:
tests/security_review.rs,tests/spec_run.rs,tests/pickup_run.rs,tests/security_run.rs);Asks::of_run's resolution of the review's Harness (src/asks.rs);src/child_run.rs).Evidence
a_runs_security_review_runs_on_the_security_harness_and_its_other_sessions_on_the_commandsfailed. Two Codex calls, the second being the review (assertion left == right failed: [Object {"argv": … "exec" …}, …]).After: it passes. Its Codex calls are the implement session and a CI Repair. The review is the only Claude Code session, with
--model claude-opus-5-5 --effort high..models.jsonsaysclaudeforsecurity-reviewandcodexforimplement. The Run notification listssecurity-review: claude · claude-opus-5-5, and the body saysBuilt with codex.a_spec_runs_security_review_runs_on_the_security_harness_and_its_tickets_on_the_commands);a_base_fix_runs_its_security_review_on_the_security_harness);harness codex effort maxcommand (a_commands_harness_word_does_not_choose_the_security_reviews_harness);harness codex(a_continuation_from_the_recovery_command_runs_its_security_review_on_the_security_harness_again).the Security review's Harness claude, chosen by security.harness in the User config, can't run: ….thirdshift secure harness claudewith[harness.codex] model = "no-such-model"failed withthe Security review's Harness codex … is not in Codex's catalog.After: it passes and makes no Codex check (
an_audit_only_security_run_does_not_check_the_security_review_harness).cargo testgave 2196 passed and 0 failed.cargo clippy --all-targets -- -D warningsandcargo fmt --checkare clean.cd site && npm run docs:checkpasses.Merge Danger
Door: two-way. Only User configs that set
security.harnessand turn on Security reviews behave differently, and reverting restores the old routing.Blast Radius: Security reviews.
security.harnessset and reviews on now also check that Harness before work, and fail before any work if it can't run.Command::Runnow holds aBox<RunArgs>(clippylarge_enum_variant).Unaddressed findings
Standards
All of these are judgement-call smells. None says behaviour is wrong.
src/child_run.rs(theSESSIONS_*andSECURITY_REVIEW_*triples): declined. Every hidden argument there is its own named constant with its ownReader::takearm and repeat check. The new triple follows that pattern rather than adding a second argument style for one use.pass::LaunchAndGitHub.security_review_harnessset only bycheck_harness, andNonein literals: declined. The check settles the Model and Effort on the Harness's names (Choice::check, src/harness.rs), and the dispatched Run must use the settled value. That is why it is stored, as the existingharness: &mut Choicebeside it is. TheNonelines in test literals are the cost of a plain struct field.Sessions::checked_within's sixth parameter, andOnMachine's(Choice, Adapter): declined.Sessionslives below Delivery and knows nothing ofChildAsks. Passing that type down would couple the session module to Run asks.Flags::security_review_harnessbesideFlags::security_harness: declined. Each name says whose Harness it is (the Security review's, the Security run's), as the glossary distinguishes them.OnMachine::run_sessionmatchingpurposetwice: declined. The first match picks which Choice, the second which invocation. Merging them would multiply the arms."guidance mode"as a bare marker,CODEX_WITH_A_CLAUDE_SECURITY_HARNESSnot saying thatreviewis unset): declined."guidance mode"and argvwindows(2)checks follow the existing tests in both files.security-reviewon its command line, where it can be seen.Spec
None. The reviewer's one behaviour finding, a Pass checking the review's Harness when it dispatches nothing, was confirmed with a sharpened version of its test (red before, green after) and fixed. Its three evidence gaps (a Repair on Codex, the Run notification, a Continuation) now have tests.
Security
None. The Security review read the diff and its supporting code (
src/session.rs,src/harness.rs,src/child_run.rs,src/pass.rs,src/skills.rs). It found no trust-boundary violation the change introduced:--security-review-*hidden arguments are accepted only alongside a child Run's--stamp, and carry values from the parent's checked User config;CheckedDirectorypath and git exclude as the first;Review coverage
Neither axis left a changed file unread.
site/docs/index.htmlis generated fromdocs/guide.md. Standards confirmed it as an exclusion (node generate-docs.mjs --checkexits 0, and the changed lines match the guide hunks). Spec read its changed hunks.Closes #910
🤖 Generated with Claude Code
Built with claude · claude-opus-5-5 · medium
Security review outcome
No unaddressed introduced findings.