Commit f4a1e56
ci(hypatia-scan): emit + upload SARIF so scans reconcile code-scanning alerts
The reusable scan produced hypatia-findings.json as an *artifact* only and
declared `security-events: read`, so it could neither create nor CLOSE
code-scanning alerts. Alerts uploaded by an earlier SARIF path (tool "Hypatia",
category "hypatia") were therefore orphaned: once the underlying code was fixed,
the fix never propagated to the Security tab and the alerts lingered as stale
"open" findings (observed on metadatastician/gossamer — ~40 of 108 open alerts
were already fixed in code but could not auto-close).
This restores the designed behaviour that lib/hypatia/sarif.ex documents:
- run the scan a second time with HYPATIA_FORMAT=sarif -> hypatia.sarif
- upload it via github/codeql-action/upload-sarif with category "hypatia"
- grant security-events: write
SARIF render already filters the code_scanning_alerts meta-rules
(lib/hypatia/sarif.ex @meta_rule_modules), so re-uploading cannot self-echo
(the 7,724-alert loop the render-time filter was added to close). The upload
step is `continue-on-error: true`, so callers that still grant only
security-events: read are unaffected — and because every caller SHA-pins this
reusable, the change is opt-in: it takes effect for a repo only when that repo
bumps its pin AND grants write.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 6a1bf01 commit f4a1e56
1 file changed
Lines changed: 17 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
97 | 105 | | |
98 | 106 | | |
99 | 107 | | |
| |||
113 | 121 | | |
114 | 122 | | |
115 | 123 | | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
116 | 132 | | |
117 | 133 | | |
118 | 134 | | |
| |||
0 commit comments