Skip to content

fix(governance): verify reusable workflow locks - #696

Merged
hyperpolymath merged 2 commits into
mainfrom
fix/actions-lock-reusable-verification
Aug 29, 2026
Merged

fix(governance): verify reusable workflow locks#696
hyperpolymath merged 2 commits into
mainfrom
fix/actions-lock-reusable-verification

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Closes #695.

Outcome

The Standards actions-lock wrapper now recognizes the exact caller-side dependency shape GitHub requires for cross-repository reusable workflows, without weakening ordinary stale-entry detection.

Safety boundary

Only a stale finding is eligible, and only when the finding's own workflow file contains an exact owner/repo/.github/workflows/file@ref call that normalizes to the reported owner/repo@ref dependency. A different ref, other category, malformed JSON, or genuinely unused dependency remains blocking.

Verification

  • bash -n scripts/update-actions-lock.sh scripts/tests/actions-lock-update-test.sh
  • shellcheck scripts/update-actions-lock.sh scripts/tests/actions-lock-update-test.sh
  • bash scripts/tests/actions-lock-update-test.sh
    • exact reusable dependency passes;
    • wrong reusable ref fails;
    • rollback and workflow-byte restoration regressions pass.
  • bash scripts/tests/check-trusted-base-test.sh (PASS=13 FAIL=0)
  • Applied the wrapper to Ephapax's real manual transitive entry: accepted the exact rust-ci.yml -> standards@6b38eb... dependency.
  • git diff --check

The remaining end-to-end acceptance control is the Ephapax PR/push run: Rust CI must create jobs rather than a zero-job startup_failure.

@coderabbitai

coderabbitai Bot commented Aug 29, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 7 minutes.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 8e4b033f-6c21-48a9-aeaa-f813db0cc213

📥 Commits

Reviewing files that changed from the base of the PR and between 6b38eb5 and 4ed2cef.

📒 Files selected for processing (2)
  • scripts/tests/actions-lock-update-test.sh
  • scripts/update-actions-lock.sh

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 29, 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

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

Although the PR is marked as 'up to standards' by Codacy, the review reveals critical logical contradictions in the test suite that undermine confidence in the fix. Specifically, the test for 'reusable-exact' matches is set up with a failing mock status yet asserts success, indicating the test may be producing false positives.

Additionally, there is a lack of verification for the 'Safety boundary' requirement. The PR description explicitly states that only 'stale' findings should pass, but there are no test cases to confirm that 'missing' or 'invalid' findings are still blocked. The implementation details in scripts/update-actions-lock.sh are also missing from the review context, preventing a full validation of the normalization logic.

About this PR

  • The changes to scripts/update-actions-lock.sh are not visible in this diff, which makes it impossible to verify the implementation of the normalization logic or the safety constraint ensuring only 'stale' findings are bypassed.
  • The test suite lacks scenarios to verify that findings with categories other than 'stale' (e.g., missing, invalid) are still blocked as required by the safety boundary specifications.

Test suggestions

  • Exact reusable-workflow dependency match (normalized) is accepted
  • Reusable-workflow with mismatched git ref is blocked
  • Finding with category other than 'stale' is blocked even if ref matches
  • Handling of malformed JSON findings
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Finding with category other than 'stale' is blocked even if ref matches
2. Handling of malformed JSON findings

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

Comment thread scripts/tests/actions-lock-update-test.sh
Comment thread scripts/tests/actions-lock-update-test.sh
@hyperpolymath
hyperpolymath force-pushed the fix/actions-lock-reusable-verification branch from a01d080 to d8814e4 Compare August 29, 2026 13:37
@hyperpolymath
hyperpolymath force-pushed the fix/actions-lock-reusable-verification branch from d8814e4 to 4ed2cef Compare August 29, 2026 13:39
@sonarqubecloud

Copy link
Copy Markdown

@hyperpolymath
hyperpolymath merged commit 571cc73 into main Aug 29, 2026
47 checks passed
@hyperpolymath
hyperpolymath deleted the fix/actions-lock-reusable-verification branch August 29, 2026 13:41
hyperpolymath added a commit to hyperpolymath/ephapax that referenced this pull request Aug 29, 2026
## Problem

Ephapax Rust CI has produced only zero-job `startup_failure` runs across
the measured latest 20-run history. The called Standards reusable is
valid and its action commits resolve, but `gh actions-lock` v0.1.6 does
not model cross-repository reusable-workflow dependencies. Ephapax's
caller lock therefore omitted the reusable and its transitive action
evidence.

## Change

- Record the exact immutable Standards revision under each caller
workflow.
- Record the union of transitive action SHAs from the six called
Standards reusables.
- Preserve Ephapax's direct local-job dependencies in `rust-ci.yml`.

The dependency shape follows the already-proven Chronicles remediation
recorded in standards#573. It does not change workflow source or broaden
permissions.

## Verification

- All referenced action commits and the Standards commit resolve through
GitHub.
- All 15 Ephapax workflows pass Actionlint, excluding only two
pre-existing `SC2129` style notices in Rust summary blocks.
- The patched Standards verifier in hyperpolymath/standards#696 accepts
the exact reusable path/ref while retaining a failing wrong-ref control.

## Landing order

This PR is intentionally stacked on hyperpolymath/standards#696. After
that source fix merges, this lock entry and all six workflow callers
will be repinned to its exact merge SHA. The required end-to-end control
is a Rust CI run with real jobs, followed by a green post-merge push
run.
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.

Accept exact reusable-workflow dependencies in actions-lock verification

1 participant