Repository navigation
Close a Security finding its merged fix fixed, when allowed (#1073) - #1175
Merged
Merged
Conversation
A multi-line left-open reason carrying the close marker flipped an open finding to closed, hiding it from triage; a pull request URL spanning lines was recorded verbatim. Flatten reasons to one line and refuse invalid pull request URLs. Regression test retained.
# Conflicts: # docs/guide.md # site/docs/index.html # src/command.rs # src/main.rs # src/notification.rs # src/run_ending.rs # src/security.rs # tests/setup.rs
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 run with closing allowed now closes the finding its fix merged, after re-running the proof-of-concept test against the merged Base branch:
New words
security-close/no-security-close(accepted whereversecurity-fixis) and[security] close(default false; Setup offers it only when fixing is on). Closing takes effect only when fixing is also allowed; a fix left ready for review closes nothing; a failed close never changes the fix's outcome.Seams
[security] closeprecedence (args, asks, config, setup tests).Evidence
After:
cargo test --test security_run closing- 4 passed (advisory close, issue close, failing gate, setting/word precedence); full gatescripts/affected-tests maingreen, includingcargo clippy --all-targets -- -D warnings, fmt, site docs:check and browser tests.Merge Danger
Door: two-way. Closing is off by default and inert without fixing, so reverting restores report-only behavior. A wrongly closed finding is API state (advisory state, issue state) recoverable by reopening.
Blast radius: Security runs with closing enabled. Default-off paths behave exactly as before; the new session kind and stage names flow through existing readers.
Review findings
with_left_open_note()now refuses an already closed record (a 'Closed by' line claims the finding is closed, so no later write appends to one), mirroringwith_close(); regression testleft_open_note_refuses_an_already_closed_recordretained. No unaddressed findings; no needs-triage issue.github::advisories::tests::close_inputs_cannot_forge_a_closed_record(the PoC failed before the fix: a multi-line left-open reason carrying the close marker flipped an open finding to closed, hiding it from triage, and a multi-line pull request URL was recorded verbatim; reasons are now flattened to one line and invalid URLs refused). Unaddressed findings: none.The review left no changed file unread.
Closes #1073
Built with muse · default model · default effort
Unaddressed findings
Security review outcome
No unaddressed introduced findings.