Skip to content

Set cache-mode: read on reusable workflow calls from low-trust triggers - #16

Open
roryabraham wants to merge 1 commit into
mainfrom
rory/actionlint-cache-mode
Open

roryabraham wants to merge 1 commit into
mainfrom
rory/actionlint-cache-mode

Conversation

@roryabraham

Copy link
Copy Markdown

Details

kjanat/actionlint (the fork we are switching our workflow lint to, Expensify/Expensify#678960) adds a cache-call-unrestricted check that the rhysd/actionlint v1.7.11 we run today does not have. It 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.

This sets cache-mode: read on 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-mode is not in the schema of the actionlint version the org ruleset runs today, so the current check fails this PR with unexpected 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/actionlint v1.17.0 against the changed workflow(s); the cache-call-unrestricted finding is gone and no new findings were introduced.

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.
@github-actions

github-actions Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@roryabraham

Copy link
Copy Markdown
Author

Holding for Expensify/GitHub-Actions#113. cache-mode is not in the schema of the actionlint version the org ruleset runs today, so this fails the check until that bump merges. Please merge this immediately after it lands.

@roryabraham
roryabraham marked this pull request as ready for review September 22, 2026 15:57
@roryabraham

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

exfy-clabot Bot added a commit to Expensify/CLA that referenced this pull request Sep 22, 2026
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