Skip to content

fix(ci): pass hypatia-ref aa34a4c to the standards scanner reusables - #940

Merged
hyperpolymath merged 1 commit into
mainfrom
claude/eager-wright-zwwbe2
Oct 20, 2026
Merged

hyperpolymath merged 1 commit into
mainfrom
claude/eager-wright-zwwbe2

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

PR 1 of a stack that triages the 30 findings governance / Validate Hypatia Baseline reports on every PR (e.g. #938 job 118601725176, #939 job 118615176756).

The gate doesn't run this repo's scanner. It builds hypatia at the reusable's default hypatia-ref, 51ab649. That commit's ActionsLock parser accepts only v0.0.2, so this repo's tool-owned v0.0.3 actions.lock fails closed as 2 high findings:

invalid_actions_lock (workflow_audit)     {:line, 4, {:unsupported_version, "v0.0.3"}}
invalid_actions_lock (workflow_hardening) actions.lock failed closed: {:line, 4, ...}

The parser was already fixed by #938 (aa34a4c). This PR passes hypatia-ref: aa34a4cc… to both standards reusables (governance.yml, hypatia-scan.yml).

Type of change

  • 🔧 Build / CI / tooling

How has this been verified?

  • Both reusables at the pinned 333b06a0 declare a hypatia-ref string input (git show 333b06a0:.github/workflows/{governance,hypatia-scan}-reusable.yml).
  • yq reads hypatia-ref: aa34a4cc… from both callers. actionlint 1.7.7 is clean on both files, before and after.
  • The blast radius at aa34a4c was measured in standards#1315 by replaying the baseline step: on this repo it removes the 2 invalid_actions_lock findings and adds nothing. The gate stays red on this PR because of the 28 other findings. The stacked PRs fix those at their source:
    • WH013 rule precision for PAT-authenticated writes, plus the inbox-steward-intake.yml repair (masked pushes, and appended text that corrupts .hypatia-baseline.json);
    • RE005 rule precision for trap cleanup, plus two real masks removed;
    • RE004 digest pins;
    • RE001 harden-runner in block mode, which needs an owner gh actions-lock run.

Checklist

  • My commits are signed. The session's signing shim is platform-mediated; GitHub signs the squash merge.
  • I ran the project's own checks/tests locally and they pass (actionlint; no Elixir change).
  • New files carry the correct SPDX (no new files).
  • Docs are updated, and no public claim now overstates what the code does.
  • I have not introduced a soundness hole.

Notes for reviewers

The pin now lives in two places (here and the standards default) until the re-pin. The comment in governance.yml says when to drop it.


Generated by Claude Code

Governance's Validate Hypatia Baseline and the Hypatia Security Scan build
the scanner at the reusables' default hypatia-ref, 51ab649. That commit's
ActionsLock parser accepts only v0.0.2, so this repo's tool-owned v0.0.3
actions.lock fails closed as two high invalid_actions_lock findings on
every run.

Pass hypatia-ref aa34a4c (main after #938, which adds v0.0.3 support) as an
input. The `uses:` refs are unchanged, so actions.lock is untouched. This is
the value standards#1315 moves the defaults to; drop the input once the
standards callers are re-pinned past that PR.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CYR5bf5FBLS7cXQK72aVNM
@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: c1e6ed72-ccff-4243-9225-bd10535b1c41
📥 Commits

Reviewing files that changed from the base of the PR and between f983542 and 8e55806.

📒 Files selected for processing: 2
  • .github/workflows/governance.yml
  • .github/workflows/hypatia-scan.yml

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📜 Recent review details
⏰ Context from checks skipped due to timeout: 68
  • GitHub Check: governance / JS runtimes — environment provisions Bun first
  • GitHub Check: governance / JS runtimes — pnpm
  • GitHub Check: governance / JS runtimes — deno
  • GitHub Check: governance / Code quality + docs
  • GitHub Check: governance / Workflow security linter
  • GitHub Check: governance / Debt ratchet
  • GitHub Check: governance / Security policy checks
  • GitHub Check: governance / Trusted-base reduction policy
  • GitHub Check: governance / JS runtimes — bun
  • GitHub Check: governance / Licence consistency
  • GitHub Check: governance / Language / package anti-pattern policy
  • GitHub Check: governance / Exemption ratchet
  • GitHub Check: governance / Guix packaging policy (Nix retired)
  • GitHub Check: governance / Allowlist Preflight
  • GitHub Check: governance / Actions lockfile verify
  • GitHub Check: governance / Live Actions policy (credentialed advisory)
  • GitHub Check: governance / Check Workflow Staleness
  • GitHub Check: governance / UUID v7 conformance
  • GitHub Check: governance / UUID v8 conformance
  • GitHub Check: governance / Well-Known (RFC 9116 + RSR)
  • GitHub Check: scan / gitleaks
  • GitHub Check: scan / rust-secrets
  • GitHub Check: scan / shell-secrets
  • GitHub Check: hypatia / Hypatia Neurosymbolic Analysis
  • GitHub Check: lint
  • GitHub Check: Rust Check & Clippy
  • GitHub Check: Rust Format
  • GitHub Check: docs
  • GitHub Check: Validate Documentation
  • GitHub Check: k9iser manifest + build
  • GitHub Check: Cargo check + clippy + fmt
  • GitHub Check: Generate SBOM
  • GitHub Check: Format
  • GitHub Check: Test
  • GitHub Check: Rust License & Ban Check
  • GitHub Check: Secret Detection (Gitleaks)
  • GitHub Check: Rust Dependency Audit
  • GitHub Check: analyze (actions, none)
  • GitHub Check: Container Security (Trivy) (deploy/Containerfile)
  • GitHub Check: Clippy
  • GitHub Check: Language Policy
  • GitHub Check: CodeQL Analysis (actions)
  • GitHub Check: Build AsciiDoc
  • GitHub Check: Secret Detection (TruffleHog)
  • GitHub Check: Startup probe
  • GitHub Check: Detect Haskell tree
  • GitHub Check: Validate K9 contracts
  • GitHub Check: Validate DEED manifests
  • GitHub Check: Check
  • GitHub Check: Estate rules and sweep structure
  • GitHub Check: License Compliance Check
  • GitHub Check: E2E — Elixir Scanner Pipeline
  • GitHub Check: analyze (javascript-typescript, none)
  • GitHub Check: E2E — Rust CLI Scan
  • GitHub Check: abi-codegen-drift
  • GitHub Check: Groove manifest check
  • GitHub Check: zig build test (FFI + wire contract)
  • GitHub Check: Build Test Images
  • GitHub Check: stress-test
  • GitHub Check: Aspect — Rule Module Coverage
  • GitHub Check: Empty-linter (invisible characters)
  • GitHub Check: criterion + baseline gate
  • GitHub Check: semgrep-cloud-platform/scan
  • GitHub Check: Language Policy
  • GitHub Check: Validate Documentation
  • GitHub Check: lint
  • GitHub Check: docs
  • GitHub Check: Build AsciiDoc
🔇 Additional comments: 2
.github/workflows/governance.yml: 1

20-25: LGTM!

.github/workflows/hypatia-scan.yml: 1

25-27: LGTM!

📝 Summary

Summary by CodeRabbit

  • Chores
    • Updated governance and security scanning workflows to use a fixed scanner revision.
    • Improved consistency and reproducibility of automated compliance checks.

Both workflows now pass scanner revision aa34a4cc6ba39d873710ff39763fdb9cde715f9d through the hypatia-ref input to the reusable workflow.

Changes: Scanner revision pin

Layer / File(s) Summary
Pass the pinned scanner revision
.github/workflows/governance.yml, .github/workflows/hypatia-scan.yml
Both workflows document the scanner pin and pass the same revision through hypatia-ref.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 8e558

The pin is valid and the workflows remain correctly configured.

Architecture risk: 🔵 Low · up to 8e558

The changed surface does not map to a changed system, dependency edge, entrypoint, or external dependency.

Changed systems: None identified.

Architecture concerns
No architecture-level concerns identified.

Review details

Before / after behavior

  • observed — Modified behavior in .github/workflows/governance.yml: The governance workflow adds comments documenting the scanner override and supplies the pinned hypatia-ref revision to the reusable workflow.
  • observed — Modified behavior in .github/workflows/hypatia-scan.yml: The hypatia job now documents the scanner pin and supplies the hypatia-ref input with revision aa34a4cc6ba39d873710ff39763fdb9cde715f9d.
Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly and concisely identifies the main change: passing the pinned hypatia-ref to the standards scanner reusable workflows.
Description check Passed The description directly explains the CI issue, the two-file change, the pinned revision, verification steps, and the remaining findings.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (2 skipped: 2 unsupported.)

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@hyperpolymath
hyperpolymath marked this pull request as ready for review October 20, 2026 12:32
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T12:34:29.047669Z 8e55806 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@hyperpolymath
hyperpolymath merged commit 61023d1 into main Oct 20, 2026
88 of 89 checks passed
@hyperpolymath
hyperpolymath deleted the claude/eager-wright-zwwbe2 branch October 20, 2026 12:37
hyperpolymath pushed a commit that referenced this pull request Oct 20, 2026
Brings in #938 (ActionsLock v0.0.3 per-dependency hostname), #939
(security-status checks out the workflow file before its self-check) and
#940 (hypatia-ref aa34a4c passed to the standards scanner reusables).

Conflicts:
- lib/rules/actions_lock.ex: this branch and #938 each added v0.0.3
  hostname handling; the textual merge kept both, leaving this branch's
  clauses unreachable behind #938's. #938's parser is taken whole (it
  checks the hostname grammar, the version and duplicates), and this
  branch's one other addition, workflow_refs/2 (PI004 per workflow), is
  re-applied on top.
- test/rules/actions_lock_test.exs: a hostname line in a v0.0.2 lock is
  {:hostname_not_in_version, "v0.0.2"} under #938, not
  :malformed_dependency_entry.
- .github/workflows/hypatia-scan.yml: #940's `with: hypatia-ref` input and
  this branch's secrets comment, both kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xn9nqHVbUTRLgBdedoXAc8
hyperpolymath added a commit that referenced this pull request Oct 20, 2026
…credential (#942)

## Summary

PR 2 of the baseline-gate stack, stacked on #940.

WH013 ("permission-starved write") fired whenever a workflow writes and
the file grants no `contents: write`. That grant only governs
`GITHUB_TOKEN`, so it fired on jobs that write with **their own
credential**. Measured false positives:

| Repo / file | Credential | Before | After |
|---|---|---|---|
| hypatia `estate-rescan.yml` | `HYPATIA_DISPATCH_PAT` in a clone URL,
pushing to verisimdb-data | high | none |
| hypatia `inbox-steward-intake.yml` | `actions/checkout` `token:
FARM_PAT` | high (masked) | **warn** `unmask-credentialed-write` |
| standards `github-backup-mirror-reusable.yml` | `BACKUP_MIRROR_TOKEN`
PAT push to the backup repo | high | none |
| echidna | — | none | none |

Changes:
- Writes are judged per job (`extract_job_blocks/1`). A file the
extractor can't split falls back to whole-file judgment, as before.
- A job is **credentialed** when `token:`, `GH_TOKEN:` or
`GITHUB_TOKEN:` is set to a secret other than `secrets.GITHUB_TOKEN`, or
to a step-minted `steps.<id>.outputs.token` (GitHub App).
`own_credential_job?/1` is public and has unit asserts.
- Starvation and its masked `:high` arm consider only `GITHUB_TOKEN`
jobs. A PAT in one job never excuses a `GITHUB_TOKEN` push in another;
there is a test for that.
- A credentialed write that is **masked** (`2>/dev/null`, `|| true`, `||
echo`) is still reported, at `:warn` with its own recipe. A credential
that expires or loses scope fails silently, but no grant is missing.

The remaining inbox-steward warn is a real defect, fixed in the next PR
of the stack.

## Type of change

- [x] 🐛 Bug fix: a false-positive class across the estate. It also
leaves one true positive (masking), correctly worded.

## How has this been verified?

`mix deps.get` can't reach hex.pm from this session, so I compiled
`actions_lock.ex` and `workflow_hardening.ex` standalone with Elixir
1.14 and ran `test/workflow_hardening_test.exs` under ExUnit (seed 0):
- Before the change: **56/56** pass.
- After, with 5 new tests: **61/61** pass.
- Control: the 5 new tests against the **old** module give 3 failures
(the PAT-clone, PAT-masked and `own_credential_job?` cases). The other
two (`secrets.GITHUB_TOKEN` is not a credential; a PAT in one job
doesn't excuse another job) hold on both, as they should.
- `mix format --check-formatted` passes on both files. The formatter
changed only the edited region.
- I ran `wh013_permission_starved_write/1` against the real hypatia,
standards and echidna trees with the old and new modules; that produced
the table above.

CI's `mix test` is the first full-suite run.

## Checklist

- [ ] My commits are **signed**. The session's signing shim is
platform-mediated.
- [x] I ran the project's own checks/tests locally and they pass (scoped
as above).
- [x] New files carry the correct SPDX (none added).
- [x] Docs are updated: the moduledoc for WH013 explains the credential
rule.
- [x] I have not introduced a soundness hole. The approximation errs
toward silence only when a job sets a PAT and then writes with
`GITHUB_TOKEN` anyway; this is documented on `own_credential_job?/1`.

## Notes for reviewers

The gate on this PR still runs the pinned scanner (`aa34a4c` from #940),
so this change won't show in its own baseline result. A final pin bump
after the rule PRs merge picks it up.

---
_Generated by [Claude
Code](https://claude.ai/code/session_01CYR5bf5FBLS7cXQK72aVNM)_

---------

Co-authored-by: Claude <noreply@anthropic.com>
hyperpolymath added a commit that referenced this pull request Oct 20, 2026
## Summary

This is the last step of the baseline-gate stack. `governance.yml` and
`hypatia-scan.yml` pass `hypatia-ref: aa34a4c` (#940), which predates
the rule fixes that clear this repo's own false positives. This PR moves
both to **hypatia `main` at `23dc74d`**, which contains:

- #938: ActionsLock accepts v0.0.3 locks (already in `aa34a4c`);
- #942: WH013 judges writes per job and skips PAT/app-token writes. This
clears `estate-rescan.yml`; `inbox-steward-intake.yml` was also repaired
in #943;
- #947: RE005 skips `trap` handlers, and job extraction survives
comments between jobs.

`uses:` refs are unchanged, so `actions.lock` is untouched.

## What this PR's governance run will show

This PR's own `governance / Validate Hypatia Baseline` run is the
measurement: it builds the scanner at `23dc74d`. The jump from `aa34a4c`
also brings #931's new rules (WF026, WF027, PIN-003), which haven't been
measured on this repo yet. hex.pm is blocked in my session, so I can't
build the escript to pre-run them.

**Expected remaining findings, by class:**
- **RE001 (harden-runner):** most of the original 18 jobs, including the
2 dispatched label workflows, which must stay action-free.
- These need an owner decision; the harden-runner steps were removed
again in #948 because the lock has no record.
- **WH013, RE004, RE005, `invalid_actions_lock`:** expected 0.

I'll post the measured list here once the run completes.

## Type of change

- [x] 🔧 Build / CI / tooling

## How has this been verified?

- `actionlint` 1.7.7 is clean on both files.
- `23dc74d` is `origin/main` at the time of writing. `git log
aa34a4c..23dc74d` contains #942, #947, #945, #931, #941 and #936.

## Checklist

- [ ] My commits are **signed**. The session's signing shim is
platform-mediated.
- [x] I ran the project's own checks/tests locally and they pass.
- [x] New files carry the correct SPDX (none added).
- [x] Docs are updated (the pin comment names what it carries).
- [x] I have not introduced a soundness hole.

---
_Generated by [Claude
Code](https://claude.ai/code/session_01CYR5bf5FBLS7cXQK72aVNM)_

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants