Skip to content

Commit 3582c9b

Browse files
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

File tree

‎.github/workflows/actions.lock‎

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,10 @@ workflows:
1212
'.github/workflows/governance.yml':
1313
- 'metadatastician/standards@75bd5994470661a099df562d6d5ad2fe744dbd66'
1414
'.github/workflows/hypatia-scan.yml':
15-
- 'actions/checkout@v7.0.1'
16-
- 'actions/github-script@v9.0.0'
17-
- 'actions/upload-artifact@v7.0.2'
18-
- 'erlef/setup-beam@v1.24.1'
19-
- 'github/codeql-action@v4.39.1'
15+
- 'actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9'
16+
- 'actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1'
17+
- 'erlef/setup-beam@54075bcc5e249e4758d363f27d099f55d843f124'
18+
- 'github/codeql-action@b96794f015dfd88f77b49b1c93e0fa7110f94c63'
2019
'.github/workflows/label-triage.yml': []
2120
'.github/workflows/labels.yml': []
2221
'.github/workflows/mirror.yml':
@@ -57,11 +56,6 @@ dependencies:
5756
commit: 'sha1-368f82528645a54fb793d4d04e342629a3f51346'
5857
owner_id: 44036562
5958
repo_id: 438112499
60-
'actions/github-script@v9.0.0':
61-
ref: 'v9.0.0'
62-
commit: 'sha1-3a2844b7e9c422d3c10d287c895573f7108da1b3'
63-
owner_id: 44036562
64-
repo_id: 205262760
6559
'actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f':
6660
ref: 'v7.0.0'
6761
commit: 'sha1-bbbca2ddaa5d8feaa63e36b76fdaad77386f024f'
@@ -72,11 +66,6 @@ dependencies:
7266
commit: 'sha1-cf430e030ddbb5b0abf93d22962f4752f3646cd9'
7367
owner_id: 44036562
7468
repo_id: 192625955
75-
'actions/upload-artifact@v7.0.2':
76-
ref: 'v7.0.2'
77-
commit: 'sha1-cf430e030ddbb5b0abf93d22962f4752f3646cd9'
78-
owner_id: 44036562
79-
repo_id: 192625955
8069
'actions/upload-pages-artifact@v5.0.0':
8170
ref: 'v5.0.0'
8271
commit: 'sha1-fc324d3547104276b827a68afc52ff2a11cc49c9'
@@ -104,11 +93,6 @@ dependencies:
10493
commit: 'sha1-54075bcc5e249e4758d363f27d099f55d843f124'
10594
owner_id: 47606891
10695
repo_id: 331103973
107-
'erlef/setup-beam@v1.24.1':
108-
ref: 'v1.24.1'
109-
commit: 'sha1-54075bcc5e249e4758d363f27d099f55d843f124'
110-
owner_id: 47606891
111-
repo_id: 331103973
11296
'github/codeql-action@b96794f015dfd88f77b49b1c93e0fa7110f94c63':
11397
ref: 'v4.38.0'
11498
commit: 'sha1-b96794f015dfd88f77b49b1c93e0fa7110f94c63'

0 commit comments

Comments
 (0)