fix(ci): least-privilege workflow permissions + esbuild override - #16
Conversation
- add top-level permissions: contents: read to rust.yml, external-tests.yml, python.yml, and lua.yml — resolves all ten CodeQL 'Workflow does not contain permissions' alerts (#1-#10); these jobs only build/test, plus artifact upload and cache, which need no elevated scopes - pin esbuild to 0.27.2 via packages/package.json overrides: tsup's range (^0.27.0) currently resolves inside the GHSA-g7r4-m6w7-qqqr vulnerable range (0.27.3-0.28.0, dev-server arbitrary file read on Windows). Regenerated package-lock.json and bun.lock; npm audit is clean and fff-node tests/build pass on 0.27.2. Lift the override when a patched 0.28.1+ ships.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (5)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe pull request adds read-only contents permissions to four GitHub Actions workflows. It reformats the package workspace list and pins ChangesCI and package configuration
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to CI workflows now use read-only repository access, and workspace installs are pinned to esbuild 0.27.2. No merge-blocking production or user-impact risk is currently identified. Suggested reviewers: 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Linked Issues checkExplanation The directly linked issue [
✨ 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 |
CodeQL alerts resolved
#1–#10 — Workflow does not contain permissions (Medium): adds a top-level
permissions: contents: readto the four flagged workflows (rust.yml,external-tests.yml,python.yml,lua.yml). These workflows only build and test — artifact upload (actions/upload-artifact) andactions/cacherequire no elevated scopes — so least-privilegecontents: readis sufficient for every job.esbuild advisory (GHSA-g7r4-m6w7-qqqr, Low/Development):
tsup's esbuild range (^0.27.0) currently resolves to 0.27.3–0.28.0, the vulnerable window for the Windows dev-server arbitrary file read. Pinnedesbuild: 0.27.2viapackages/package.jsonoverridesand regenerated bothpackage-lock.json(used byexternal-tests.ymlvianpm ci) andbun.lock(used byoxc.ymlviabun install --frozen-lockfile), so neither install path picks the vulnerable range.Verification
npm auditinpackages/→ 0 vulnerabilitiesfff-nodetests: 30 + 6 pass;tsupbuild +tsctypes succeed on esbuild 0.27.2oxfmt --checkandoxlintclean on the refreshed bun.lockcontents: readNote
Lift the esbuild override when a patched release (
0.28.1+) ships — it's a one-line change inpackages/package.json.