From a1c2c0c69f9e538c254a203f2c7cb0c688db1218 Mon Sep 17 00:00:00 2001 From: Nic Cope Date: Thu, 19 Nov 2026 13:13:42 -0800 Subject: [PATCH 1/2] Have Renovate fix vulnerability alerts instead of Dependabot Two bots update dependencies here. Renovate handles crossplane-project.yaml, GitHub Actions and the Nix flakes, but none of the Go modules or uv.lock. Dependabot's security updates fill that gap by opening a PR for each Dependabot alert, which today means uv.lock and the Go module under compose-model-deployment's tests. This commit has Renovate fix those alerts too, so Dependabot's security updates can be turned off. Signed-off-by: Nic Cope --- .github/renovate.json5 | 41 ++++++++++++++++++++++++++++++++-------- .github/workflows/pr.yml | 4 ++-- 2 files changed, 35 insertions(+), 10 deletions(-) diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 846b12117..25570a6c1 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -4,18 +4,32 @@ 'config:recommended', 'helpers:pinGitHubActionDigests', ], - // config:recommended turns on every default manager, which would also open - // PRs for the ~20 pyproject.toml files (rewriting requires-python etc.) that - // we don't want Renovate touching. Limit it to exactly what this config - // targets: the custom managers for crossplane-project.yaml, the Renovate - // version in renovate.yml and the Nix version in renovate-entrypoint.sh, - // GitHub Actions, and the Nix flakes (inputs plus flake.lock via - // lockFileMaintenance below). + // Renovate runs every manager that's on by default. Limit it to exactly what + // this config targets: the custom managers for crossplane-project.yaml, the + // Renovate version in renovate.yml and the Nix version in + // renovate-entrypoint.sh, GitHub Actions, the Nix flakes (inputs plus + // flake.lock via lockFileMaintenance below), and vulnerability fixes for Go + // modules and uv.lock. enabledManagers: [ 'custom.regex', 'github-actions', + 'gomod', 'nix', + 'pep621', ], + // Renovate opens PRs to fix the repository's Dependabot alerts, forcing this + // object onto the dependency each alert matches. Setting enabled here is + // what lets those fixes past the package rule below that disables gomod and + // pep621. + vulnerabilityAlerts: { + enabled: true, + }, + // config:recommended ignores tests/ directories, which would hide the Go + // module under functions/compose-model-deployment/tests/oracle from + // vulnerability fixes. + gomod: { + ignorePaths: [], + }, // The Nix manager is disabled by default. Enable it (together with // lockFileMaintenance) so Renovate keeps flake.lock fresh. Renovate // installs its own Nix to apply those updates. @@ -32,7 +46,7 @@ }, // CONTRIBUTING forbids typed commit prefixes like chore(deps):. Disable // explicitly rather than relying on the 'auto' default, which sniffs - // recent history and could flip on from Dependabot's build(deps): commits. + // recent history and could flip on from any typed commits in it. semanticCommits: 'disabled', rebaseWhen: 'auto', rebaseLabel: 'rebase', @@ -44,6 +58,17 @@ 'automated', ], packageRules: [ + { + // gomod and pep621 are enabled only to fix vulnerabilities. Their + // routine updates would open PRs for every pyproject.toml (rewriting + // requires-python etc.), and pep621's lock file maintenance would + // refresh all of uv.lock. + matchManagers: [ + 'gomod', + 'pep621', + ], + enabled: false, + }, { matchFileNames: [ '.github/**', diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index d2b02587b..04ae0d493 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -13,8 +13,8 @@ jobs: # until they're marked ready for review. The ready_for_review trigger above # re-runs this job when that happens. # - # The checklist is a human attestation, so skip it for bot PRs (Renovate, - # Dependabot) whose bodies don't carry the template. GitHub counts a + # The checklist is a human attestation, so skip it for bot PRs, such as + # Renovate's, whose bodies don't carry the template. GitHub counts a # skipped required check as passed, keeping those PRs mergeable. if: | github.event.pull_request.draft == false && From 8b6aa7c3522b9abffbc83b29578bf2e29c54a54a Mon Sep 17 00:00:00 2001 From: Nic Cope Date: Thu, 19 Nov 2026 13:14:25 -0800 Subject: [PATCH 2/2] Run Renovate hourly so vulnerability fixes arrive promptly Renovate now fixes vulnerability alerts in Dependabot's place, but it ran once a day, so an alert could wait up to a day for its fix PR. Dependabot opened one within minutes. This commit runs it hourly, with a concurrency group so a run that outlasts the hour can't overlap the next. Routine updates run hourly too, rather than on a daily schedule of their own, to keep the config simple. The cost is that an open nixpkgs-unstable digest PR is updated whenever the channel advances, and new PRs can open at up to two an hour rather than two a day. Lock file maintenance no longer needs its own schedule, since the hourly runs fall within its default of before 4am on Monday. Signed-off-by: Nic Cope --- .github/renovate.json5 | 5 ----- .github/workflows/renovate.yml | 12 +++++++++++- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 25570a6c1..ecbd2a2c2 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -36,13 +36,8 @@ nix: { enabled: true, }, - // Lock file maintenance defaults to 'before 4am on monday', which the - // workflow's daily 08:00 UTC run never falls in. lockFileMaintenance: { enabled: true, - schedule: [ - '* * * * 1', - ], }, // CONTRIBUTING forbids typed commit prefixes like chore(deps):. Disable // explicitly rather than relying on the 'auto' default, which sniffs diff --git a/.github/workflows/renovate.yml b/.github/workflows/renovate.yml index 51b4b2b78..0f91b4cd4 100644 --- a/.github/workflows/renovate.yml +++ b/.github/workflows/renovate.yml @@ -9,7 +9,17 @@ on: default: "info" type: string schedule: - - cron: '0 8 * * *' + # Hourly, so a vulnerability alert gets its fix PR within about an hour. + # Not on the hour, when GitHub delays and sometimes drops scheduled runs. + # Lock file maintenance relies on some runs falling within its default + # schedule, before 4am on Monday. + - cron: '17 * * * *' + +# A run can outlast the hour, since the postUpgradeTask build alone may take up +# to RENOVATE_EXECUTION_TIMEOUT. Queue the next run rather than let two push to +# the same branches. +concurrency: + group: ${{ github.workflow }} permissions: contents: read