Repository navigation
Fail a Security run before any session when Issues are off - #2133
Merged
Merged
Conversation
A Security run now reads the repository's has_issues after its skip gates and before its Harness check. With Issues off it fails at once, naming the repository and saying to turn on Issues or remove the Security schedule; its Run notification gives Cause: Issues turned off. Closes #2096
Address review findings: a private repository's advisory-404 fallback already reads the repository, so its has_issues answer is kept and the Security run reads the repository only once. Share the repository read, keep the InMemory fake's flag positive, and mention the check on every site page that lists the Security run's gates.
#2094 (on main) and #2096 (this branch) both handle a repository with Issues turned off, in incompatible ways: #2094 lets a Security run audit and skip fixing; #2096 fails the run before any session so no audit is paid for. This branch implements #2096, so its fail-fast gate wins: - run_through keeps #2096's check after the skip gates and drops #2094's fixing_skipped path, which that check makes unreachable, along with the Ended::fixing_skipped field and its Run notification text. - One repository read: Outside::has_issues and GitHub::has_issues (from #2094) replace this branch's issues_enabled duplicates, reading through the shared GitHub::repository helper; the private fallback's answer is still reused. - #2094's guards in the fix-findings and security-audit Process Steps stay: Custom processes do not pass through the Security run's gate. - Tests asserting a Security run audits with Issues off are removed; the malformed-metadata tests stay, with the new call order. The fake gh keeps main's has_issues passthrough. - ADR 0015, docs/guide.md and site/index.html now say a Security run fails with Issues off; the manual is regenerated.
Owner
Author
|
Delivery completed on agent-authored or reviewed head eb1b94e. |
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 now reads whether the repository has Issues turned on before its first session. With Issues off, it fails at once with no model spend.
security::run_through ready_issue # skip gate security_records # private fallback reads repos/{slug}, now keeps has_issues failed_fix / next_fix # skip gate base_unchanged_since_security_audit # skip gate + records.issues_enabled() # reuse the fallback's has_issues + else outside.issues_enabled() # GET repos/{slug} → has_issues + if Issues off → fail: "<owner>/<repo> has Issues turned off; + turn on Issues for <owner>/<repo> or remove its Security schedule" processes::security::run # Harness check, Node check, audit, ...repos/{slug}read. On a private repository's advisory-404 fallback, the existing read'shas_issuesis reused, so there is no second request.Result: pre-audit failed,Audit: not startedand the fixedCause: Issues turned off.GLOSSARY.mdSecurity run,docs/guide.md(manual regenerated), and the gates paragraph onsite/index.html,site/how-it-works/andsite/architecture/.Closes #2096
Evidence
Execution evidence
This host has no C compiler (
which cc gcc clangfinds none), andring/aws-lc-sysneed one in their build scripts. Socargo testcannot build here (error: linker 'cc' not found), and I could not record a local failing Before run of the new tests. CI on this PR (run 43268667219, head 652ab63) is the After evidence. All fourrust-x86shards passed:The first attempt of shard 2 failed on
accounts::password_codes::email_code_creates_and_resets_an_account_without_revealing_the_allowlist(no code reached Resendafter its 10-second wait). That Console test is untouched by this change. Its re-run passed, as didconsole-testandsite-test.These tests ran in that suite:
cargo test --test security_run a_repository_with_issues_off_fails_before_any_session_and_says_so: a fake-GitHub scenario withhas_issues: false, run with fixing both off and on. Expects exit 1, the stderr reason, no Claude or Codex calls, noissue create, andCause: Issues turned off.cargo test --test security_run a_repository_with_issues_on_audits_as_before:has_issues: trueaudits as before.cargo test --test security_run a_private_fallback_reads_the_repository_once_before_failing_on_issues_off: from review finding P1; readsrepos/acme/widgetsonce.cargo test --bin thirdshift security::tests: the gate comes after the skip gates and before the Harness check; existing call sequences gainIssuesCheck.Run locally:
cargo fmt --check: clean.npm run docs --prefix sitethennpm run docs:check --prefix site: exit 0.npm test --prefix site: 7 pass and 61 fail. Every failure is Playwright's "Executable doesn't exist" (no Chromium on this host); the docs check inside it passed.Visual evidence
Only prose changed on the site pages, and no headless browser is installed on this host (Playwright's Chromium is missing), so there are no captures.
Merge Danger
Door: two-way
Blast Radius: narrow
repos/{slug}).Review
GitHub::repositoryread), S4 (the fake's flag is now positive), S6 (the unit test no longer repeats the message assertion).Changed files the review left unread as changes: the review ran on 77a5594. The follow-up commit 652ab63 changed
src/github/advisories.rs,site/index.htmlandsite/architecture/index.html. Reviewers read those files only in their pre-change state.site/docs/index.htmlis generated output: its exclusion was accepted afternpm run docs:check --prefix sitepassed, and its two changed paragraphs were inspected.Unaddressed findings
Standards
src/run_ending.rs:180-183): declined..or_elseto the chain.crate::launch::base_branch_cause), and three causes do not warrant a registry. Building one now would be the Speculative Generality the baseline warns against.tests/security_run.rsa_repository_with_issues_on_audits_as_before): declined.has_issuesto true, so the test adds little.has_issues: true, behavior is unchanged". This test setshas_issues: trueexplicitly, so the fake's response field is exercised as GitHub sends it rather than through a default.Spec
None.
Built with claude 2.1.322 · claude-opus-5-5 · high
Security review outcome