Skip to content

fix(ci): unbreak workflow YAML and add a complete actions.lock - #33

Merged
hyperpolymath merged 1 commit into
mainfrom
fix/workflow-dependency-locking
Aug 27, 2026
Merged

fix(ci): unbreak workflow YAML and add a complete actions.lock#33
hyperpolymath merged 1 commit into
mainfrom
fix/workflow-dependency-locking

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

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 → 0 startup_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:

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

This reaches 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 and can never self-heal.

2. Repin standards reusables off commits with no actions.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>': [].

⚠️ 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. Restore SPDX-License-Identifier to line 1, which the tool displaces with its own banner and which the workflow-security linter greps via head -1.

Verified before this PR was opened

0 unparseable 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

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>
@hyperpolymath
hyperpolymath merged commit 9067414 into main Aug 27, 2026
1 check failed
@hyperpolymath
hyperpolymath deleted the fix/workflow-dependency-locking branch August 27, 2026 05:40
@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: 661218a4-f299-4da5-9398-9400b5acff82

📥 Commits

Reviewing files that changed from the base of the PR and between dd5d7fc and 478d478.

⛔ Files ignored due to path filters (1)
  • .github/workflows/actions.lock is excluded by !**/*.lock
📒 Files selected for processing (25)
  • .github/workflows/boj-build.yml
  • .github/workflows/codeql.yml
  • .github/workflows/container-build.yml
  • .github/workflows/dependabot-automerge.yml
  • .github/workflows/dogfood-gate.yml
  • .github/workflows/estate-rules.yml
  • .github/workflows/governance.yml
  • .github/workflows/guix-policy.yml
  • .github/workflows/hypatia-scan.yml
  • .github/workflows/instant-sync.yml
  • .github/workflows/mirror.yml
  • .github/workflows/openssf-compliance.yml
  • .github/workflows/pages.yml
  • .github/workflows/push-email-notify.yml
  • .github/workflows/quality.yml
  • .github/workflows/release.yml
  • .github/workflows/rhodibot.yml
  • .github/workflows/runtime-policy.yml
  • .github/workflows/rust-ci.yml
  • .github/workflows/scorecard.yml
  • .github/workflows/secret-scanner.yml
  • .github/workflows/security-policy.yml
  • .github/workflows/static-analysis-gate.yml
  • .github/workflows/wellknown-enforcement.yml
  • .github/workflows/workflow-linter.yml

📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Updated automation and release tooling to newer action versions across build, testing, deployment, and notification workflows.
    • Standardised workflow action references and added consistent management markers.
    • Refreshed reusable checks for governance, security scanning, compliance, and policy validation.
    • Added required read permissions where needed for workflow integrations.
    • No changes were made to application features or validation logic.

Walkthrough

Changes

Workflow reference maintenance

Layer / File(s) Summary
Standard action references
.github/workflows/*.yml
Workflows add gh actions-lock markers and replace multiple SHA-pinned action references with version tags.
Reusable workflow revisions
.github/workflows/governance.yml, .github/workflows/hypatia-scan.yml, .github/workflows/mirror.yml, .github/workflows/rust-ci.yml, .github/workflows/scorecard.yml, .github/workflows/secret-scanner.yml
Reusable workflow commits are updated. Selected workflows add actions: read permission.
Action version upgrades
.github/workflows/codeql.yml, .github/workflows/instant-sync.yml, .github/workflows/release.yml, .github/workflows/static-analysis-gate.yml
Several actions move to newer version tags, including CodeQL, repository dispatch, release, setup-beam, and artifact actions.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Poem

A rabbit checks each workflow line,
Tags hop neatly into place.
SHA pins rest beneath the moon,
New actions run their steady race.
“gh actions-lock,” whispers the hare,
While YAML dreams in careful rows.


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

Not up to standards ⛔

🔴 Issues 5 high

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

Results:
5 new issues

Category Results
Security 5 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

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 remediates CI workflow failures and standardizes file structures, including the addition of a managed banner and SPDX license identifiers. However, the current implementation is not up to standards due to security risks.

A systemic issue was identified where actions are pinned to mutable tags (e.g., @v4.0.1) instead of full commit SHAs, exposing the workflows to supply chain vulnerabilities. Furthermore, in the scorecard workflow, job-level permission blocks override workflow-level settings, which will prevent the job from receiving the necessary 'actions: read' permission. These issues must be addressed to ensure the stability and security of the CI/CD pipeline.

About this PR

  • Several workflows have been updated to use mutable tags for third-party actions. To comply with security best practices and protect against supply chain attacks, all third-party actions should be pinned to a full-length commit SHA, with the version tag included only as a comment.

Test suggestions

  • Verify all modified workflows have the SPDX-License-Identifier on line 1 for security linter compatibility.
  • Verify 'actions: read' permission is added to workflows calling reusables to support dependency locking metadata.
  • Confirm every workflow contains the standard management banner.
  • Verify that versions for standard actions (like checkout, upload-artifact) are synchronized across files.

TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback

# path: artifacts/
- name: Create GitHub Release
uses: softprops/action-gh-release@3d0d9888cb7fd7b750713d6e236d1fcb99157228 # v2
uses: softprops/action-gh-release@v3.0.2

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔴 HIGH RISK

Pin this action to a full-length commit SHA. This is particularly important for the release workflow which has 'contents: write' permissions.

Try running the following prompt in your IDE agent:

Find the full commit SHA for 'softprops/action-gh-release' at version 'v3.0.2' and update line 134 in '.github/workflows/release.yml' to use the SHA.

See Issue in Codacy

id: beam
continue-on-error: true
uses: erlef/setup-beam@54075bcc5e249e4758d363f27d099f55d843f124 # v1.18.2
uses: erlef/setup-beam@v1.24.1

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔴 HIGH RISK

The setup-beam action should be pinned to a full commit SHA for security. Tags are mutable and can be pointed to different code over time.

Try running the following prompt in your IDE agent:

Find the full commit SHA for 'erlef/setup-beam' at version 'v1.24.1' and update line 128 in '.github/workflows/static-analysis-gate.yml' to use the SHA, adding '# v1.24.1' as a comment.

See Issue in Codacy

- name: Fetch Dependabot metadata
id: meta
uses: dependabot/fetch-metadata@25dd0e34f4fe68f24cc83900b1fe3fe149efef98 # v3.1.0
uses: dependabot/fetch-metadata@v3.1.0

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔴 HIGH RISK

Ensure this action is pinned to an immutable commit SHA. This prevents external changes to the action from executing in your privileged workflow.

Try running the following prompt in your IDE agent:

Find the full commit SHA for 'dependabot/fetch-metadata' at version 'v3.1.0' and update line 58 in '.github/workflows/dependabot-automerge.yml' to use that SHA, keeping 'v3.1.0' as a trailing comment.

See Issue in Codacy

steps:
- name: Send push notification email
uses: dawidd6/action-send-mail@0bbdab096651ee93f37ec02383e088183d41ff0b # pinned
uses: dawidd6/action-send-mail@v3.12.0

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔴 HIGH RISK

Use a full-length commit SHA for third-party actions to ensure the build remains immutable.

Try running the following prompt in your IDE agent:

Find the full commit SHA for 'dawidd6/action-send-mail' at version 'v3.12.0' and update line 19 in '.github/workflows/push-email-notify.yml' to use the SHA, adding '# v3.12.0' as a comment.

See Issue in Codacy

- name: Trigger Propagation
if: steps.gate.outputs.present == 'true'
uses: peter-evans/repository-dispatch@28959ce8df70de7be546dd1250a005dd32156697 # v3
uses: peter-evans/repository-dispatch@v4.0.1

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔴 HIGH RISK

Pinning to a tag instead of a commit SHA allows the underlying code to change without notice. Use the immutable commit SHA instead.

Try running the following prompt in your IDE agent:

Find the full commit SHA for 'peter-evans/repository-dispatch' at version 'v4.0.1' and update line 33 in '.github/workflows/instant-sync.yml' to use the SHA, adding '# v4.0.1' as a comment.

See Issue in Codacy

group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
actions: read

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 MEDIUM RISK

The job-level permissions block (lines 23-26) overrides the workflow-level permissions. To ensure the 'scorecard' job has 'actions: read' permission, it must be added directly to the job-level permissions block.

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