Commit 107591f
feat(ci): add fail_on_severity so the scan gate can actually fail
`panic-attack assail` has no non-zero exit path of its own — no process::exit,
no ExitCode, no --fail-on anywhere in its 3,132-line src/main.rs. It always
exits 0. Consumers of this reusable therefore ran a scanner whose only value
was the cross-repo report; when the dispatch is skipped (no VERISIMDB_PAT) the
job scans, discards the result, and reports success regardless of findings.
Adds a `fail_on_severity` input (none | low | medium | high | critical) and a
gate step that fails the job when an unsuppressed finding sits at or above the
threshold.
Design notes:
* **Default is 'none'**, so this is a no-op for every existing caller until it
opts in. verisimdb, echidna and ambientops all stay green on merge.
* **Counts only unsuppressed findings.** `suppressed` is set by the repo's own
classification registry and by test-context detection, and is *omitted*
rather than set false — hence `select(.suppressed != true)` rather than
`== false`.
* **An unrecognised threshold aborts.** A typo like 'hgih' must not degrade to
'threshold 0' and pass everything; that silent-pass behaviour is exactly what
this change exists to remove.
* The failure message points at the classification registry, not at this
workflow — suppression belongs next to the evidence and in review, not
buried in CI config.
Verified against a real scan (verisimdb origin/main, 113 findings): critical
-> 0 offending, high -> 1, medium -> 39; the one High was a genuine finding
live only because a classification key had gone stale after a rename. YAML
parses.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent d032185 commit 107591f
1 file changed
Lines changed: 60 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
12 | 24 | | |
13 | 25 | | |
14 | 26 | | |
| |||
41 | 53 | | |
42 | 54 | | |
43 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
44 | 104 | | |
45 | 105 | | |
46 | 106 | | |
| |||
0 commit comments