Skip to content

fix(ci): unbreak the workflow YAML, then add a COMPLETE actions.lock - #83

Merged
hyperpolymath merged 1 commit into
mainfrom
fix/add-complete-actions-lock
Aug 27, 2026
Merged

fix(ci): unbreak the workflow YAML, then add a COMPLETE actions.lock#83
hyperpolymath merged 1 commit into
mainfrom
fix/add-complete-actions-lock

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

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.yml was unparseable.

permissions: read-all
  actions: read        # <- mapping indented under a scalar

Blind-permissions:-insertion damage. The consequence reaches far past the one file: gh actions-lock refuses 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-lock v0.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>': [].

⚠️ This is the estate-wide trap: 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 banner above line 1, displacing the SPDX header that the workflow-security linter greps with head -1. Restored in 14 files; main-estate-audit.yml had 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 standards callee off a pre-lockfile SHA and removed the other half of the rejection.

🤖 Generated with Claude Code

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>
@hyperpolymath
hyperpolymath merged commit 1804215 into main Aug 27, 2026
19 of 27 checks passed
@hyperpolymath
hyperpolymath deleted the fix/add-complete-actions-lock branch August 27, 2026 00:34
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
C Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@coderabbitai

coderabbitai Bot commented Aug 27, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 43b2b3c1-a4aa-4534-9e5b-b699584391a5

📥 Commits

Reviewing files that changed from the base of the PR and between 3932770 and 04c4dda.

⛔ Files ignored due to path filters (1)
  • .github/workflows/actions.lock is excluded by !**/*.lock
📒 Files selected for processing (15)
  • .github/workflows/boj-build.yml
  • .github/workflows/casket-pages.yml
  • .github/workflows/codeql.yml
  • .github/workflows/dogfood-gate.yml
  • .github/workflows/generator-generic-ossf-slsa3-publish.yml
  • .github/workflows/governance.yml
  • .github/workflows/hypatia-scan.yml
  • .github/workflows/instant-sync.yml
  • .github/workflows/main-estate-audit.yml
  • .github/workflows/mirror.yml
  • .github/workflows/pages.yml
  • .github/workflows/push-email-notify.yml
  • .github/workflows/scorecard.yml
  • .github/workflows/secret-scanner.yml
  • .github/workflows/workflow-linter.yml

📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Updated automated workflows to use current, clearly identified action versions.
    • Standardised workflow management markers across automation, security scanning, auditing, and deployment processes.
    • Improved workflow permission declarations for clearer access control.
    • Added licensing metadata where applicable.
    • No build, deployment, or job behaviour was changed.

Walkthrough

The pull request updates GitHub Actions references across multiple workflows, adds gh actions-lock management comments, adds one SPDX header, and makes workflow permissions explicit.

Changes

Workflow maintenance

Layer / File(s) Summary
Update action references
.github/workflows/*.yml
Third-party actions now use release tags instead of commit SHA references. Updated actions include checkout, CodeQL, Pages, caching, setup, repository dispatch, and email notification actions.
Add workflow metadata and permissions
.github/workflows/*.yml
Management comments were added to workflows. main-estate-audit.yml now has an SPDX header. workflow-linter.yml now grants explicit contents: read and actions: read permissions.

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

Suggested reviewers: metadatastician

Poem

A rabbit checked each workflow line

Tags replaced the hashes fine
Management notes now mark the way
Read permissions guard the day
Hop, hop, shipped without delay

✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch

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.

@gitar-bot

gitar-bot Bot commented Aug 27, 2026

Copy link
Copy Markdown

Important

You are using the Gitar free plan. Upgrade to unlock code review, CI analysis, auto-apply, custom automations, and more.

Gitar

@codacy-production

Copy link
Copy Markdown
Contributor

Not up to standards ⛔

🔴 Issues 3 high

Alerts:
⚠ 3 issues (≤ 0 issues of at least minor severity)

Results:
3 new issues

Category Results
Security 3 high

View in Codacy

AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes.

@codacy-production codacy-production Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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.

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.

1 participant