Skip to content

Every active repo gets grouped, delayed dependency updates and the same security settings #251

Open

Description

@ooloth

Current state

Dependency updates pile up unreviewed in some repos and never arrive in others. Only ooloth/michaeluloth.com has a dependabot.yml, and it has 11 open Dependabot PRs, because security updates ignore its grouping and open one PR per package. Security settings differ from repo to repo with no record of what they should be: Dependabot alerts are off in two active private repos, and in ooloth/dotfiles the Actions token defaults to write access and may approve PRs. Workflows in ooloth/hub and ooloth/dotfiles use actions by floating tag.

Ideal state

  • ooloth/hub, ooloth/michaeluloth.com, ooloth/dotfiles and ooloth/media each have a dependabot.yml covering every ecosystem they use that Dependabot can read
  • ooloth/content has no dependency Dependabot can read, and its uv scripts resolve only releases at least 7 days old
  • Version updates arrive at most monthly, grouped into one PR per ecosystem, and only for releases at least 7 days old wherever the registry gives Dependabot a publish date
  • Security updates arrive grouped into one PR per ecosystem, for every ecosystem GitHub raises alerts for. Actions pinned to a SHA get no alerts, so their fixes arrive as version updates
  • Major version updates arrive as their own PRs, outside the group, except for packages that only work at matching versions, which arrive together in a PR of their own
  • Every workflow action in these repos is pinned to a full commit SHA, and each repo requires it
  • Tools CI installs with cargo install are pinned to exact versions
  • Each repo whose Dependabot PRs had no CI has a check that runs on them
  • One re-runnable command reports how each repo's security settings differ from the baseline, and another applies the baseline
  • No per-package Dependabot PR that a grouped PR supersedes stays open

Out of scope

Decisions

Constraints

Open

No open decisions.

Dependabot is the update tool. It doesn't read .nvmrc, so Node versions are kept current some other way (ooloth/michaeluloth.com#185 shows the gap). Renovate is worth revisiting if keeping the per-repo configs in sync starts to cost real time.

Starting points

  • ooloth/michaeluloth.com:.github/dependabot.yml
  • .github/workflows/claude.yml

