Repository navigation
ci: harden workflow and Dependabot against supply-chain attacks - #4
Merged
Merged
Conversation
- Restrict the default GITHUB_TOKEN to contents: read. - Check out with persist-credentials: false so the token is not left in the runner's git config for later steps (Composer scripts included). - Pin every action to a full commit SHA with the release as a comment; Dependabot keeps both in sync. Bumps actions/checkout to v7.0.1. - Cancel superseded runs on pull requests. - Dependabot: wait 7 days before proposing a new release (cooldown) and group GitHub Actions updates into a single PR. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
No issues found across 2 files
Tip: Get a Slack DM when cubic finishes reviewing your PRs. Connect Slack
View guided diff | Turn on auto-fix | Re-trigger cubic
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
Hardens the CI workflow and the Dependabot configuration against supply-chain attacks.
.github/workflows/ci.ymlpermissions: contents: read— the defaultGITHUB_TOKENno longer inherits the repository's default (possibly write) scope.persist-credentials: falseon checkout — the token is not left in the runner's git config, where any later step (Composer scripts included) could read it.actions/checkout→ v7.0.1 (supersedes chore(deps): bump actions/checkout from 6 to 7 #3)shivammathur/setup-php→ 2.40.0ramsey/composer-install→ 4.0.0concurrencycancels superseded runs on pull requests; pushes tomainalways run to completion..github/dependabot.ymlcooldown: default-days: 7for both ecosystems, so a freshly published (and possibly compromised, later yanked) release is not proposed immediately.Test plan
🤖 Generated with Claude Code
Summary by cubic
Hardens the CI workflow and Dependabot configuration against supply-chain attacks.
GITHUB_TOKENtocontents: readand checks out withpersist-credentials: falseso later steps can't read the token.actions/checkoutto v7.0.1,shivammathur/setup-phpto 2.40.0, andramsey/composer-installto 4.0.0.mainalways run to completion.Written for commit 1e4c012. Summary will update on new commits.