Commit f15ced3
fix(ci): Hypatia reusable gate uploads findings instead of failing opaquely (#424)
## Make the Hypatia reusable gate **visible**, not opaque
The `Run Hypatia scan` step runs `hypatia-cli.sh scan` under the default
`bash -eo pipefail`. `hypatia-cli` **exits 1 whenever findings exist**
(documented behaviour), so the step aborts at the scan line *before* the
`jq` counts / `$GITHUB_OUTPUT` / step-summary run — and because
**`Upload findings artifacts` had no `if:`**, it's skipped on that
failure. Result: a red ❌ with **zero visible findings**.
### Changes (minimal, licence-neutral)
1. **scan** — add `--exit-zero` (the CLI flag built exactly for "CI
gates on the counts"), so the step succeeds and the severity counts /
outputs / step-summary populate. Gating is already done on the counts
(the `Check for critical issues` step warns-don't-fail / fix-forward),
not on the scanner's exit code.
2. **upload** — `if: always()` so findings upload even when an earlier
step (build / scan) fails.
No behaviour change for clean repos; failing repos now surface findings
as an **artifact + step summary** instead of an opaque red X.
> Does **not** touch the file's SPDX header (left as-is per the
no-automated-licence-edits guardrail).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 5e29ef7 commit f15ced3
1 file changed
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
55 | 59 | | |
56 | 60 | | |
57 | 61 | | |
| |||
83 | 87 | | |
84 | 88 | | |
85 | 89 | | |
| 90 | + | |
86 | 91 | | |
87 | 92 | | |
88 | 93 | | |
| |||
0 commit comments