Activity

  1. ooloth commented on Nov 5, 2026

    @ooloth
    OwnerAuthor

    Approach

    The six repos named in the issue get the same baseline, with exceptions only where a repo's files differ. Dormant repos are left out until someone works in them again.

    Update tool: Dependabot, because it's built into GitHub and needs no third-party app with write access to private repos. Renovate would bring one shared config and .nvmrc updates. Switching later means swapping a small file per repo, so the choice is cheap to reverse. Node versions are handled under ooloth/michaeluloth.com#185.

    The dependabot.yml baseline, per ecosystem:

    • version updates monthly, only for releases at least 7 days old;
    • minor and patch updates grouped into one PR;
    • majors as their own PRs, with the PR limit raised to 5 so they can open beside the group;
    • security updates in a group of their own, because they ignore version-update groups.

    Crates that must be upgraded together get their own group, ahead of the catch-all.

    Order of the work:

    1. A Python script in dotfiles that reports how each repo's security settings differ from the baseline, and applies it.
    2. SHA-pin the actions in dotfiles and add its config.
    3. One PR per repo: Pin CI's actions and tools to fixed versions and add grouped, delayed Dependabot updates hub#401 first, then michaeluloth.com, puzzles and the two private repos. Each private repo gets a CI check before its config, because neither has one.
    4. Apply the settings, and require SHA pinning in each repo once its actions are pinned.
    5. Close the per-package Dependabot PRs the grouped PRs replace.

    Repo list: the script finds its target repos by a security-baseline topic on each repo, so no tracked file names a private repo.

  2. ooloth commented on Nov 5, 2026

    @ooloth
    OwnerAuthor

    Design: the settings script

    tools/github/repo_settings.py reads each target repo's settings from the GitHub API and parses them into one value per repo. It compares that value with a baseline that depends on the repo's visibility and on whether its workflows are pinned. The difference is a list of drift entries. --check prints the drift and exits 1 if there is any. --apply turns each drift entry into one write request, sends them, reads the settings again, and reports anything that didn't take.

    # Property
    P1 --check sends no write request to GitHub
    P2 After --apply, --check finds no drift, and a second --apply sends no writes
    P3 A setting the repo's plan doesn't offer is never requested and never reported as drift
    P4 Required SHA pinning is never turned on in a repo whose workflows use an unpinned action
    P5 A failure names the repo, the setting and what to do, exits non-zero, and doesn't stop the other repos being reported
    P6 No tracked file names a private repo

    How each property is held:

    • P1: only the apply path can reach the code that sends writes, and an assertion in the gh wrapper backs this up.
    • P3: a private repo's settings have no entry for secret scanning, push protection or private vulnerability reporting, so nothing can compare or write them.
    • P4: while any workflow uses an unpinned action, the baseline leaves SHA pinning out.
    • P5: each failure keeps the exact call and GitHub's status and message, so it can be rerun by hand.
    • P6: the repo list comes from the topic at run time.

    Checks: Pydantic parses every response at the boundary, and an unexpected shape becomes a reported failure for that repo. Two assertions cover what only a bug could break: no write in check mode, and no request outside the baseline.

    Tests:

    • property tests that the requests always reach the baseline, and that a private repo never gets a public-only request;
    • examples for parsing the API's real response shapes and for telling pinned action references from unpinned ones;
    • integration tests against a stub gh showing that --check sends only GETs, and that a refused write in one repo still reports the others.

    Alternatives rejected:

    • Writing every setting without reading first: a second apply would write everything again, and a write that silently didn't take would go unnoticed.
    • One class per setting: it delivers the same properties but leaves a class hierarchy behind.
  3. ooloth commented on Nov 5, 2026

    @ooloth
    OwnerAuthor

    Change to the design: the settings script takes the repos to check as arguments, --check hub content media, where a bare name means ooloth/<name>, instead of finding them by a security-baseline topic. The topic existed only to keep private repo names out of this public repo, and naming them here is fine, so it isn't worth a label that anyone can see and anyone editing a repo's About box can remove by accident. A regular check across all the repos is tracked in #252.

  4. ooloth commented on Nov 5, 2026

    @ooloth
    OwnerAuthor

    Change to the design: security-update groups now take minor and patch updates only, so a security fix that needs a major opens on its own instead of holding back the other fixes. In michaeluloth.com, packages that only work at matching versions (next with eslint-config-next, react with react-dom and their types, vitest with @vitest/ui) get groups of their own that take majors, as hub's TUI crates do. Because CI never builds a Dependabot PR there, its CLAUDE.md now says one is merged only after npm run build passes on its branch locally.

  5. 6 remaining items

  6. ooloth commented on Nov 6, 2026

    @ooloth
    OwnerAuthor

    Change to the plan for content: its uv scripts get the 7-day cooldown from uv, since Dependabot doesn't read their inline dependencies (dependabot-core#11946 is open). A uv.toml at the repo root sets exclude-newer = "7 days", so uv only considers files uploaded at least 7 days before each run. ooloth/content#29 carries it.

    Design

    uv enforces the cutoff while it resolves, so the change is one setting and no code. uv finds uv.toml by walking up from the script's own directory. That means the cooldown applies to uv run scripts/… from the repo root, to each script's uv run --script shebang from any directory, and to uv sync --script in .agents/setup. A root file was chosen over a [tool.uv] line in each script's header because a script added later picks it up without anyone remembering to. CLAUDE.md says where the setting lives, since a reader of a script no longer sees it there.

    The approach's properties still apply. These are the ones this change is scored on:

    # Property
    C1 Every uv script in content resolves only releases uploaded at least 7 days ago
    C2 The cooldown holds on every path that runs a script: uv run from the repo root, the shebang from any directory, and uv sync --script in .agents/setup

    Checks: nothing needs a runtime check or a test. uv rejects a setting it can't parse, and a broken cooldown shows at once as a resolution error. It's verified by hand: youtube-transcript-api 1.2.5 was uploaded on 2026-11-05, so a run that day should resolve 1.2.4. uv 0.13.5 reads a duration here; I haven't found the oldest version that does.

  7. ooloth commented on Nov 6, 2026

    @ooloth
    OwnerAuthor

    Change after review of ooloth/michaeluloth.com#215: two parts of the baseline changed.

    • Security groups take every update type. Dependabot judges a security update's type from the package's newest release, not its fix, so a group limited to minor and patch split off patch fixes whenever a newer major existed (ws 7.5.10's fix is a patch, but 8.x exists).
    • A Dependabot PR is checked by starting the Check workflow by hand on its branch, after checking each release for signs of a compromised publish, instead of by a local npm run build. The local build ran unchecked code beside .env.local and skipped Metadata and Lighthouse.

    Tailwind and the artifact actions also get coupled groups, @types/node is held at the .nvmrc major, and npm's PR limit is 10 so its five version groups leave room for majors.

  8. ooloth commented on Nov 6, 2026

    @ooloth
    OwnerAuthor

    Change to the baseline: reviewing ooloth/media#144 against Dependabot's docs and source turned up four things the baseline gets wrong, and every repo that copies it inherits them. The media fix is in 1dc2309.

    • The PR limit was never raised. Dependabot's default limit is already 5 open version-update PRs, so open-pull-requests-limit: 5 changes nothing and can be dropped.
    • An actions security group never fires. GitHub raises alerts only for actions pinned by version, not by SHA, so once a repo's actions are SHA-pinned, actions-security has nothing to group. Action fixes arrive only as version updates.
    • The 7-day cooldown needs a publish date. Dependabot reads one from PyPI, the actions and Docker Hub, but not from ghcr.io or lscr.io, so images on those registries are proposed as soon as they're published.
    • 0.x versions count as major.minor.patch. A tool at 0.x, such as ruff going from 0.15 to 0.16, lands in the minor/patch group even when it adds lint rules, so one new rule fails the whole group PR. In media, the 0.x tools CI runs (ruff, ty, prek) now get a group of their own, listed before the catch-all.
  9. ooloth commented on Nov 6, 2026

    @ooloth
    OwnerAuthor

    Correction to the design: two parts were wrong. Security-update groups cannot be limited to minor and patch: Dependabot decides whether an update fits a group's update-types from the package's newest release, in security jobs too (SemverGroupingRules#allow_grouping? in dependabot-core compares with checker.latest_version), so a fix for any package with a newer major would open alone. The security groups now take every update type, in michaeluloth.com#215 and media#144, and hub and dotfiles follow. Also, GitHub creates no Dependabot alerts for actions pinned to a SHA, per its "Secure use" reference for Actions, so an actions-security group can never open a PR, and those groups are removed. Fixes to actions arrive as version updates. The groups still to be seen working are cargo-security, npm-security, uv-security and pilots-security.

  10. ooloth commented on Nov 6, 2026

    @ooloth
    OwnerAuthor

    Proof after merge: content#29. Merged at 2026-11-06 04:42 UTC as 18a09980c89cbd210dcfe2225d0d4296322eb41a. Nothing deploys, because content is a notes repo with no CI or deploy, so this checks what GitHub and the merged tree do.

    The claim comes from the PR: the repo has no npm dependencies left, the npm-only files and the script are gone, .agents/setup works without Node, and a root uv.toml holds every uv script to releases at least 7 days old. It also closes content#20.

    The npm files are gone from main: proven. At the merge commit, scripts/package.json, scripts/package-lock.json, scripts/clean-markdown.js, scripts/.nvmrc and .github/dependabot.yml all return Not Found from the contents API, and uv.toml exists.

    Dependabot stops proposing npm updates: proven. Dependabot closed #26, #27 and #28 itself at 04:44 UTC, each with "Looks like … is no longer a dependency, so this is no longer needed." Its three runs after the merge (42164209215, 42164210621, 42164212166) ended in failure with "Error during file fetching; aborting: /scripts/package.json not found", which is the recreate job finding the manifest gone. No Dependabot PRs remain open.

    .agents/setup runs without Node: proven. The merge commit's tree (5059c95a) is the PR head's tree. On it, PATH="$(dirname "$(command -v uv)"):/usr/bin:/bin" bash .agents/setup printed ==> uv sync --script … and done in 0s for each of the three scripts and exited 0.

    uv applies the 7-day cutoff: proven. On the same tree, uv -v sync --script scripts/check-post.py logged "Found workspace configuration at …/uv.toml" and "Solving with exclude-newer: global: 2026-10-30T04:47:09Z", 7 days before the run.

    content#20 is closed: GitHub closed it at the merge, from the PR's Fixes #20.

    Not observable: nothing.

  11. ooloth commented on Nov 6, 2026

    @ooloth
    OwnerAuthor

    Proof after merge: media#144. Merged at 2026-11-06 04:41 UTC as ada61f9acacf700d947eabcb0039b36b014b9a62. Nothing deploys, because the merge changes CI, the Dependabot config, docs and comments in compose.yaml, and the Mac mini only picks up compose.yaml at the next just deploy-service or just deploy-services. So this checks what GitHub did with it on main.

    The claim comes from the PR: CI runs just check, including the new compose.yaml validation, on every push to main; Dependabot groups minor and patch updates per ecosystem, opens majors alone, waits 7 days, gives ruff, ty and prek their own group and ignores gluetun; and the Python packages and servers/pilots get security groups that take every update type, with no version updates for servers/pilots.

    CI runs and passes on main: proven. The Check run on the merge commit (42164031290) succeeded.

    GitHub accepts the config, and the version-update groups work: proven. The Dependabot runs on the merge commit for github_actions (42164036834), uv (42164037042) and docker_compose (42164037119) read the new config. Their job definitions show cooldown 7, the groups actions, dev-tools, uv and images, each limited to minor and patch, and an ignore for qmcgaw/gluetun. They opened #146 (actions group), #147 (dev-tools group, 3 updates), #148 (uv group, 6 updates) and #151 (images group, 7 updates), and the majors on their own: #150 (logfire 4 to 5) and #152 (linuxserver/radarr 5 to 6).

    One minor update opened outside its group. #149 raises the inline-snapshot[dirty-equals] requirement to >=0.36.1 on its own. The uv job logged "Updating inline-snapshot[dirty-equals] from to 0.36.1", with no current version, because the requirement names an extra. A group's update-types rule needs a current version to compare with, so Dependabot opened it alone rather than in dev-tools or uv.

    servers/pilots gets no version updates: proven. No npm_and_yarn version-update job ran after the merge, and no new PR touches /servers/pilots.

    One image could not be checked. The docker_compose run ended in failure only because Docker Hub refused access to huntarr/huntarr (private_source_authentication_failure for registry.hub.docker.com). Its PRs for the other images were still created. huntarr gets no update PRs until that image can be read again.

    Not observable yet:

  12. ooloth commented on Nov 6, 2026

    @ooloth
    OwnerAuthor

    Proof after merge: michaeluloth.com#215. Squash-merged at 2026-11-06 04:42 UTC as 73fed3a4f3062937acb22cca57e930e86433ee85.

    The claim comes from the PR and its review commits: Dependabot groups npm security fixes into one PR that takes every update type, with no security group for the SHA-pinned actions; packages that must move together get groups that take majors; @types/node stays at or below 25; a run started by hand on a branch runs the slow checks without deploying; and deploy-via-ci.sh finds only main's hand-started run.

    Rollout: serving. The first Check run on the merge commit (42164075121) failed in Lighthouse. The randomly sampled post /python-fp-pipe/ scored 0.98 for accessibility against a minimum of 1, because its headings started at h3. The PR changed no page: it touched .github/dependabot.yml, .github/workflows/ci.yml, CLAUDE.md, README.md and io/cloudflare/deploy-via-ci.sh. After the post's first heading was changed to h2 in Notion, a full rerun (attempt 2) passed every job, including Deploy. Cloudflare Pages' production deployment ee89221d now has source 73fed3a. https://michaeluloth.com/python-fp-pipe/ returns 200, and its headings now go h1, then h2.

    Security fixes arrive grouped, majors included: proven. The two security-update runs after the merge (42164086957 and 42164087076) used the group npm-security with patterns * and no update-types. They opened #217, "bump the npm-security group across 1 directory with 6 updates", which includes happy-dom 20.14.6 to 21.0.4, a major. Both runs ended in failure because one fix was impossible: the minimatch fix would need eslint-config-next downgraded from 16.4.2 to 15.5.29 (security_update_not_possible). That alert stays open.

    Version updates are grouped as configured: proven. The npm version-update jobs (42164081229 and 42164084774) list the groups next, react, tailwind, vitest and npm (minor and patch), an ignore for @types/node at >=26, and a cooldown of 7 days. They opened #216, "bump the npm group across 1 directory with 11 updates". The actions job (42164080992) lists artifacts and actions, with no security group.

    A run started by hand on a branch runs the slow checks and does not deploy: proven. Run 42162777379, started on the PR's branch at 034ea399, passed Build, Metadata and Lighthouse, with Deploy and Notify skipped.

    deploy-via-ci.sh finds only main's hand-started run: proven. The lookup the script used before, without --branch, returns run 42162777379 on dependabot-security-groups. The new lookup, with --branch=main, does not return it.

    Not observable: nothing.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions