ci(workflow): adopt hardened hypatia-scan from hyperpolymath/hypatia#237#60
Merged
Merged
Conversation
Replaces the local copy of `.github/workflows/hypatia-scan.yml` with the canonical version from upstream main. The old copy had three issues that combined to break every Dependabot PR: 1. `working-directory: \${{ env.HOME }}/hypatia\``, where `env.HOME` is not a GHA context — it evaluated to empty, so `cd /hypatia` failed and the scanner was never built. 2. `hypatia-cli.sh scan .` without `--exit-zero` — scanner exit-1 on findings short-circuited the rest of the step under `set -e`. 3. No baseline gate, so any pre-existing critical/high failed the build. Upstream version: - captures scanner exit code + stderr (visible on crash) - falls back to `[]` on missing/invalid JSON - reads `.hypatia-baseline.json` and fails only on NET-NEW critical/high - scopes permissions narrowly (contents: read, pull-requests: write) - marks the PR-comment step `continue-on-error: true` so Dependabot PRs (read-only token) don't fail on the unavoidable 403 Baseline file follows in a second commit on this branch — first we need the new workflow to actually run and capture current findings. Unblocks PR #59 (CODEOWNERS) which is stuck on this exact scan. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Previous commit on this branch wrote the YAML as a single line due to a PowerShell encoding/-NoNewline mistake on my end. This re-applies the canonical workflow content byte-for-byte, with line breaks intact, so GitHub Actions can parse it. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
… first scan Captured from run 25856301390 on this branch. 32 critical+high entries accepted as pre-existing baseline. Net-new findings going forward will still fail the gate. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
🔍 Hypatia Security ScanFindings: 90 issues detected
View findings[
{
"reason": "Action actions/checkout needs attention",
"type": "wrong_sha_pin",
"file": "boj-build.yml",
"action": "update_pin",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Action actions/checkout needs attention",
"type": "wrong_sha_pin",
"file": "casket-pages.yml",
"action": "update_pin",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Action actions/checkout needs attention",
"type": "wrong_sha_pin",
"file": "casket-pages.yml",
"action": "update_pin",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Action actions/checkout needs attention",
"type": "wrong_sha_pin",
"file": "codeql.yml",
"action": "update_pin",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Action hyperpolymath/a2ml-validate-action needs attention",
"type": "wrong_sha_pin",
"file": "dogfood-gate.yml",
"action": "update_pin",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Action hyperpolymath/k9-validate-action needs attention",
"type": "wrong_sha_pin",
"file": "dogfood-gate.yml",
"action": "update_pin",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Action actions/checkout needs attention",
"type": "wrong_sha_pin",
"file": "elixir-ci.yml",
"action": "update_pin",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Action actions/checkout needs attention",
"type": "wrong_sha_pin",
"file": "elixir.yml",
"action": "update_pin",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Action actions/checkout needs attention",
"type": "wrong_sha_pin",
"file": "generator-generic-ossf-slsa3-publish.yml",
"action": "update_pin",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Action actions/checkout needs attention",
"type": "wrong_sha_pin",
"file": "guix-nix-policy.yml",
"action": "update_pin",
"rule_module": "workflow_audit",
"severity": "medium"
}
]Powered by Hypatia Neurosymbolic CI/CD Intelligence |
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.
Workflow-only commit; baseline follows after the new workflow's first run captures findings. Unblocks #59.