fix(ci): unbreak the workflow YAML, then add a COMPLETE actions.lock - #83
Conversation
Pilot for the estate remediation of GitHub's Workflow Dependency Locking.
Four steps, in this order, because each blocks the next.
1. workflow-linter.yml was UNPARSEABLE:
permissions: read-all
actions: read <- mapping indented under a scalar
This is blind-permissions-insertion damage. Consequence beyond the one
file: `gh actions-lock` refuses to run at all when ANY workflow in the
repo fails to parse, so the repo can never acquire a lockfile, so every
workflow needing one stays dead. One broken file kills the repo.
2. Generated the lockfile with gh actions-lock v0.1.6.
3. The generated lockfile was PARTIAL - 10 of 15 workflows. The five it
omitted are exactly the reusable-workflow callers (governance,
hypatia-scan, mirror, scorecard, secret-scanner); the tool does not
emit entries for them. Hand-added each as '<path>': [].
This matters estate-wide: a PARTIAL lock is worse than none. Measured
across 218 repos, P(startup_failure | has lock) = 91.7% vs 15.8%
without, because every workflow the lock OMITS is rejected. Running
gh actions-lock and stopping there is how 55 repos got into that state.
4. The tool restamps its own banner ABOVE line 1, displacing the SPDX
header, which the workflow-security linter greps with head -1.
Restored SPDX to line 1 in 14 files; main-estate-audit.yml had none at
all, so one was authored (MPL-2.0, Rule 1 default - new file header,
not a relicensing, so LICENCE-POLICY A2 is not engaged).
Verified before pushing: 0 unparseable workflows, SPDX on line 1 in
15/15, lockfile covers 15/15 with no omissions.
Follows the callee repin in #82, which removed the other half of the
rejection (the standards reusable at a pre-lockfile SHA).
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
|
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 (15)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe pull request updates GitHub Actions references across multiple workflows, adds ChangesWorkflow maintenance
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 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 | 3 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 addresses workflow syntax errors and introduces an actions.lock file to manage dependency pinning. While the YAML structure is now valid and SPDX headers are standardized, the repository is currently not up to standards according to Codacy analysis.
A critical gap exists: the 'Check pinned actions' step in the security linter will fail because it is not configured to recognize the actions.lock strategy. It currently flags any version tag that lacks a trailing SHA comment as a security violation. Furthermore, several actions handling sensitive credentials (SMTP and repository tokens) are still using mutable version tags in the workflow files, which should be pinned to immutable commit SHAs to ensure supply-chain security.
About this PR
- The repository's custom security linter logic specifically flags version tags that lack a trailing comment. Since this PR removes those comments in favor of an actions.lock file, the 'Check pinned actions' linter step will trigger failures for every updated workflow. The linter logic must be updated to exempt files managed by the actions-lock header.
Test suggestions
- Verify workflow-linter.yml and all updated workflows are valid YAML
- Verify SPDX header is correctly placed on the first line of all 15 workflows
- Verify that actions.lock includes entries for reusable workflow callers
- Verify that the 'Check pinned actions' linter step passes with the new tag-pinned format
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Verify that the 'Check pinned actions' linter step passes with the new tag-pinned format
TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback
|
|
||
| - name: Setup GHCup | ||
| uses: haskell-actions/setup@cd0d9bdd65b20557f41bea4dbe43d0b5fbbfe553 # v2 | ||
| uses: haskell-actions/setup@v2.11.0 |
There was a problem hiding this comment.
🔴 HIGH RISK
To ensure a secure and reproducible build environment for your Haskell-based site, pin haskell-actions/setup to a full commit SHA.
| steps: | ||
| - name: Trigger Propagation | ||
| uses: peter-evans/repository-dispatch@28959ce8df70de7be546dd1250a005dd32156697 # v3 | ||
| uses: peter-evans/repository-dispatch@v4.0.1 |
There was a problem hiding this comment.
🔴 HIGH RISK
Pinning peter-evans/repository-dispatch to a SHA is necessary to protect the FARM_DISPATCH_TOKEN. Tags are mutable and do not guarantee that the code will not change in the future.
| steps: | ||
| - name: Send push notification email | ||
| uses: dawidd6/action-send-mail@12335b969ae3fb71bee5f2c6b829744261aec34c # pinned | ||
| uses: dawidd6/action-send-mail@v3.12.0 |
There was a problem hiding this comment.
🔴 HIGH RISK
This action handles your SMTP credentials and project data. Using a mutable version tag like v3.12.0 is insecure as it can be reassigned. Pinning to a full commit SHA ensures the code remains immutable.
| @@ -1,4 +1,5 @@ | |||
| # SPDX-License-Identifier: MPL-2.0 | |||
| # This workflow is managed by gh actions-lock. | |||
There was a problem hiding this comment.
🔴 HIGH RISK
This change removes the SHA comments that the security linter uses to verify pinned actions. Since you are moving to an actions.lock strategy, the linter's 'Check pinned actions' step will now flag these as unpinned. You should update the linter logic to exempt files that contain the header '# This workflow is managed by gh actions-lock.'
| 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
This update to a tag-pinned version without a trailing comment will trigger a failure in the 'Check pinned actions' step of this workflow, as the linter specifically looks for tags without comments to identify unpinned dependencies.




Pilot for the estate remediation of GitHub Workflow Dependency Locking. See
hyperpolymath/standards#657.Four steps, in this order, because each blocks the next.
1.
workflow-linter.ymlwas unparseable.Blind-
permissions:-insertion damage. The consequence reaches far 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, so every workflow that needs one stays dead. One broken file kills the repo.2. Generated the lockfile with
gh actions-lockv0.1.6.3. The generated lockfile was PARTIAL — 10 of 15. The five omitted are exactly the reusable-workflow callers; the tool emits no entries for them. Hand-added each as
'<path>': [].P(startup_failure | has lock) = 91.7%vs15.8%without — because every workflow the lock omits is rejected. Runninggh actions-lockand stopping there is how 55 repos got into that state.4. The tool restamps its banner above line 1, displacing the SPDX header that the workflow-security linter greps with
head -1. Restored in 14 files;main-estate-audit.ymlhad none at all, so one was authored (MPL-2.0, Rule 1 default — a new header, not a relicensing, so A2 is not engaged).Verified before pushing: 0 unparseable workflows · SPDX on line 1 in 15/15 · lockfile covers 15/15, no omissions.
Follows #82, which repinned the
standardscallee off a pre-lockfile SHA and removed the other half of the rejection.🤖 Generated with Claude Code