Skip to content

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

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#48
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 07e086a into main Aug 27, 2026
@hyperpolymath
hyperpolymath deleted the fix/workflow-dependency-locking branch August 27, 2026 12:30
@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: 90bbf8eb-c39e-4f3b-9fb4-a96e1877493c

📥 Commits

Reviewing files that changed from the base of the PR and between a9c0127 and f628f03.

⛔ Files ignored due to path filters (1)
  • .github/workflows/actions.lock is excluded by !**/*.lock
📒 Files selected for processing (16)
  • .github/workflows/CI.yml
  • .github/workflows/CompatHelper.yml
  • .github/workflows/Documenter.yml
  • .github/workflows/TagBot.yml
  • .github/workflows/boj-build.yml
  • .github/workflows/casket-pages.yml
  • .github/workflows/codeql.yml
  • .github/workflows/dependabot-automerge.yml
  • .github/workflows/dogfood-gate.yml
  • .github/workflows/governance.yml
  • .github/workflows/hypatia-scan.yml
  • .github/workflows/instant-sync.yml
  • .github/workflows/mirror.yml
  • .github/workflows/push-email-notify.yml
  • .github/workflows/scorecard.yml
  • .github/workflows/secret-scanner.yml

📝 Walkthrough

Summary by CodeRabbit

  • Maintenance

    • Updated automated workflow management metadata across the project.
    • Refreshed shared governance and security workflow references.
    • Improved workflow permissions for required read-only access.
  • Security

    • Updated supply-chain security checks.
    • Standardised secret scanning through the shared security scanning process.
  • Documentation

    • Removed duplicate workflow-management comments and tidied workflow headers.

Walkthrough

The pull request updates GitHub Actions management comments across workflow files. It also adds actions: read permissions to selected workflows and updates two reusable workflow commit pins.

Changes

GitHub Actions workflow maintenance

Layer / File(s) Summary
Workflow management headers
.github/workflows/*.yml
The workflows now contain consolidated or added gh actions-lock management comments. Duplicate comments and an extra blank line were removed where specified.
Workflow permissions and reusable references
.github/workflows/governance.yml, .github/workflows/scorecard.yml, .github/workflows/secret-scanner.yml
actions: read was added to the governance and secret-scanner permissions. The governance and Scorecards reusable workflow references now use commit 84355587cb2a1f86e6882de83514a32db2646e7a.

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

Poem

A rabbit checks each workflow line

Locks the headers neat and fine
Pins are fresh and permissions read
Duplicate comments leave instead
The CI burrow rests ahead

✨ 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

@github-actions

Copy link
Copy Markdown

🔍 Hypatia Security Scan

Findings: 28 issues detected

Severity Count
🔴 Critical 6
🟠 High 15
🟡 Medium 7

⚠️ Action Required: Critical security issues found!

View findings
[
  {
    "reason": "Action julia-actions/CompatHelper@v1 needs attention",
    "type": "unpinned_action",
    "file": "CompatHelper.yml",
    "action": "pin_sha",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in push-email-notify.yml",
    "type": "missing_timeout_minutes",
    "file": "push-email-notify.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Required file missing (condition: public_repo)",
    "type": "missing_requirement",
    "file": "SECURITY.md",
    "action": "create",
    "rule_module": "cicd_rules",
    "severity": "high"
  },
  {
    "reason": "No SECURITY.md found in Cliodynamics.jl",
    "type": "SecurityPolicy",
    "file": "/home/runner/work/Cliodynamics.jl/Cliodynamics.jl",
    "action": "auto_fix",
    "rule_module": "scorecard",
    "severity": "medium",
    "remediation": "Add SECURITY.md documenting how to report vulnerabilities.",
    "scorecard_check": "Security-Policy"
  },
  {
    "reason": "14 workflow(s) with tag-pinned (not SHA-pinned) actions in Cliodynamics.jl",
    "type": "DependencyPinning",
    "file": "/home/runner/work/Cliodynamics.jl/Cliodynamics.jl",
    "action": "auto_fix",
    "rule_module": "scorecard",
    "severity": "medium",
    "remediation": "Pin GitHub Actions and Docker base images by SHA hash.",
    "scorecard_check": "Pinned-Dependencies"
  },
  {
    "reason": "Code scanning (Hypatia): hypatia/workflow_audit/missing_timeout_minutes -- Hypatia workflow_audit: missing_timeout_minutes -- 63 day(s) old [STALE]",
    "type": "CSA001",
    "file": "push-email-notify.yml",
    "action": "update",
    "rule_module": "code_scanning_alerts",
    "severity": "medium"
  },
  {
    "reason": "Code scanning (Scorecard): TokenPermissionsID -- Token-Permissions -- 74 day(s) old [STALE]",
    "type": "CSA001",
    "file": ".github/workflows/hypatia-scan.yml",
    "action": "escalate",
    "rule_module": "code_scanning_alerts",
    "severity": "high"
  },
  {
    "reason": "Code scanning (Scorecard): TokenPermissionsID -- Token-Permissions -- 74 day(s) old [STALE]",
    "type": "CSA001",
    "file": ".github/workflows/dependabot-automerge.yml",
    "action": "escalate",
    "rule_module": "code_scanning_alerts",
    "severity": "high"
  },
  {
    "reason": "Code scanning (Scorecard): TokenPermissionsID -- Token-Permissions -- 74 day(s) old [STALE]",
    "type": "CSA001",
    "file": ".github/workflows/TagBot.yml",
    "action": "escalate",
    "rule_module": "code_scanning_alerts",
    "severity": "high"
  },
  {
    "reason": "Code scanning (Scorecard): TokenPermissionsID -- Token-Permissions -- 74 day(s) old [STALE]",
    "type": "CSA001",
    "file": ".github/workflows/Documenter.yml",
    "action": "escalate",
    "rule_module": "code_scanning_alerts",
    "severity": "high"
  }
]

Powered by Hypatia Neurosymbolic CI/CD Intelligence

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

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

The PR successfully implements dependency pinning for several workflows and introduces an actions.lock file; however, it introduces a critical syntax error in the Scorecards workflow. The analysis job in .github/workflows/scorecard.yml specifies both a reusable workflow (uses) and a steps block, which are mutually exclusive in GitHub Actions. This will prevent the CI from running successfully.

Additionally, there is a discrepancy between the PR description and the changes provided: the description claims to fix malformed YAML involving scalar permissions, but no such changes are visible in the diff. Finally, a systemic redundancy has been introduced across all modified files where the management header comment is duplicated on consecutive lines. The syntax error in the Scorecards workflow must be addressed before merging.

About this PR

  • The PR description mentions fixing malformed YAML related to scalar permissions blocks (Step 1), but the diff does not show any instances where such structures were modified or corrected.
  • A redundant duplicate comment '# This workflow is managed by gh actions-lock.' has been added to the header of every modified workflow file (typically on both line 2 and line 3). This should be cleaned up systemically.

Test suggestions

  • Verify that all workflow YAML files are parseable after modification
  • Verify that SPDX headers are correctly placed on the first line
  • Verify that actions.lock covers all workflows and contains the specified manual entries
  • Verify that reusable workflows are pinned to specific SHAs
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Verify that all workflow YAML files are parseable after modification
2. Verify that SPDX headers are correctly placed on the first line
3. Verify that actions.lock covers all workflows and contains the specified manual entries
4. Verify that reusable workflows are pinned to specific SHAs

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

jobs:
analysis:
uses: hyperpolymath/standards/.github/workflows/scorecard-reusable.yml@81dbf2dd854b1444fd6236fa2352474383b2c2b9
uses: hyperpolymath/standards/.github/workflows/scorecard-reusable.yml@84355587cb2a1f86e6882de83514a32db2646e7a

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 'analysis' job is invalid because it contains both a job-level uses key (to call a reusable workflow) and a steps block. These properties are mutually exclusive in GitHub Actions. To fix this, either remove the steps block if the logic is contained in the reusable workflow, or move the uses call into a step if it was intended to be a local action step.

@@ -1,5 +1,6 @@
# SPDX-License-Identifier: MPL-2.0
# This workflow is managed by gh actions-lock.
# This workflow is managed by gh actions-lock.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚪ LOW RISK

Nitpick: This line is redundant as line 2 already contains the identical 'managed by gh actions-lock' banner.

Comment thread .github/workflows/CI.yml
@@ -1,5 +1,6 @@
# SPDX-License-Identifier: MPL-2.0
# This workflow is managed by gh actions-lock.
# This workflow is managed by gh actions-lock.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚪ LOW RISK

Nitpick: This header comment is duplicated. It appears on both line 2 and line 3, which is redundant. This suggests the version pinning tool may be misconfigured or was run repeatedly on the same file.

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