Set cache-mode: read on reusable workflow calls from low-trust triggers - #16
Open
roryabraham wants to merge 1 commit into
Open
roryabraham wants to merge 1 commit into
roryabraham wants to merge 1 commit into
Conversation
actionlint flags a reusable workflow call triggered by pull_request_target, issue_comment, or issues that sets no cache-mode, because the callee can then request cache writes despite the trigger's read-only default. These workflows only read the cache, so cap them at read. This key is only recognised by the actionlint fork pinned in Expensify/GitHub-Actions, so the current check reports it as an unexpected key until that bump lands. Merge this right after that PR.
Contributor
|
All contributors have signed the CLA ✍️ ✅ |
Author
|
Holding for Expensify/GitHub-Actions#113. |
roryabraham
marked this pull request as ready for review
September 22, 2026 15:57
Author
|
I have read the CLA Document and I hereby sign the CLA |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Details
kjanat/actionlint(the fork we are switching our workflow lint to, Expensify/Expensify#678960) adds acache-call-unrestrictedcheck that therhysd/actionlintv1.7.11 we run today does not have. It flags a reusable workflow call triggered bypull_request_target,issue_comment, orissuesthat sets nocache-mode, because the callee can then request cache writes despite the trigger's read-only default.This sets
cache-mode: readon those calls. The workflows involved only read the cache, so capping them at read loses nothing.Merge order
Do not merge this before the actionlint bump in
Expensify/GitHub-Actions.cache-modeis not in the schema of the actionlint version the org ruleset runs today, so the current check fails this PR withunexpected key "cache-mode". It passes under the fork. Merge it immediately after that PR lands.Related Issues
https://github.com/Expensify/Expensify/issues/678960
Manual Tests
Ran
kjanat/actionlintv1.17.0 against the changed workflow(s); thecache-call-unrestrictedfinding is gone and no new findings were introduced.