Repository navigation
Group security updates and propose majors as their own Dependabot PRs - #215
Merged
Merged
Conversation
ooloth/dotfiles#251 Every update was in one group per ecosystem, but a group without applies-to covers version updates only, so each security update opened a PR of its own: 18 were open at once. npm majors were ignored, so they were never proposed at all, and the limit of one open PR per ecosystem left no room for anything beside the group. Each ecosystem now has a version-update group for minor and patch releases and a security-update group for everything Dependabot flags. Majors open as their own PRs, so one breaking upgrade cannot block the rest, and the limit of 5 leaves room for them beside the groups. The monthly schedule and the 7-day cooldown are unchanged.
ooloth/dotfiles#251 The slow-checks comment in ci.yml and the README said build, metadata and Lighthouse run on every ready PR, but the build job skips PRs Dependabot opens, because they get no secrets. The build job's comment named only bumped actions as first running on main. Now that npm majors open as Dependabot PRs, a bumped npm package is the larger case, so all three now say a Dependabot PR is first built after it merges.
ooloth/dotfiles#251 The security groups took every update type, so a security fix that needs a major landed in one PR with every other fix and could block them all, as the 18-update security PR #188 did. They now take minor and patch only, and a security major opens on its own. next with eslint-config-next, react with react-dom and their types, and vitest with @vitest/ui only work at matching versions, so a major of one alone can fail the checks. Each set now has a group, listed before the catch-all and taking majors, so it arrives as one PR.
ooloth/dotfiles#251 CI skips the build on Dependabot PRs because they get no secrets, and with majors now arriving as Dependabot PRs, one that breaks the build would pass CI and break main and npm run deploy:ci once merged. CLAUDE.md now says to run npm run build on the PR's branch first.
ooloth/dotfiles#251 The security groups took minor and patch only, but Dependabot judges a security update's type from the package's newest release, not its fix. ws 7.5.10's fix is the 7.5.11 patch, yet 8.x exists, so it would have opened alone, as would most of today's alerts. Both security groups now take every type, at the cost that a breaking fix can hold up the rest. Tailwind's two packages and the two artifact actions now arrive in one PR each, majors included, since one moving alone can fail. @types/node stays at or below the .nvmrc major, and npm's PR limit is 10, because its five version groups would otherwise leave no slot for a major. CLAUDE.md said to run npm run build locally before merging. That ran unchecked release code beside .env.local, and skipped the Metadata and Lighthouse jobs that deploy also needs. A workflow_dispatch run now runs Build, Metadata and Lighthouse on any branch with Actions secrets, while Deploy and Notify stay on main. The rule is now to check each release, start that run, and merge once it passes at the head commit.
ooloth/dotfiles#251 deploy-via-ci.sh found the run it started as the newest dispatched run of ci.yml on any branch. Dependabot branches are now checked by dispatching the same workflow, so one started during the lookup would be reported as the deploy. The lookup now filters to main.
ooloth/dotfiles#251 The rule read the result with gh run list on the branch, which also lists the pull_request runs that pass with Build skipped. It now filters to workflow_dispatch runs, shows the head SHA, and counts a run only when Build, Metadata and Lighthouse succeeded. A Dependabot branch opened before this rule carries the old ci.yml, so it is rebased first.
ooloth/dotfiles#251 GitHub's "Secure use" reference for Actions says Dependabot creates no alerts for actions pinned to a SHA, and every action here is pinned, so actions-security could never open a PR. It is removed, and the header says why and that fixes to actions arrive as version updates.
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for the dependency-automation and manual branch-validation changes.
No open issues 🎉
What changed in this PR
Updates dependency automation to group npm security fixes, allow major upgrades, and support manual pre-merge validation of Dependabot branches.
Changes:
- Adds security and coupled-package groups, permits major updates, raises PR limits, and caps
@types/nodebelow version 26. - Enables manually dispatched Build, Metadata, and Lighthouse checks on non-main branches without deploying, and documents the required release checks.
- Restricts deployment-run lookup to
mainso branch-validation runs are not mistaken for deployments.
| File | Description |
|---|---|
| README.md | Clarifies manual slow checks for Dependabot PRs. |
| io/cloudflare/deploy-via-ci.sh | Filters dispatched-run lookup to the deployment branch. |
| CLAUDE.md | Documents release screening and commit-specific validation before merging. |
| .github/workflows/ci.yml | Enables slow checks for manually dispatched branch runs. |
| .github/dependabot.yml | Configures security and coupled-package groups, major updates, PR limits, and the Node types cap. |
Review effort: Balanced
Owner
Author
|
Proof after merge: ooloth/dotfiles#251 (comment) |
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.
✅ What
nextwitheslint-config-next,reactwithreact-domand their types,tailwindcsswith@tailwindcss/postcss,vitestwith@vitest/ui, and theupload-artifactanddownload-artifactactions@types/nodestops at major 25, the Node version in.nvmrc, so types never describe APIs the runtime doesn't haveCLAUDE.mdnow says sonpm run deploy:cinow only looks for runs onmainwhen it reports the run it started, so a check running on another branch can't be mistaken for the deploy🤔 Why
@types/nodehad fallen five majors behind with nothing proposing an upgradews7.5.10 is fixed by a patch, but 8.x exists, so it would have been split off on its ownCLAUDE.mdsays to check each release for signs of a compromised publish first, then start that run, and merge only once it passes on the commit being mergedmain, so none of the new grouping shows until this merges👩🔬 How to validate
git fetch origin && git switch dependabot-security-groupsnpx --yes js-yaml .github/dependabot.ymlartifactsandactionsundergithub-actions, andnext,react,tailwind,vitest,npmandnpm-securityundernpmactionsandnpmto list"update-types": ["minor", "patch"], andnpm-securityto have noupdate-typesnpmentry to have"open-pull-requests-limit": 10and anignorefor@types/nodeversions>=26gh workflow run ci.yml -R ooloth/michaeluloth.com --ref dependabot-security-groupsgh run list -R ooloth/michaeluloth.com --workflow ci.yml --branch dependabot-security-groups --event workflow_dispatch --json databaseId,headSha,status --limit 1headShais the branch's latest commit, then open it withgh run view <databaseId> -R ooloth/michaeluloth.comCLAUDE.mdand expect the "Dependency Updates" section to say to check each release, then start that run, before merging a Dependabot PR🔖 Related links