ci(api-docs): disable uv cache to close cache-poisoning alert (#44)#48
Conversation
zizmor/cache-poisoning alert #44 fires on the setup-uv step in api-docs.yml because the workflow triggers on `push.tags: 'v*'` and setup-uv@v6 enables GitHub Actions caching by default. An actor with permission to push tags could populate the cache, which other runs across the org could then restore. The docs generation runs once per release tag, so cache hits don't justify the exposure. Disable caching with `enable-cache: false`. Source-of-truth template at resq-software/docs:automation/source-repo-templates/api-docs.python.yml should receive the same change so the next sync doesn't reintroduce the default-cached step.
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe ChangesAPI Docs Workflow Cache Configuration
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Summary
Closes code-scanning alert https://github.com/resq-software/pypi/security/code-scanning/44 —
zizmor/cache-poisoningon.github/workflows/api-docs.yml:99.Why this fires
api-docs.ymltriggers onpush.tags: 'v*'. Theastral-sh/setup-uv@v6step has GitHub Actions caching enabled by default. An actor able to push tags (legitimately or via a forced/spoofed tag) can populate the runner cache; subsequent runs across the org can then restore from a poisoned cache.Fix
Set
enable-cache: falseon theInstall uvstep. The docs generation runs once per release tag, so cache hits don't justify the exposure.Follow-up (separate repo)
The header of
api-docs.ymldeclaresresq-software/docs:automation/source-repo-templates/api-docs.python.ymlas the source-of-truth template. Apply the sameenable-cache: falsechange there so the next sync doesn't reintroduce the default-cached step. Tracking that as a follow-up; not in this PR's scope (different repo).Validation
Test plan
cache-poisoningonapi-docs.yml:99fixedautomaticallyresq-software/docs:automation/source-repo-templates/api-docs.python.ymlSummary by CodeRabbit