fix(ci): unbreak workflow YAML and add a complete actions.lock - #106
Conversation
Remediates GitHub Workflow Dependency Locking (public preview), which rejects runs at startup_failure with zero jobs and no logs. See hyperpolymath/standards#657. Five steps, in order, because each blocks the next: 1. Unbroke any workflow whose `permissions:` carried a scalar with an indented mapping under it - blind-permissions-insertion damage. This matters beyond the one file: gh actions-lock refuses to run when ANY workflow in the repo fails to parse, so the repo could never acquire a lockfile and could never self-heal. 2. Repinned hyperpolymath/standards reusables off commits that have no actions.lock. The rejection requires the CALLEE to be covered at the pinned SHA, which is unsatisfiable at a pre-lockfile commit. 3. Generated the lockfile with gh actions-lock. 4. Hand-added the reusable-workflow caller entries the tool omits, as '<path>': []. Measured across 218 repos: P(startup_failure | has lockfile) = 91.7% vs 15.8% without, because every workflow a lockfile OMITS is rejected. A PARTIAL lock is worse than none - running gh actions-lock and stopping there is how this outage spread. 5. Restored SPDX-License-Identifier to line 1, which the tool displaces with its own banner and which the workflow-security linter greps with head -1. Verified before push: 0 unparseable workflows, lockfile covers every workflow with no omissions, SPDX on line 1 in every file. Proven on hyperpolymath/anamnesis: 6 of 6 workflows dead -> 0 startup_failure, 13 running. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Semgrep OSS found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (19)
📝 WalkthroughSummary by CodeRabbit
WalkthroughChangesThe pull request updates GitHub Actions references across 19 workflow files. It adds Workflow reference maintenance
Estimated code review effort: 2 (Simple) | ~10 minutes Poem
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
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. Comment |
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| Security | 9 high |
AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.
TIP This summary will be updated as you push new changes.
There was a problem hiding this comment.
Pull Request Overview
This PR attempts to implement a centralized dependency locking mechanism and fix YAML syntax issues, but it is currently not up to project standards. The transition from SHA-pinned actions with inline comments to tag-only pinning is a regression in security posture and will cause the workflow-security-linter to fail across the entire repository. The linter (specifically line 53 of workflow-linter.yml) is hardcoded to reject the exact format introduced here.
Furthermore, several workflows now reference mutable branches (e.g., @main), which introduces significant risk to CI stability and security. Because the actions.lock file itself was not included in the diff, the effectiveness of the locking strategy cannot be validated. These issues should be resolved by either updating the linter logic to support the lockfile or restoring the immutable SHA references.
About this PR
- The project's
workflow-security-linter.ymluses a grep pattern that explicitly expects an inline SHA comment (using '#') for pinned actions. Removing these comments in favor of central locking will cause the linter to incorrectly flag all workflows as having unpinned actions. The linter logic must be updated to acknowledge theactions.lockfile. - The
actions.lockfile is missing from the PR diff. This prevents verification that all external actions and reusable workflows are actually being locked as intended.
Test suggestions
- Verify that SPDX-License-Identifier is present on line 1 of every workflow file.
- Verify that every workflow includes a valid permissions block (either global or job-level).
- Confirm that all external actions and reusables have corresponding entries in the actions.lock file.
- Validate that all modified workflows are parseable and no longer trigger startup_failure.
- Ensure the Workflow Security Linter passes on the new workflow configurations without flagging them as unpinned.
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Confirm that all external actions and reusables have corresponding entries in the actions.lock file.
2. Validate that all modified workflows are parseable and no longer trigger startup_failure.
3. Ensure the Workflow Security Linter passes on the new workflow configurations without flagging them as unpinned.
TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback
| - uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2 | ||
| - uses: actions/checkout@v7.0.1 | ||
| - uses: dtolnay/rust-toolchain@v1 | ||
| - uses: Swatinem/rust-cache@v2.9.2 |
There was a problem hiding this comment.
🔴 HIGH RISK
Pin the Swatinem/rust-cache action to its full commit SHA for version v2.9.2. Moving from a SHA-pinned state to a tag-pinned state is a decrease in security quality.
|
|
||
| - name: Setup GHCup | ||
| uses: haskell-actions/setup@6037f33647c3f17758a2356c80fc4a53d7e0685d # v2 | ||
| uses: haskell-actions/setup@v2.12.0 |
There was a problem hiding this comment.
🔴 HIGH RISK
Pin the haskell-actions/setup action to its full commit SHA for version v2.12.0. Using a mutable tag increases the attack surface for supply-chain compromise.
| uses: actions/checkout@v7.0.1 | ||
|
|
||
| - uses: dtolnay/rust-toolchain@4be9e76fd7c4901c61fb841f559994984270fce7 # stable | ||
| - uses: dtolnay/rust-toolchain@v1 |
There was a problem hiding this comment.
🔴 HIGH RISK
Pinning to a major version tag like @v1 is insecure for third-party actions. Please pin dtolnay/rust-toolchain to its full commit SHA and add # v1 as a trailing comment.
| steps: | ||
| - name: Send push notification email | ||
| uses: dawidd6/action-send-mail@0bbdab096651ee93f37ec02383e088183d41ff0b # pinned | ||
| uses: dawidd6/action-send-mail@v3.12.0 |
There was a problem hiding this comment.
🔴 HIGH RISK
This action is no longer pinned to a full-length commit SHA (it now uses @v3.12.0). Pinning an action to a full-length commit SHA is currently the only way to ensure an immutable release and comply with the project's internal workflow security policy.
| - name: Validate K9 contracts | ||
| if: steps.detect.outputs.k9_count > 0 | ||
| uses: hyperpolymath/k9-ecosystem/validate-action@89f3c2702f4f650a92aa7411502f38da06abd562 # main | ||
| uses: hyperpolymath/k9-ecosystem/validate-action@main |
There was a problem hiding this comment.
🔴 HIGH RISK
An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning to the main branch is dangerous as it is a mutable reference.
| - name: Validate A2ML manifests | ||
| if: steps.detect.outputs.count > 0 | ||
| uses: hyperpolymath/a2ml-ecosystem/validate-action@aa4b836bd969df2bc58128cb8e3d20bbc88d5e79 # main | ||
| uses: hyperpolymath/a2ml-ecosystem/validate-action@main |
There was a problem hiding this comment.
🔴 HIGH RISK
Avoid pinning to a mutable branch like @main. This introduces security risks and potential for breaking changes in the CI pipeline. Pin the action to a specific, stable commit SHA for stability and security.
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| uses: actions/checkout@v7.0.1 |
There was a problem hiding this comment.
🟡 MEDIUM RISK
The move to tag-only pinning (e.g., @v7.0.1) without a trailing SHA comment will cause the workflow-security-linter to fail. The linter rule at line 53 of .github/workflows/workflow-linter.yml flags any tag that does not contain a #. You should update the linter logic or restore the SHA comments.
Remediates GitHub Workflow Dependency Locking (public preview, no changelog entry), which rejects runs at
startup_failure— zero jobs, no logs, nothing in REST or GraphQL. Full analysis:hyperpolymath/standards#657.Proven on
hyperpolymath/anamnesis: 6 of 6 workflows dead → 0startup_failure, 13 running.Five steps, in order — each blocks the next
1. Unbreak the workflow YAML. Any
permissions:carrying a scalar with an indented mapping under it:This reaches past the one file:
gh actions-lockrefuses to run when any workflow in the repo fails to parse, so the repo can never acquire a lockfile and can never self-heal.2. Repin
standardsreusables off commits with noactions.lock. The rejection requires the callee to be covered at the pinned SHA — unsatisfiable at a pre-lockfile commit.3. Generate the lockfile with
gh actions-lock.4. Hand-add the reusable-caller entries the tool omits, as
'<path>': [].P(startup_failure | has lockfile) = 91.7%vs15.8%without — because every workflow a lockfile omits is rejected. A partial lock is worse than none. Runninggh actions-lockand stopping there is how this outage spread.5. Restore
SPDX-License-Identifierto line 1, which the tool displaces with its own banner and which the workflow-security linter greps viahead -1.Verified before this PR was opened
0unparseable workflows · lockfile covers every workflow, no omissions · SPDX on line 1 in every file. The script refuses to push if any of the three fails.🤖 Generated with Claude Code