Commit a2c5584
fix(ci): resolve 27 hypatia workflow-hygiene findings (#254)
## Summary
Triggered by the hypatia scan comment on [PR
#249](#249 (comment))
— 98 findings flagged. This PR resolves 27 of them at root cause;
another ~9 \`CSA001\` mirrors will clear automatically when the source
findings clear.
## Findings resolved
| Count | Severity | Type | Fix |
|---|---|---|---|
| 1 | medium | \`unpinned_action\` | \`governance.yml\` \`@main\` → SHA
pin matching estate convention |
| 23 | medium | \`missing_timeout_minutes\` | Every job +
reusable-workflow caller gets explicit \`timeout-minutes\` (10–60 min,
scaled to job nature) |
| 1 | medium | \`codeql_missing_actions_language\` | Drop
\`javascript-typescript\` (not in repo), add \`actions\` to matrix |
| 1 | medium | \`StaticAnalysis\` | Same as above (different
presentation) |
| **1** | **high** | \`scorecard_publish_with_run_step\` | Split
\`scorecard-enforcer.yml\` into action-only \`scorecard\` job +
downstream \`score-gate\` job consuming SARIF via artifact |
| **1** | **high** | \`secret_action_without_presence_gate\` | Gate
\`instant-sync.yml\`'s \`FARM_DISPATCH_TOKEN\` with \`env.HAS_TOKEN\`
check; add skip-notice step for token-absent path |
## Out of scope (separate work)
| Count | Severity | Type | Why deferred |
|---|---|---|---|
| 6 | **critical** | \`SD004\` | Hypatia rule bug — enforcing retired
\`.machine_readable/6a2/\` subdir layout. Per standards CLAUDE.md,
canonical location IS \`.machine_readable/\` directly. File hypatia
issue. |
| 29 | medium | \`expect_in_hot_path\` | Rust \`.expect()\` calls across
\`bots/*\`. Needs per-bot review + migration to \`?\` /
\`unwrap_or_else\`. Separate code work. |
| 1 | medium | \`GS007\` | 3 stale non-main remote branches. Cleanup
separately. |
| 33+1 | medium | \`CSA001\`/\`CSA002\` | Code-scanning-API mirrors of
other findings. Resolve automatically when sources resolve. |
## Key design notes
### Scorecard split
Hypatia's \`scorecard_publish_with_run_step\` rule flags any \`run:\`
step in a workflow job using \`ossf/scorecard-action\` with
\`publish_results: true\`. The OpenSSF publish protocol expects the
action to be the only thing in the job. Restructured:
```yaml
scorecard: # action-only: checkout → run scorecard → upload SARIF → upload artifact
score-gate: # needs: scorecard. Pulls artifact, runs score check via run-step
check-critical: # existing, unchanged
```
### Secret presence gate
The canonical \`if: env.HAS_TOKEN == 'true'\` pattern guards the
dispatch step. Adds explicit skip-notice for forks / PRs from forks
where the token is absent — better UX than opaque 401s.
### Reusable-workflow callers
GitHub allows \`timeout-minutes\` on \`uses:\` caller jobs (caps total
reusable execution time). Used on the 5 reusable wrappers: governance /
hypatia-scan / mirror / scorecard / secret-scanner.
## Test plan
- [ ] Hypatia scan on this PR drops from 98 → ~38 findings (no
critical/high in workflow surface).
- [ ] All workflows still run cleanly (timeout caps are generous — 30+
min for any non-trivial scan).
- [ ] \`scorecard-enforcer.yml\` still produces a score-gate failure on
regression (verified by reading; will need CI run to confirm).
## Related
- #249 — the actuation PR whose scan comment surfaced these findings.
- hyperpolymath/hypatia — SD004 rule needs fixing separately (will
file).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: hyperpolymath <hyperpolymath@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent bcbe886 commit a2c5584
16 files changed
Lines changed: 69 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
110 | 111 | | |
111 | 112 | | |
112 | 113 | | |
| 114 | + | |
113 | 115 | | |
114 | 116 | | |
115 | 117 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
33 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
34 | 38 | | |
35 | 39 | | |
36 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| 70 | + | |
69 | 71 | | |
70 | 72 | | |
71 | 73 | | |
| |||
115 | 117 | | |
116 | 118 | | |
117 | 119 | | |
| 120 | + | |
118 | 121 | | |
119 | 122 | | |
120 | 123 | | |
| |||
179 | 182 | | |
180 | 183 | | |
181 | 184 | | |
| 185 | + | |
182 | 186 | | |
183 | 187 | | |
184 | 188 | | |
| |||
239 | 243 | | |
240 | 244 | | |
241 | 245 | | |
| 246 | + | |
242 | 247 | | |
243 | 248 | | |
244 | 249 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
| 35 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
17 | 25 | | |
18 | 26 | | |
| 27 | + | |
19 | 28 | | |
20 | 29 | | |
21 | 30 | | |
| |||
30 | 39 | | |
31 | 40 | | |
32 | 41 | | |
| 42 | + | |
33 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
| 76 | + | |
75 | 77 | | |
76 | 78 | | |
77 | 79 | | |
| |||
0 commit comments