chore(ci): harden - #521
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
WalkthroughA new Dependabot configuration was introduced to manage GitHub Actions updates on a monthly schedule. Additionally, four GitHub Actions workflow files were updated to use more specific and recent action versions, switching from version tags to commit SHAs. Minor configuration tweaks were also applied for improved security. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. ✨ Finishing Touches🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (3)
.github/dependabot.yml (1)
1-6: Consider extending the Dependabot configuration for better triage & throughputNice initial config. Two small improvements keep noise under control while ensuring updates don’t go stale:
- Limit simultaneous PRs (e.g.
open-pull-requests-limit: 5).- Auto-label Dependabot PRs (e.g.
labels: [“dependencies”, “github-actions”]).schedule: interval: monthly + open-pull-requests-limit: 5 + labels: + - dependencies + - github-actions.github/workflows/add-to-project.yml (1)
13-17: Harden the workflow further by declaring explicit job-level permissionsThe step is now pinned – great.
Because the PAT is scoped generously, restrict the defaultGITHUB_TOKENfor the rest of the job to the minimum:add-to-project: + permissions: + issues: write # needed by actions/add-to-project + contents: read # default, keep if other steps need itWithout this, the token retains the broad default (
contents: read) which is fine, but being explicit aligns with GitHub’s security-hardening guidance for reusable workflows.
No functional change, just extra defence-in-depth..github/workflows/slack.yml (1)
11-15:persist-credentials: falseis good – add a matching minimal‐permissions blockSince the job only reads repository metadata and pushes to Slack, it can run with a very narrow token:
send-reminder: runs-on: ubuntu-latest + permissions: + pull-requests: read + contents: readThis prevents accidental write scope escalation while still letting
gh pr listwork.
No behavioural impact, just tighter security.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
.github/dependabot.yml(1 hunks).github/workflows/add-to-project.yml(1 hunks).github/workflows/cla.yml(2 hunks).github/workflows/slack.yml(2 hunks)
🔇 Additional comments (2)
.github/workflows/slack.yml (1)
37-37: Confirm pinned SHA matches the documented tag
91efab1…corresponds tov2.1.1today – 👍.
Please double-check the commit on each bump; Slack’s action history occasionally rewrites tags. Dependabot will flag drifts, but manual vigilance keeps surprises away..github/workflows/cla.yml (1)
27-28: Double-check repository write permissions for CLA Assistant
contributor-assistant/github-actioncreates commits oncla-signatures. Ensure the PAT or default token used here ownscontents: writeon the target repo, or add:permissions: contents: writeat job level. Otherwise signature PRs will error with 403.
This PR hardens the CI by explicitly pinning all GitHub actions to their exact commit SHAs. Additionally, it enables Dependabot for future upgrades + security alerts.
Summary by CodeRabbit