Skip to content

Group security updates and propose majors as their own Dependabot PRs - #215

Merged
ooloth merged 8 commits into
mainfrom
dependabot-security-groups
Nov 6, 2026
Merged

ooloth merged 8 commits into
mainfrom
dependabot-security-groups

Conversation

@ooloth

@ooloth ooloth commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

✅ What

  • Changes Dependabot so npm security fixes arrive in one grouped PR instead of one PR per package, and so major version upgrades are proposed as their own PRs instead of never
  • Minor and patch updates still arrive together in one monthly catch-all PR per ecosystem (npm and GitHub Actions), and releases still wait 7 days before Dependabot proposes them
  • The npm security group takes every kind of update, majors included, so a breaking fix sits in the same PR as the others rather than being split off. GitHub Actions gets no security group, because Dependabot creates no alerts for actions pinned to a SHA, so their fixes arrive as version updates
  • Packages that only work at matching versions arrive together, majors included: next with eslint-config-next, react with react-dom and their types, tailwindcss with @tailwindcss/postcss, vitest with @vitest/ui, and the upload-artifact and download-artifact actions
  • @types/node stops at major 25, the Node version in .nvmrc, so types never describe APIs the runtime doesn't have
  • npm can have up to 10 Dependabot PRs open at once and GitHub Actions up to 5, instead of 1 each, which leaves room for majors beside the groups
  • Starting the Check workflow by hand on any branch now runs Build, Metadata and Lighthouse there too, without deploying. That is how a Dependabot PR gets checked before it merges, and CLAUDE.md now says so
  • npm run deploy:ci now only looks for runs on main when it reports the run it started, so a check running on another branch can't be mistaken for the deploy

🤔 Why

  • 18 Dependabot PRs are open right now, one for each package with a security alert, because the existing group only covered regular version updates
  • Majors were ignored entirely, so packages like @types/node had fallen five majors behind with nothing proposing an upgrade
  • The security group can't be limited to minor and patch, because Dependabot judges a security update by the package's newest release rather than by the fix. ws 7.5.10 is fixed by a patch, but 8.x exists, so it would have been split off on its own
  • CI can't build Dependabot PRs on its own, because GitHub gives them none of the repo's Actions secrets, and the build fetches content with those secrets. A run you start yourself does get the secrets, so CLAUDE.md says 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 merged
  • Dependabot only reads its config from main, so none of the new grouping shows until this merges

👩‍🔬 How to validate

  • git fetch origin && git switch dependabot-security-groups
  • npx --yes js-yaml .github/dependabot.yml
  • Expect the file to parse and print as JSON, with artifacts and actions under github-actions, and next, react, tailwind, vitest, npm and npm-security under npm
  • Expect only actions and npm to list "update-types": ["minor", "patch"], and npm-security to have no update-types
  • Expect the npm entry to have "open-pull-requests-limit": 10 and an ignore for @types/node versions >=26
  • gh workflow run ci.yml -R ooloth/michaeluloth.com --ref dependabot-security-groups
  • gh run list -R ooloth/michaeluloth.com --workflow ci.yml --branch dependabot-security-groups --event workflow_dispatch --json databaseId,headSha,status --limit 1
  • Expect a new run whose headSha is the branch's latest commit, then open it with gh run view <databaseId> -R ooloth/michaeluloth.com
  • Expect Build, Metadata and Lighthouse to run and pass, and Deploy and Notify to show as skipped
  • Open CLAUDE.md and expect the "Dependency Updates" section to say to check each release, then start that run, before merging a Dependabot PR

🔖 Related links

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.
@ooloth
ooloth marked this pull request as ready for review November 6, 2026 04:42
Copilot AI balanced review requested due to automatic review settings November 6, 2026 04:42
@ooloth
ooloth merged commit 73fed3a into main Nov 6, 2026
29 checks passed
@ooloth
ooloth deleted the dependabot-security-groups branch November 6, 2026 04:42

Copilot AI 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.

🟢 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/node below 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 main so 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

@ooloth

ooloth commented Nov 6, 2026

Copy link
Copy Markdown
Owner Author

Proof after merge: ooloth/dotfiles#251 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants