Skip to content

chore(ci): harden - #521

Merged
alfetopito merged 1 commit into
mainfrom
ci-hardening
Aug 18, 2025
Merged

chore(ci): harden#521
alfetopito merged 1 commit into
mainfrom
ci-hardening

Conversation

@avivkeller

@avivkeller avivkeller commented Jul 31, 2025

Copy link
Copy Markdown
Contributor

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

  • Chores
    • Added automated dependency update configuration for GitHub Actions.
    • Updated GitHub Actions workflows to use specific, newer versions of actions for improved reliability and security.
    • Adjusted workflow settings to enhance credential management and maintain up-to-date integrations.

@avivkeller
avivkeller requested a review from a team as a code owner July 31, 2025 13:27
@vercel

vercel Bot commented Jul 31, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview Jul 31, 2025 1:29pm

@coderabbitai

coderabbitai Bot commented Jul 31, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

A 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

Cohort / File(s) Change Summary
Dependabot Configuration
.github/dependabot.yml
Added configuration to enable monthly Dependabot updates for GitHub Actions in the repository root.
Workflow: Add to Project
.github/workflows/add-to-project.yml
Updated actions/add-to-project from v0.3.0 to a specific commit SHA for version v1.0.2.
Workflow: CLA
.github/workflows/cla.yml
Updated actions/github-script and contributor-assistant/github-action to specific commit SHAs; added newline.
Workflow: Slack
.github/workflows/slack.yml
Updated actions/checkout and slackapi/slack-github-action to newer commit SHAs; set persist-credentials: false.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

Dependabot hops in, a vigilant hare,
Keeping our Actions updated with care.
Workflows refreshed, with SHAs in place,
Security and order—no bugs to chase!
In the warren of code, we leap and we bound,
With each little tweak, more stability’s found.
🐇✨

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
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ci-hardening

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (3)
.github/dependabot.yml (1)

1-6: Consider extending the Dependabot configuration for better triage & throughput

Nice initial config. Two small improvements keep noise under control while ensuring updates don’t go stale:

  1. Limit simultaneous PRs (e.g. open-pull-requests-limit: 5).
  2. 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 permissions

The step is now pinned – great.
Because the PAT is scoped generously, restrict the default GITHUB_TOKEN for 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 it

Without 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: false is good – add a matching minimal‐permissions block

Since 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: read

This prevents accidental write scope escalation while still letting gh pr list work.
No behavioural impact, just tighter security.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b9cb599 and 6930756.

📒 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 to v2.1.1 today – 👍.
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-action creates commits on cla-signatures. Ensure the PAT or default token used here owns contents: write on the target repo, or add:

permissions:
  contents: write

at job level. Otherwise signature PRs will error with 403.

Comment thread .github/workflows/cla.yml
@alfetopito
alfetopito merged commit 47bbea0 into main Aug 18, 2025
6 checks passed
@alfetopito
alfetopito deleted the ci-hardening branch August 18, 2025 14:50
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants