ci(governance): harden workflows — timeouts, perms, secret gate, codeql actions, drop privileged workflow_run (Part B) - #25
Merged
Conversation
…gate, codeql actions, drop privileged workflow_run Clears the pre-existing Hypatia workflow_audit findings (non-blocking, but tidies governance CI): - timeout-minutes on all remaining jobs: release.yml (3), static-analysis-gate.yml (3), rhodibot.yml (1) - instant-sync.yml (HIGH secret_action_without_presence_gate): gate the repository-dispatch step on FARM_DISPATCH_TOKEN presence so it no-ops without the secret - scorecard.yml (HIGH scorecard_wrapper_missing_job_permissions): add job-level permissions to the reusable-wrapper job (security-events/id-token/contents/actions) - codeql.yml (codeql_missing_actions_language): add the `actions` language so workflow files are scanned - rhodibot.yml (CRITICAL): remove the privileged `workflow_run` trigger — it ran with contents/ pull-requests write on Hypatia completion; rhodibot still runs via schedule + workflow_dispatch Verified: all changed workflows parse as YAML; every non-reusable job now has timeout-minutes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UCnxjXkN6uDj9YSANuGEgR
|
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. |
🔍 Hypatia Security ScanFindings: 30 issues detected
View findings[
{
"reason": "Issue in instant-sync.yml",
"type": "secret_action_without_presence_gate",
"file": "instant-sync.yml",
"action": "peter-evans/repository-dispatch",
"rule_module": "workflow_audit",
"severity": "high"
},
{
"reason": "Download-and-execute pattern (curl|wget pipe to shell) -- verify integrity before execution (3 occurrences, CWE-494)",
"type": "shell_download_then_run",
"file": "/home/runner/work/gv-clade-index/gv-clade-index/setup.sh",
"action": "flag",
"rule_module": "code_safety",
"severity": "high"
},
{
"line": 24,
"reason": "Secret found: Generic API key",
"type": "secret_detected",
"file": "/home/runner/work/gv-clade-index/gv-clade-index/.envrc",
"action": "revoke_rotate_and_purge",
"rule_module": "security_errors",
"severity": "critical"
},
{
"reason": "1 workflow(s) with tag-pinned (not SHA-pinned) actions in gv-clade-index",
"type": "DependencyPinning",
"file": "/home/runner/work/gv-clade-index/gv-clade-index",
"action": "auto_fix",
"rule_module": "scorecard",
"severity": "medium",
"remediation": "Pin GitHub Actions and Docker base images by SHA hash.",
"scorecard_check": "Pinned-Dependencies"
},
{
"reason": "Repository has 5 non-main remote branch(es). Policy: single main branch only.",
"type": "GS007",
"file": ".",
"action": "delete_remote_branches",
"rule_module": "git_state",
"severity": "medium"
},
{
"reason": "Code scanning (Hypatia): hypatia/structural_drift/SD022 -- Hypatia structural_drift: SD022 -- 0 day(s) old",
"type": "CSA001",
"file": "docs/practice/AI-CONVENTIONS.adoc",
"action": "review",
"rule_module": "code_scanning_alerts",
"severity": "medium"
},
{
"reason": "Code scanning (Hypatia): hypatia/structural_drift/SD022 -- Hypatia structural_drift: SD022 -- 0 day(s) old",
"type": "CSA001",
"file": "docs/developer/ABI-FFI-README.adoc",
"action": "review",
"rule_module": "code_scanning_alerts",
"severity": "medium"
},
{
"reason": "Code scanning (Hypatia): hypatia/structural_drift/SD022 -- Hypatia structural_drift: SD022 -- 14 day(s) old",
"type": "CSA001",
"file": "docs/governance/MAINTENANCE-CHECKLIST.adoc",
"action": "review",
"rule_module": "code_scanning_alerts",
"severity": "medium"
},
{
"reason": "Code scanning (Hypatia): hypatia/structural_drift/SD022 -- Hypatia structural_drift: SD022 -- 14 day(s) old",
"type": "CSA001",
"file": "docs/RSR_OUTLINE.adoc",
"action": "review",
"rule_module": "code_scanning_alerts",
"severity": "medium"
},
{
"reason": "Code scanning (Hypatia): hypatia/structural_drift/SD022 -- Hypatia structural_drift: SD022 -- 14 day(s) old",
"type": "CSA001",
"file": "QUICKSTART-DEV.adoc",
"action": "review",
"rule_module": "code_scanning_alerts",
"severity": "medium"
}
]Powered by Hypatia Neurosymbolic CI/CD Intelligence |
hyperpolymath
marked this pull request as ready for review
June 21, 2026 10:51
hyperpolymath
added a commit
that referenced
this pull request
Jun 21, 2026
… setup.sh, .envrc (#27) Addresses the actionable subset of the Hypatia advisory findings surfaced by the scanner upgrade in #26. The remaining ~7 are scanner false-positives (WF017 two-step gate, SC-013 comment stripping, SC-014 codeql substring) for an upstream fix. Docs (structural_drift SD022 x6 — stale path after #20's FFI removal): - correct `src/abi/` -> the real RSR slot `src/interface/abi/` in AI-CONVENTIONS, RSR_OUTLINE, QUICKSTART-DEV, MAINTENANCE-CHECKLIST, INTENT.contractile - replace the unfilled-template docs/developer/ABI-FFI-README.adoc (it still carried a `{{project}}` placeholder and a template-instruction line and described a non-existent FFI surface) with an honest "no FFI surface" stub pointing at the RSR placeholders and PROOF-NEEDS.md setup.sh (code_safety shell_download_then_run / CWE-494): - replace `curl ... just.systems/install.sh | bash` with a download-then-run helper (no pipe-to-shell), with opt-in JUST_VERSION pin and JUST_INSTALL_SHA256 verify; native package managers (incl. nix/guix) are still tried first - update the header usage example to the download-then-run form .envrc (secret_detected "Generic API key" — false-positive, commented placeholder): - remove the residual `# export DATABASE_URL=...` / `# export API_KEY=...` lines (re-lands the fix intended in #25 that never reached main) This does not by itself turn the hypatia check green — that needs the upstream reusable to restore `--exit-zero`/`|| true` on the scan step so it follows its documented advisory ("warn but don't fail") policy. Claude-Session: https://claude.ai/code/session_01UCnxjXkN6uDj9YSANuGEgR Co-authored-by: Claude <noreply@anthropic.com>
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.
Why
Part B of the in-repo hygiene work ("2 then 1"). Clears the pre-existing Hypatia
workflow_auditfindings that surface on every PR (1 critical / several high / mediums). These are non-blocking today but make the governance scan noisy; this tidies them.Changes
missing_timeout_minutestimeout-minutesto every remaining job:release.yml(3),static-analysis-gate.yml(3),rhodibot.yml(1)secret_action_without_presence_gate(instant-sync.yml)repository-dispatchstep onsecrets.FARM_DISPATCH_TOKEN != ''so it no-ops without the secretscorecard_wrapper_missing_job_permissions(scorecard.yml)permissions:(security-events / id-token / contents / actions) to the reusable-wrapper jobcodeql_missing_actions_language(codeql.yml)actionslanguage to the matrix so workflow files are scannedworkflow_run(rhodibot.yml)workflow_runtrigger — it ran withcontents/pull-requests: writeon Hypatia completion. Rhodibot still runs viaschedule(weekly) +workflow_dispatchNote on the rhodibot critical
Rhodibot only ever checked out the default branch and ran its own hardcoded script (not PR code), so it wasn't a classic pwn-request — but Hypatia flags privileged
workflow_run, and dropping it is the cleanest fix. If you'd rather keep the auto-run-after-Hypatia behaviour with aconclusion == 'success'guard instead, say so and I'll switch.Verified
timeout-minutes.rhodibot.ymlhas no remainingworkflow_run:trigger key.Still out of scope (needs you, upstream)
Check Workflow Stalenesswill remain red untilactions/cacheis repinned inhyperpolymath/standards'shypatia-scan-reusable.yml(the diff I provided earlier) — then I'll forward-bump the pins here and that goes green too.🤖 Generated with Claude Code
https://claude.ai/code/session_01UCnxjXkN6uDj9YSANuGEgR
Generated by Claude Code