Skip to content

chore(deps): use uv ecosystem and add cooldown for supply-chain hardening#917

Merged
egordm merged 4 commits into
mainfrom
chore/dependabot-use-uv-ecosystem
May 28, 2026
Merged

chore(deps): use uv ecosystem and add cooldown for supply-chain hardening#917
egordm merged 4 commits into
mainfrom
chore/dependabot-use-uv-ecosystem

Conversation

@egordm
Copy link
Copy Markdown
Collaborator

@egordm egordm commented May 27, 2026

Summary

Follow-up to #913. Two related changes to the Dependabot config:

1. Switch package-ecosystem from pip to uv

Dependabot has a dedicated uv ecosystem for projects with uv.lock files. The previous config used pip (the umbrella Python ecosystem), which worked as a fallback but isn't the canonical value.

Per Astral's docs: https://docs.astral.sh/uv/guides/integration/dependabot/

2. Add cooldown blocks for supply-chain hardening

Brand-new releases now wait a few days before Dependabot proposes a bump, giving the community time to surface malicious or broken releases.

This is the main defence against supply-chain attacks like:

  • xz-utils (March 2024) — malicious release caught within days of publication
  • tj-actions/changed-files (March 2025) — compromised action detected fast by the community

Cooldown values applied to all three ecosystems (uv published, uv tooling, github-actions):

Update type Days delayed
patch 2
minor 5
major 7
default (e.g. pre-releases) 3

Important: security updates bypass cooldown

Per GitHub docs: "The cooldown option is only available for version updates, not security updates."

So CVE patches still land within ~24h on the daily cadence. Cooldown only delays routine version bumps.

Test plan

  • Dependabot accepts the new config (check Insights → Dependency Graph → Dependabot tab; any config errors surface there).
  • First daily run after merge: confirm PRs are still being created (cooldown of 2 days could mean the first bundle is smaller than usual if recent bumps are still within the window).
  • Spot check: a security PR fires immediately when an alert is published, not delayed by cooldown.

…ning

Two changes to the Dependabot config:

1. Switch `package-ecosystem` from `pip` to `uv` (both Python blocks).
   Dependabot has a dedicated `uv` ecosystem for projects with `uv.lock`.
   Previously `pip` worked as the umbrella fallback, but `uv` is the
   canonical value per Astral's docs:
   https://docs.astral.sh/uv/guides/integration/dependabot/

2. Add `cooldown` blocks to all three ecosystems. Brand-new releases
   wait a few days before Dependabot proposes a bump, giving the
   community time to surface malicious or broken releases.

Cooldown is the main defence against supply-chain attacks like:
- xz-utils 2024 (malicious release caught within days of publication)
- tj-actions/changed-files March 2025 (compromised action detected
  fast by the community)

Values: 2 days patch / 5 days minor / 7 days major / 3 days default.
Security updates bypass cooldown entirely so CVE fixes are never
delayed. The cooldown applies only to non-security version-updates.

Signed-off-by: Egor Dmitriev <egor.dmitriev@alliander.com>
@egordm egordm requested a review from a team May 27, 2026 07:59
@github-actions github-actions Bot added the chore Improvements or additions to documentation label May 27, 2026
bartpleiter
bartpleiter previously approved these changes May 27, 2026
Copy link
Copy Markdown
Collaborator

@bartpleiter bartpleiter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, but please look at the two comments first.

Comment thread .github/dependabot.yml Outdated
Comment thread .github/dependabot.yml Outdated
- Trim header to three terse bullets describing mechanics.
- Collapse blocks 1 and 2 into a single uv block scanning all
  workspace directories. The previous split existed only to route
  docs/examples deps (which list sphinx/jupyter under
  project.dependencies) into a separate "tooling" group. With the
  runtime/dev split removed (see below), that justification no
  longer applies.
- Merge python-runtime and python-dev groups into a single
  python-versions group. Cooldown already throttles routine bumps,
  so the production/development distinction wasn't earning its
  complexity.
- Drop inline explainers that described Dependabot's general
  behaviour rather than this config's choices.
- Drop prefix-development (never fires with grouping), explicit
  patterns: ["*"] (default catches all), and the chore(deps-docs)
  prefix divergence.

Signed-off-by: Egor Dmitriev <egor.dmitriev@alliander.com>
egordm added 2 commits May 27, 2026 16:37
Dependabot requires every group to declare at least one filter
(patterns, applies-to, dependency-type, or update-types). Empty `{}`
fails validation. Restore the explicit catch-all pattern.

Signed-off-by: Egor Dmitriev <egor.dmitriev@alliander.com>
…ions

The github-actions ecosystem does not version by semver, so
Dependabot rejects semver-patch/minor/major-days. Only default-days
is supported there.

Signed-off-by: Egor Dmitriev <egor.dmitriev@alliander.com>
@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
Collaborator

@bartpleiter bartpleiter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much better!

@egordm egordm merged commit 093221e into main May 28, 2026
5 checks passed
@egordm egordm deleted the chore/dependabot-use-uv-ecosystem branch May 28, 2026 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants