Repository navigation
WH013 reads the parsed workflow model; delete WorkflowYaml (#971) - #1192
Conversation
WH013 now reads Hypatia.Workflow, as RE001, RE002 and WH014 (#1182) already do. With that, nothing reads Hypatia.WorkflowYaml, the line reader the hardening rules shared, and it is deleted. WH013 reads a grant as a `permissions:` value (so `permissions: {contents: write}` counts, and a script's `contents: write` text does not). It reads writes and masks from string values, a credential from token/GH_TOKEN/GITHUB_TOKEN keys, and a step's own continue-on-error, in any layout. It judges flow-style jobs per job. A writing workflow the reader refuses is reported at :warn at the error line, as RE001 and WH014 do, and is skipped otherwise. Seven new WH013 tests fail on main; an eighth guards a refused workflow that names no write. Six WH014 tests carried over from the earlier rebuild pass on #1182's WH014. RE003, RE005 and WorkflowAudit's toolchain-input check still read lines. ResearchExtensions.flow_to_block/1 moves back into that module unchanged, so their findings and the fixer's line numbers do not move. Checked under Elixir 1.19.4 / OTP 27.3.4.19: - mix format --check-formatted passes, and the changed modules compile with no warnings. - Comparing main (6f3f16f) with this change, every workflow rule gives the same findings on six repository snapshots and on perturbed copies, including the copies that make WH013 fire (12 findings). - 34 related test files pass. Only workflow_hardening_test.exs differs from main: 118 tests instead of 104, all passing. CLAUDE.md's lib/ count is re-measured at 171 (172 tracked on main, less this file). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J4QvDithtn5Xk5MbSPm4Px
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fc60ab11e8
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Codex on #1192: `ResearchExtensions.read_workflow/1` was a public `@doc false` delegate, and `WorkflowHardening.grants_contents_write_anywhere?/1` took workflow text. The migration made the first private and the second accept only the parsed model. No caller in the estate depends on either, but both are public, so they keep their shape: `read_workflow/1` stays a public `@doc false` def, and the grant check takes workflow text again, parsing it and delegating to the model clause. Text the reader refuses grants nothing. Two tests; both fail on fc60ab1. Under Elixir 1.19.4 / OTP 27 the format check passes, the changed modules compile with no warnings, and the workflow-rule suites pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J4QvDithtn5Xk5MbSPm4Px
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 48 minutes. View limit details
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. |
|
This security review couldn’t start because the paying account has exhausted its Codex allowance and has insufficient available credits. The payer can check their balance and add credits in the Codex usage dashboard, then try again. If you do not manage the paying account, contact this repository's admins. |
Validate Documentation's readme-claims check counts the tree and failed on 5735428: "lib/ is 171 in the tree; README.adoc should say 171". Deleting lib/hypatia/workflow_yaml.ex took the count from 172 to 171; CLAUDE.md was updated in c3b3c14, README.adoc was not. scripts/check-readme-claims.sh now reports "counts and local links match the tree". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J4QvDithtn5Xk5MbSPm4Px
|
This security review couldn’t start because the paying account has exhausted its Codex allowance and has insufficient available credits. The payer can check their balance and add credits in the Codex usage dashboard, then try again. If you do not manage the paying account, contact this repository's admins. |
|
Resolve .claude/CLAUDE.md to main's lib/ count (171, re-measured with find lib -name "*.ex" | wc -l after #1192 deleted workflow_yaml.ex). EXPLAINME: the Kin watchdog monitors Safety.RateLimiter and Safety.Quarantine (lib/kin/watchdog.ex), not the limiter alone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CYR5bf5FBLS7cXQK72aVNM
## Change `HYPATIA_SHA` in `.github/workflows/hypatia-scan.yml` moves from `7c10e5d` to `6d8ab66`, hypatia's `main` head on 2026-11-16. The new scanner includes: - secret-scanning findings that name the secret's file and line, and are never hidden by path exclusions (hyperpolymath/hypatia#1184); - the RSR 3.2.2 verdict from the capability reader (hyperpolymath/hypatia#1188); - the parsed workflow model for WH013 (hyperpolymath/hypatia#1192); - the actions-lock proof ledger (hyperpolymath/hypatia#1187). The workflow's interface to the scanner is unchanged at that commit: `hypatia-cli.sh` is still there, and the build is still `mix escript.build`. ## Findings at the new pin From [run 43967735672](https://github.com/hyperpolymath/echo-types/actions/runs/43967735672) on `29278de`: - **Build.** The cache missed, so the scanner was built fresh from `6d8ab66` ("Generated escript hypatia"). - **Hypatia.** Both the JSON and SARIF scans report `0 findings >= medium (critical=0, high=0, medium=0, warn=0, low=0, info=0)`, and the counts step reports critical 0, high 0, total 0. The gating row is 🟢 clean. - **Alert-backed rules.** These read 0 observations. The job token can read code-scanning and Dependabot alerts but not secret-scanning alerts, which need an App or PAT. That limit is unchanged by this PR. The 🔴 rows in the rendered grid come from **advisory** fleet reporters at the pinned `gitbot-fleet` revision, not from Hypatia, and this PR does not change them: - **rhodibot (RSR):** 11 high. Most expect `.a2ml` descriptiles (`ANCHOR.a2ml`, `STATE.a2ml`, `0-AI-MANIFEST.a2ml`, `.machine_readable/descriptiles/` and others). A2ML is retired estate-wide, so these rules are stale. They are not answered by creating `.a2ml` files here; rhodibot's criteria need updating to deeds in gitbot-fleet. - **finishingbot:** 2 high and 174 medium, mostly docs that name files which no longer exist (`All.agda`, `Smoke.agda`, `EchoVsQuotient.agda`, …). This is a docs clean-up for its own PR. - **glambot:** 1 medium and 136 minor (line length, heading levels). 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01P4yFkxW5Heb8p2YW7ZYs9F Co-authored-by: Claude <noreply@anthropic.com>



Summary
WH013 now reads
Hypatia.Workflow, as RE001 and RE002 (#1036) and WH014 (#1182) already do. With that, nothing readsHypatia.WorkflowYaml, the line reader the hardening rules shared, so it is deleted.This is the WH013 half of the work that followed #1036. #1182 landed WH014 separately, and this change keeps #1182's WH014 code as it is.
Changes
permissions:value.permissions: {contents: write}, the form WH013's own fix text recommends, now counts as a grant. Arun:script that writescontents: writeinto a file no longer does.git pushis not a write.GH_TOKEN:line that a script writes into a file is not the job's credential.env:written afterjobs:is inherited.jobs: { … }, so it treated the whole file as one body.:warnfinding at the error line if it names a write, and is skipped otherwise.ResearchExtensions.flow_to_block/1moves back into that module unchanged, so RE003, RE005 and the WorkflowAudit toolchain check, which still read lines, keep their findings and fixer line numbers.lib/count is re-measured at 171 (main tracks 172, and this deletes one).Testing
Run locally under the repo's pinned toolchain, Elixir 1.19.4 on OTP 27.3.4.19, built here because the container had 1.14/OTP 25:
mix format --check-formattedpasses across the repo, and the changed modules compile with no warnings (CI uses--warnings-as-errors).workflow_hardening_test.exsdiffers from main: 118 tests instead of 104, all passing.mix deps.get. This environment's network policy blocks hex.pm, so tests ran throughelixircbuilds. CI runs the real Mix lanes.Notes
lib/rules/research_extensions.ex, but in different regions: RE001 endpoint code there, the line-reader section here. Whichever merges second may need a trivial rebase.Generated by Claude Code