ci: harden CI/CD pipeline security#58
Open
ryanrishi wants to merge 1 commit into
Open
Conversation
- Pin all GitHub Actions to commit SHAs in CI workflow - Add top-level permissions: contents: read to CI - Add repository owner guard to deploy workflow - Add github-actions ecosystem to dependabot - Add --exclude-newer quarantine (2-day) to uv sync in CI Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR hardens the repository’s CI/CD posture by tightening GitHub Actions supply-chain security and minimizing default token permissions, while adding a Dependabot configuration to keep pinned actions up to date.
Changes:
- Pin GitHub Actions in the CI workflow to specific commit SHAs and add top-level least-privilege
permissions: contents: read. - Add a 2-day package “quarantine” to CI installs by applying
uv sync --exclude-newerwith a computed cutoff timestamp. - Prevent deploy workflow job execution outside the upstream org by guarding jobs with
if: github.repository_owner == 'twilio', and enable Dependabot updates forgithub-actions.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
.github/workflows/deploy.yml |
Adds an org-owner guard to prevent fork-triggered deploy workflow execution. |
.github/workflows/ci.yml |
Pins actions to SHAs, restricts workflow token permissions, and adds uv sync --exclude-newer quarantine behavior. |
.github/dependabot.yml |
Adds github-actions ecosystem updates so pinned SHAs can be maintained automatically. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ryanrouleau
approved these changes
Jun 2, 2026
xinghaohuang91
approved these changes
Jun 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
permissions: contents: readto CI workflow (least privilege)if: github.repository_owner == 'twilio'guard to deploy workflow (prevents fork abuse)github-actionsecosystem to dependabot configuration--exclude-newerquarantine (2-day) to alluv synccommands in CI (blocks recently-published packages)Test plan
--exclude-newerdoesn't break installs (lockfile deps are all > 2 days old)🤖 Generated with Claude Code