Skip to content

Report Base branch causes in Security pre-audit failures - #1168

Merged
JacobStephens2 merged 5 commits into
mainfrom
issue-1055
Oct 23, 2026
Merged

JacobStephens2 merged 5 commits into
mainfrom
issue-1055

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner

Summary

 Security run pre-audit failure
-  Base branch errors → pre-audit checks failed
+  typed Base branch errors → fixed Base branch Cause
   GitHub errors → existing fixed GitHub Cause
   other errors → pre-audit checks failed

Closes #1055

Evidence

Seams under test: the thirdshift secure CLI's exit status, session startup, stderr and Run notification sent through fake Resend; the existing Launch directory tests protect CLI stderr wording.

  • Before: cargo test --test security_run missing_base_branch_reports_a_safe_pre_audit_cause failed with Cause: pre-audit checks failed; the new other-Base-branch scenario failed with the same Cause for an unpushed local branch.
    After: cargo test --test security_run pre_audit passes all seven scenarios, covering missing/unpushed/detached/ahead Base branches, unchanged GitHub dependency/rate-limit Causes, no audit startup, exactly one notification, private diagnostic exclusion and the generic fallback.
  • cargo test --bin thirdshift launch::tests: 20 passed, including unchanged stderr wording and safely quoted push advice.
  • cargo fmt --check and cargo clippy --all-targets -- -D warnings: passed after the follow-up test cleanup.
  • /usr/bin/time -p scripts/affected-tests main: passed, including docs regeneration verification, all 49 site tests and the full Rust suite: 2,378 passed, 55 skipped. Selector wall time: 1,467.53s, including site checks and 56.94s Rust compilation; nextest test execution: 1,339.187s. Timing includes compilation and reflects this host's load.

Review

  • Standards: one P3 duplicated-test-assertion finding, addressed with assert_base_branch_pre_audit_cause and confirmed by the reviewer. The seven pre-audit scenarios pass after the cleanup.
  • Spec: no findings, including the follow-up test cleanup.
  • Both reviewers read all six changed files, including generated site/docs/index.html. No unread changed files or generated-output exclusions.

Merge Danger

Door: two-way

Blast Radius: notifications

Base branch validation keeps its CLI diagnostics; only Security runs' pre-audit notifications gain the fixed categories. No migration or configuration changes.

Unaddressed findings

Standards

None.

Spec

None.

Security

None. Guidance-mode review of the Base-branch Cause change found no introduced vulnerability: the notification Cause is a fixed &'static str per error type (no branch name or raw diagnostics reach Resend; asserted absent from the email body by the seven passing pre_audit scenarios), git runs via Command::new("git").args(...) with no shell, and unclassified errors fall back to the generic Cause. Verified with cargo test --test security_run pre_audit (7 passed) and cargo test --bin thirdshift launch::tests (20 passed).

Built with codex · gpt-6.1-sol · xhigh

Security review outcome

No unaddressed introduced findings.

@JacobStephens2
JacobStephens2 merged commit f99fc75 into main Oct 23, 2026
18 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-1055 branch October 23, 2026 17:49
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.

Name a missing Base branch as the Cause of a Security run's pre-audit failure

1 participant