Skip to content

Add report-only Security runs - #558

Merged
JacobStephens2 merged 5 commits into
issue-427from
issue-538
Oct 8, 2026
Merged

JacobStephens2 merged 5 commits into
issue-427from
issue-538

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

Summary

thirdshift secure audits origin's Base branch and records validated Security findings as private draft advisories. It leaves the Launch directory untouched and deduplicates fingerprints across every advisory state.

secure [base <branch>]
  Pass lock + Ready issue gates
  Harness + Node.js checks
  detached Security audit → embedded report validators
  fingerprint lookup → private draft advisory
  Command + Activity logs

Closes #538

Testing seams

  • End-to-end Scenario: real binary and git, fake gh and agent CLIs, real Node.js validators.
  • Existing Pass double: gate order, prerequisites and audit/record decisions.
  • Generated Prompts page: generated artifacts match the prompt module.

Evidence

  • Before: cargo test --test security_run audits_origins_base_without_changing_the_launch_directory -- --exact failed with not a GitHub issue URL: secure (exit 2).
    After: the same test passes, auditing origin's head while preserving local edits and commits.
  • Before: the Spec review's exact cargo test --test security_run security_advisories_preserve_python_and_go_manifest_identity -- --exact --nocapture failed: other/null replaced the Python manifest's package identity.
    After: the same test passes for Python and Go; both fixtures and the regression are retained.
  • Before: the Spec review's exact cargo test --test security_run security_audit_names_the_threat_model_under_docs -- --exact --nocapture failed because the Session prompt omitted docs/THREAT-MODEL.md.
    After: the same test passes; the regression is retained.
  • Final checks: cargo test passes (1521 passed, 1 ignored), including all 13 Security run scenarios; cargo fmt --check, cargo clippy --all-targets -- -D warnings, and git diff --check pass. The prompt generator check (UPDATE_PROMPTS=1 cargo test prompts_page) passed.

Unaddressed findings

Standards

  • Finding 2, Possible Speculative Generality: unused advisory PATCH support. Declined. Issue #538's acceptance criteria explicitly require the fake gh to support advisory creation, listing in every state, and update. The PATCH implementation and routing satisfy that explicit requirement. This is resolved by the Spec and requires no Day shift decision. The shared Pass naming finding was addressed with PassArgs and About::SecurityRun.

Spec

None. Both findings were reproduced as written, fixed, and retained as regression tests.

Review coverage

Separate Standards and Spec reviews used issue-427 pinned at cc7e3be78c2fb6d91e4799d28f46b77b1747eb58. Each final files-read list covers all 29 changed files, including generated artifacts. Changed files left unread: none for either axis. Reports and dispositions are saved in .thirdshift-review-0X6fAX/standards.md and .thirdshift-review-0X6fAX/spec.md in the implementation workspace.

Merge Danger

Door: two-way

The command can be reverted; private draft advisories and local audit artifacts already created persist for the Day shift. Notification delivery, private-repository fallback, reproduction and fixing remain separate tickets.

Blast Radius: Security

The new command uses the shared Pass lock and existing Harness/session infrastructure. It creates private drafts; it never publishes or closes advisories.

CI notes

  • Inherited macOS timing failure: interrupting_a_live_session_after_cli_exit_stops_the_command_holding_stdout exceeds its existing two-second interruption/cleanup limit on both issue-538 and issue-427 at bdeac1e; the test and stop path are unchanged, and the exact test passes locally, so no code or checks were changed.

Built with codex · gpt-6.1-sol · xhigh

On case-insensitive macOS filesystems, the lowercase candidate resolves to
the tracked docs/THREAT-MODEL.md file, so discovery named the wrong spelling
in the Session prompt. Require an exact match in the audited checkout's
tracked paths before selecting an existing document.

Keep the end-to-end regression unchanged. It failed with the CI symptom in
a local replay of case-insensitive lookup and passes with this fix.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant