Security Loop — find → fix → re-test → signoff¶
Deterministic flow from a finding to either resolution or explicit acceptance.
Triage rules by severity¶
| Severity | Default action |
|---|---|
| critical | Immediate handoff to coding agent (or human); halt other tests in same run; notify owner within 24 hours. |
| high | Handoff to coding agent in same run; block release until resolved or explicitly accepted. |
| medium | Backlog and schedule fix; do not block unrelated releases. |
| low / info | Backlog; record but no immediate action. |
Fix handoff criteria (to coding agent)¶
A finding is eligible for automated fix handoff only if:
- Severity is
criticalorhigh(or owner explicitly opts in for medium). Confidenceis at leastmedium.- Reproduction steps are present and complete.
- Remediation recommendation is concrete (not "rewrite this module").
- Patch scope fits within the bounded-edit rule (specific files / specific behavior).
- Owner has authorized automated remediation for this repo.
Loop steps¶
- Triage finding per the table above.
- If handoff: invoke
secure-fix-handoff.mdrunbook. - Coding agent applies patch under the standard default-task-loop in a sandboxed branch.
- Re-test in the sandbox using the same
test-plan(and any newly added regression test). - Re-evaluate finding:
- closed — patch verified; mark verified; update
finding-reportverification block. - partial — issue mitigated but residual risk remains; document and either iterate or accept.
- open — go back to step 2 (max iterations below).
- Iteration cap. Default 3 iterations per finding before mandatory human escalation.
- Signoff checklist when loop ends:
- All critical findings closed or explicitly accepted with rationale.
- All high findings closed or explicitly accepted with rationale and time-bound waiver.
- Re-tests green.
- No new findings of equal-or-greater severity introduced by patches.
- Audit events present for every step (SPB-12).
Acceptance with rationale¶
If a finding is accepted (not fixed):
- Owner approves with a written rationale.
- Compensating controls listed.
- Re-evaluation date set (default 90 days).
- Recorded in the finding report and the security audit log.