Skip to content

fix(ci): check out the workflow file in security-status before the self-check - #939

Merged
hyperpolymath merged 2 commits into
mainfrom
claude/determined-darwin-og14n5
Oct 20, 2026
Merged

hyperpolymath merged 2 commits into
mainfrom
claude/determined-darwin-og14n5

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Problem

Security Status (security-status in .github/workflows/security-policy.yml) fails on main and on every PR: for example main runs 39357599189, 39339043314, 39323370164 and 39276944530, and job 118603122869 on #938.

Its first step, "Self-check — no orphan jobs", runs awk/sed over .github/workflows/security-policy.yml, but the job has no checkout step. So the step exits 2 with awk: fatal: cannot open file '.github/workflows/security-policy.yml', and the job fails whatever the scans found.

Change

  • Adds a sparse checkout of just that file as the job's first step (sparse-checkout: .github/workflows/security-policy.yml, sparse-checkout-cone-mode: false, persist-credentials: false).
  • Uses actions/checkout@v7.0.1, the same ref every sibling job in this file uses. That ref is already in this workflow's actions.lock entry, so the lockfile is unchanged and did not need regenerating.
  • Leaves needs: and if: always() alone.

Validation (local)

  • Ran the self-check script on the edited file. It prints jobs in workflow: 9 and then ok: every non-aggregator job is named in the aggregator's needs.
  • Ran actionlint 1.7.7 on the file before and after the change: no findings either time.

Done when, on this PR: Security Status is green, its self-check log shows the ok: line, and governance / Actions lockfile verify stays green.


Generated by Claude Code

…lf-check

The "Self-check — no orphan jobs" step runs awk/sed over
.github/workflows/security-policy.yml, but the Security Status job had no
checkout step, so awk exited 2 ("cannot open file") and the aggregator
failed on main and every PR regardless of the scan results.

Add a sparse checkout of just that file as the first step, using the same
actions/checkout@v7.0.1 ref the sibling jobs use, so the per-workflow
entry in actions.lock is unchanged. needs:/if: always() are untouched.

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

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You'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 17 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 0f0db2d4-890b-4044-bfaa-e846f2bc6976
📥 Commits

Reviewing files that changed from the base of the PR and between aa34a4c and 6c766b6.

📒 Files selected for processing: 1
  • .github/workflows/security-policy.yml
  • 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.

Copy link
Copy Markdown
Owner Author

governance / Validate Hypatia Baseline is red here, but this PR didn't cause it.

  • The gate fails on 30 findings that already exist across the repo, in about 16 workflow files.
  • The only one in security-policy.yml is the existing "references secrets.* without step-security/harden-runner" note. The checkout step this PR adds references no secrets.
  • One invalid_actions_lock finding says the scanner rejects actions.lock version: 'v0.0.3' (unsupported_version). That comes from the scanner, not from the lockfile's contents. governance / Actions lockfile verify is the tool-owned check for the lockfile, and it is what this PR has to keep green.
  • The same check fails the same way on fix(actions-lock): support the v0.0.3 per-dependency hostname field #938 (job 118601725176), which doesn't touch this file.

As far as I can find, no fix PR exists for that baseline. I'm not widening this PR to cover it. I'll re-run the failed governance job once.


Generated by Claude Code

@hyperpolymath
hyperpolymath marked this pull request as ready for review October 20, 2026 12:09
@hyperpolymath
hyperpolymath enabled auto-merge (squash) October 20, 2026 12:09
@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:11:22.488749Z 6c766b6 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 f983542 into main Oct 20, 2026
80 checks passed
@hyperpolymath
hyperpolymath deleted the claude/determined-darwin-og14n5 branch October 20, 2026 12:10
hyperpolymath added a commit that referenced this pull request Oct 20, 2026
…940)

## 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: aa34a4c…` to both standards reusables (`governance.yml`,
`hypatia-scan.yml`).

- `uses:` refs are unchanged, so `actions.lock` is untouched.
- The value matches hyperpolymath/standards#1315, which moves the estate
default to the same SHA.
- Once the standards callers are re-pinned past #1315 (a `gh
actions-lock` run), this input is redundant and should be dropped.

## Type of change

- [x] 🔧 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: aa34a4c…` 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.
- [x] I ran the project's own checks/tests locally and they pass
(actionlint; no Elixir change).
- [x] New files carry the correct SPDX (no new files).
- [x] Docs are updated, and no public claim now overstates what the code
does.
- [x] 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](https://claude.ai/code/session_01CYR5bf5FBLS7cXQK72aVNM)_

Co-authored-by: Claude <noreply@anthropic.com>
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
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