Run CI on fork pull requests#185
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
WalkthroughThe lint workflow's ChangesLint workflow fork guards removal
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Suggested reviewers
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)
Comment |
averyjennings
left a comment
There was a problem hiding this comment.
Approve — no blockers.
This removes the three job-level if: fork guards from .github/workflows/lint.yml, restoring ShellCheck/Completions/BATS coverage for fork PRs. Verified it's a clean, intentional revert of #179's lint.yml change (the PR blob matches the exact pre-#179 version; #179's commit 828413f added precisely these three lines), not a stale-snapshot regression.
The security reasoning in the description holds up under inspection:
- The workflow triggers on plain
pull_request, notpull_request_target— so fork runs get no repository secrets and a read-onlyGITHUB_TOKEN.permissions: read-allenforces read-only regardless. lint.ymlreferences no secrets at all. The only secret-bearing workflow,homebrew.yml(HOMEBREW_TAP_TOKEN), triggers solely onreleaseandworkflow_dispatch— neither reachable from a fork PR.- The three jobs only checkout, install tooling, and run linters/tests on an ephemeral runner. Residual risk is runner compute abuse, already covered by GitHub's contributor-approval gate (and the stricter "Require approval for all outside collaborators" setting noted in the description if you want it).
This is a strict improvement: previously the skipped jobs reported neutral/green, so fork PRs like #183 merged with zero real CI coverage. Now those checks actually run.
Partial revert of #179, which skipped all CI jobs for fork PRs. Since then every external contribution merges with zero ShellCheck/BATS coverage — #183 came from a fork and showed green with only the CodeRabbit check, so I had to run the suite locally before merging.
The secret-exposure concern in #179 doesn't apply to this workflow. lint.yml runs on plain
pull_request, and GitHub never passes repository secrets to fork-PRpull_requestruns and hands them a read-onlyGITHUB_TOKEN. That risk is specific topull_request_target, which we don't use. The only secret-bearing workflow (homebrew.yml,HOMEBREW_TAP_TOKEN) triggers onreleaseandworkflow_dispatch, neither reachable from a fork PR.What remains is runner compute abuse, and GitHub's built-in approval gate already covers it: first-time contributors need a maintainer to click "Approve and run" before any workflow executes. If we want that for every outside contributor, it's Settings → Actions → General → "Require approval for all outside collaborators", no workflow changes needed.
cc @harjotgill since #179 was yours — happy to adjust if there's a threat model here I'm missing.
Summary by CodeRabbit