Block fork pull request workflow jobs#26
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Central YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
📜 Recent review details🧰 Additional context used🔀 Multi-repo context coderabbitai/bitbucket::shell summary inspected workflows in coderabbitai/bitbucket:: Findings:
Conclusion: The repository contains a pull_request workflow that injects repository secrets into the job environment and currently lacks a head-repo equality guard — so the PR change (adding checks to skip fork PR jobs) is directly relevant and would reduce risk. [::coderabbitai/bitbucket:: .github/workflows/node.js.yaml] 🔇 Additional comments (2)
📝 WalkthroughWalkthroughTwo GitHub Actions workflows add conditional guards to prevent job execution from cross-repository pull requests and unnecessary triggers. The renovate job now checks PR existence and head repository before evaluating the dependencies label. The CI build job restricts execution to direct pushes or same-repository pull requests. ChangesWorkflow Job Execution Conditions
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
Summary
Why
Public fork pull requests can run attacker-controlled workflow code. Skipping those jobs prevents those pull requests from reaching repository secrets through GitHub Actions.
Validation
yq e '.'.Summary by CodeRabbit