fix(ci): resolve 27 hypatia workflow-hygiene findings#254
Merged
Conversation
Triggered by the hypatia scan comment on PR #249 (98 findings; this PR clears the 27 fixable workflow + config findings, plus the ~9 CSA001 mirrors that resolve via the source findings). Findings resolved: - 1× unpinned_action — pin governance.yml `@main` → SHA pin matching estate convention (live standards main 3b3549e2 with date comment). - 23× missing_timeout_minutes — 16 workflow files, every job + reusable-workflow caller gets `timeout-minutes:` (10-60 min depending on job nature: 60 for codeql + mirror + supervised-scan, 30 for most scans, 10-15 for small jobs). - 1× codeql_missing_actions_language / 1× StaticAnalysis (same finding, two presentations) — drop `javascript-typescript` (not in repo); add `actions` to cover the GitHub Actions surface. - 1× scorecard_publish_with_run_step (HIGH severity) — split scorecard-enforcer.yml into action-only `scorecard` job + downstream `score-gate` job that pulls the SARIF as artifact. Keeps the OpenSSF publish protocol clean per hypatia's expectation. - 1× secret_action_without_presence_gate (HIGH severity) — gate instant-sync.yml's FARM_DISPATCH_TOKEN usage with `env.HAS_TOKEN == 'true'` job-level env. Adds an explicit skip-notice step for the path where the token is absent (forks / PRs from forks). Out of scope for this PR (separate work, will file issues): - 6× SD004 (.machine_readable/*.a2ml in wrong location) — hypatia rule is enforcing a retired layout per the standards CLAUDE.md: canonical location IS `.machine_readable/` directly, not `.machine_readable/6a2/`. Filing hypatia issue to fix the stale rule. - 29× expect_in_hot_path — Rust `.expect()` calls across bots/*. Needs per-bot review + migration to `?` or `.unwrap_or_else(...)`. - 1× GS007 — 3 non-main remote branches. Cleanup separate. - 33× CSA001 + 1× CSA002 — code-scanning-API mirrors of other findings. Clear automatically when sources clear. Test plan: hypatia scan should drop from 98 → ~38 findings on next run (or lower as CSA001 mirrors clear), no critical/high remaining in the workflow surface. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced Jun 2, 2026
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Triggered by the hypatia scan comment on PR #249 — 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
Out of scope (separate work)
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:
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
Related
🤖 Generated with Claude Code