Repository navigation
Commit 3582c9b
ci: re-sync three workflows to the rsr-template-repo canon (Hypatia findings, part 1) (#354)
## Summary
This is part 1 of fixing the Hypatia scan findings on echo-types. It
fixes **9 of the 10 findings visible** in the PR scan comment by taking
the estate template's versions of three workflows
(`hyperpolymath/rsr-template-repo`) instead of patching the drifted
local copies.
| Finding | Severity | File | Fix |
|---|---|---|---|
| WH014: masked scanner feeds the SARIF upload | high |
`hypatia-scan.yml` | Template version: `set -euo pipefail`, no `\|\|
true`, and `jq -e` checks the findings JSON and the SARIF before upload
|
| RE001: uses `secrets.*` without harden-runner | medium |
`hypatia-scan.yml` | Template no longer references `secrets.*` |
| WH006 + missing_timeout_minutes (job `sync`) | medium ×2 |
`labels.yml` | `timeout-minutes: 10` |
| WH006 + missing_timeout_minutes (job `triage`) | medium ×2 |
`label-triage.yml` | `timeout-minutes: 10` |
| RE001 | medium ×2 | `labels.yml`, `label-triage.yml` | `github.token`
instead of `secrets.GITHUB_TOKEN` |
**Why WH014 mattered.** When the scanner failed, the old workflow still
uploaded a SARIF file with zero results. GitHub then auto-closes every
open alert in that category, with the job showing green. The template
already guards against this, so re-syncing fixes it at the source rather
than patching a fork of it.
**Dropped from `hypatia-scan.yml`, because the template doesn't carry
them:**
- the findings artifact upload;
- the PR comment, which only ever showed the first 10 of 38 findings;
- the gitbot-fleet submission, whose push was being denied (`403`).
## ⚠ Read the new finding count with care: 38 → 3 is not 35 fixes
This branch's Hypatia run reports **3 findings** (0 critical, 1 high),
down from 38 on `main`. The scanner versions are effectively the same:
the template pins `d73f76b5`, committed five minutes before the `main`
(`edc6608`) the old workflow used. But **the template does not pass
`GITHUB_TOKEN` to the scan.** Hypatia's API-backed rule modules need a
token and return `[]` silently without one: `code_scanning_alerts`,
`dependabot_alerts`, `secret_scanning_alerts`, `branch_protection`,
`baseline_health` and similar. Most of the 28 findings the old PR
comment never showed most likely came from those modules. They are now
unscanned, not fixed.
Re-enabling them means passing `GITHUB_TOKEN: ${{ github.token }}` in
the scan step's `env`. That uses `github.token`, not `secrets.*`, so
RE001 stays clear. The right place for that is the template itself, in
`rsr-template-repo`, so every synced repo gets the same coverage. That
decision is with the owner; this PR deliberately stays byte-identical to
the template.
## `actions.lock`
- The `hypatia-scan.yml` entry now matches the template's lock exactly.
It uses SHA-pinned cache, checkout, setup-beam and codeql-action, all of
which were already recorded under `dependencies`.
- I removed the three dependency records that no workflow uses any more:
`github-script@v9.0.0`, `upload-artifact@v7.0.2` and
`setup-beam@v1.24.1`.
- This was edited by hand, because `gh actions-lock` isn't available in
my environment. I checked that every workflow ref resolves to a
dependency and that no dependency is unreferenced. **It still needs `gh
actions-lock --verify-local`.** The Governance `actions-lock-verify` job
would do that, but it is currently failing at startup on the
Actions-allowlist issue from echo-types#352.
## Not in this PR
- **Harden-runner (RE001) on `push-email-notify.yml`.** That job
genuinely needs SMTP secrets. Per the owner's decision, adopting
`step-security/harden-runner` is deferred to a single estate-wide
decision via the allowlist in `metadatastician/standards`.
- **Missing `0-AI-MANIFEST.a2ml` (high).** This file was retired on
purpose (`6eafe81`). The rule is being fixed upstream in
hyperpolymath/hypatia#960, which accepts `<repo>_chora.deed`. Once that
lands, this finding becomes "missing `echo-types_chora.deed`", which is
accurate debt tracked by the `.deed` conversion (rsr-template-repo#209).
- **The token-gated findings above.** Part 2, once the template passes
the token.
## Testing
- All three workflows parse as YAML.
- The lock's hypatia-scan entry is identical to `rsr-template-repo`'s.
- This branch's Hypatia run passes the new pre-upload checks and reports
0 critical, 1 high and 3 total. Read that count with the caveat above.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01P4yFkxW5Heb8p2YW7ZYs9F
Co-authored-by: Claude <noreply@anthropic.com>1 parent 7f1778c commit 3582c9b
4 files changed
Lines changed: 93 additions & 407 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
| |||
57 | 56 | | |
58 | 57 | | |
59 | 58 | | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | 59 | | |
66 | 60 | | |
67 | 61 | | |
| |||
72 | 66 | | |
73 | 67 | | |
74 | 68 | | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | 69 | | |
81 | 70 | | |
82 | 71 | | |
| |||
104 | 93 | | |
105 | 94 | | |
106 | 95 | | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | 96 | | |
113 | 97 | | |
114 | 98 | | |
| |||
0 commit comments