Skip to content

ci(dependabot): track pre-commit hook versions - #235

Open
rominf wants to merge 1 commit into
mainfrom
ci/dependabot-pre-commit
Open

ci(dependabot): track pre-commit hook versions#235
rominf wants to merge 1 commit into
mainfrom
ci/dependabot-pre-commit

Conversation

@rominf

@rominf rominf commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds a pre-commit entry to .github/dependabot.yml so the hook pins in
.pre-commit-config.yaml stop drifting.

Those revs (currently ruff-pre-commit and shellcheck-py) have only ever
been bumped by hand, which means the linters CI enforces are whatever version
someone last remembered to update. Dependabot added a pre-commit
ecosystem

that parses the config, resolves each rev against the hook repository's tags,
and opens a PR when one moves.

Notably it skips the repo: builtin and repo: local blocks, so prek's native
hooks and the cargo xtask hooks are untouched — they have no upstream release
to track.

Weekly, grouped into a single PR, with the same cooldown: 7 as the other two
ecosystems. The cooldown reasoning is a bit sharper here than for actions or
crates: a hook is executable code that runs on every contributor's machine at
commit time and in the prek CI job, so a compromised release executes before
anyone has read the bump. Cooldown never delays security updates.

Risk: low. Config-only; the worst case is that no PRs are opened.

Test plan

  • prek run --all-files --no-group local-tools passes (check-yaml parses the
    file).

  • Not verifiable before merge: whether GitHub accepts pre-commit without
    enable-beta-ecosystems. The changelog and the supported-ecosystems reference
    both list it as generally available, and the flag is documented as beta-only,
    so it should not be needed — but the authoritative signal is the repo's
    Dependabot tab after this lands. If it is rejected there, the fix is a
    one-line follow-up.

  • Not a bug fix; no tests/e2e-cucumber/expectations.toml xfail rows to narrow.

The hook pins in .pre-commit-config.yaml were bumped by hand and drifted
between releases. Dependabot's pre-commit ecosystem resolves each rev
against the hook repository's tags, and skips the builtin and local
blocks, which have no upstream release to track.

Weekly and grouped, with the same 7-day cooldown as the other two
ecosystems: a hook is executable code that runs on every contributor's
machine at commit time and in the prek CI job, so a compromised release
would run before anyone reads the bump.

Signed-off-by: Roman Inflianskas <Roman.Inflianskas@amd.com>
@rominf
rominf requested a review from a team as a code owner August 12, 2026 16:11
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.

1 participant