fix(governance): honor native actions lock resolution - #686
Conversation
Signed-off-by: Jonathan D.A. Jewell <6759885+hyperpolymath@users.noreply.github.com>
|
Warning Review limit reachedNext included review available in 35 minutes. View limit detailsLimit 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. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
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 |
|
Up to standards ✅🟢 Issues
|
|
Follow-up probe with the authoritative tool confirms the source fix. In an isolated worktree at Oikos commit |
There was a problem hiding this comment.
Pull Request Overview
The PR successfully implements the logic to prioritize actions.lock as the authoritative source for action immutability, which should resolve startup failures caused by redundant SHA-pinning requirements. Codacy analysis indicates the changes are up to standards with no new quality issues or complexity regressions.
However, there are no automated test scenarios included in this PR to verify the branch logic for repositories with or without lockfiles. Additionally, the implementation includes a side-effect: actions/github-script has been added to the SHA-pinning exclusion list. This change is not documented in the PR description and should be clarified to ensure it aligns with governance requirements.
About this PR
- There are no new or updated automated tests to verify the logic changes for repositories with vs. without 'actions.lock' files.
- The addition of 'actions/github-script' to the exclusion list is undocumented. Please confirm if this was intended to be part of this PR's scope.
2 comments outside of the diff
.github/workflows/governance-reusable.yml
line 1154⚪ LOW RISK
Suggestion: The addition of 'actions/github-script' to the exclusion list is not mentioned in the PR description. If this is intentional, it should be documented as it permits unpinned references to this action even without a lockfile.
line 1157-1160⚪ LOW RISK
Nitpick: The indentation of these echo statements is inconsistent with the rest of the block. Aligning them with the surrounding commands improves readability.echo " Prefer \`gh actions-lock\` — it also locks the transitive dependencies" echo " of composite actions, which an inline SHA cannot express." echo " Do NOT do both: gh actions-lock refuses a ref no tag or branch contains," echo " so inline pinning REMOVES actions from the lockfile."
Test suggestions
- Verify linter success in a repository with 'actions.lock' and tag-based (non-SHA) action references.
- Verify linter failure in a repository without 'actions.lock' when using tag-based action references.
- Verify linter success in a repository without 'actions.lock' when using 40-hex SHA pins.
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Verify linter success in a repository with 'actions.lock' and tag-based (non-SHA) action references.
2. Verify linter failure in a repository without 'actions.lock' when using tag-based action references.
3. Verify linter success in a repository without 'actions.lock' when using 40-hex SHA pins.
TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback



Outcome
Removes the contradictory requirement to combine
actions.lockwith raw direct-action SHAs. Repositories with a lockfile now use the authoritativegh actions-lockverification result; repositories without one still require direct 40-hex pins.Evidence
In hyperpolymath/oikosbot#78, converting locked version references to raw SHAs caused five workflows to be rejected with
startup_failurebefore any job was created. The same workflows previously executed through GitHub native lock resolution. This matchesgh actions-locksemantics: raw commits not contained by a tag or branch are omitted from the generated lock.Validation
scripts/tests/actions-lock-update-test.sh: 3/3 passscripts/check-workflow-duplicate-keys.sh .github/workflows: 44 files cleanbash -n scripts/check-action-pins-resolve.sh: passgit diff --check: passSigned-off-by: Jonathan D.A. Jewell j.d.a.jewell@open.ac.uk