Skip to content

Add a workflow to auto-bump vulnerable dependencies#5437

Merged
pietern merged 5 commits into
mainfrom
add-vulnbump-workflow
Jun 8, 2026
Merged

Add a workflow to auto-bump vulnerable dependencies#5437
pietern merged 5 commits into
mainfrom
add-vulnbump-workflow

Conversation

@pietern
Copy link
Copy Markdown
Contributor

@pietern pietern commented Jun 4, 2026

Adds a daily workflow that upgrades the root module's dependencies flagged by govulncheck to their fixed versions and opens a PR, alongside the existing Bump Go toolchain workflow.

govulncheck -scan module reports every advisory affecting a required module regardless of reachability, which is broader than trivy (GHSA-fed, so it lags golang.org/x/* advisories). The new tools/vulnbump command consumes the scan's JSON, bumps each affected dependency to its highest fixed version via go get + go mod tidy, and renders the PR summary.

  • Standard-library advisories are skipped and left to the Bump Go toolchain workflow.
  • A govulncheck error aborts the job rather than being mistaken for "no vulnerabilities".
  • The summary labels each advisory with its CVE (read from the scan output, no extra lookup).
  • govulncheck is pinned as a tool dependency in tools/go.mod (bumpable by dependabot); its database is fetched from https://vuln.go.dev at runtime, so scans still use the latest advisories.

Parsing, version selection, and summary rendering live in tools/vulnbump with unit and end-to-end tests.

This pull request and its description were written by Isaac.

Adds a daily workflow that upgrades the root module's dependencies flagged
by govulncheck to their fixed versions and opens a PR. The tools/vulnbump
command parses the scan JSON, applies the bumps via go get + go mod tidy,
and renders the PR summary. Standard-library advisories are left to the
Bump Go toolchain workflow.

Co-authored-by: Isaac
@pietern pietern temporarily deployed to test-trigger-is June 4, 2026 09:59 — with GitHub Actions Inactive
@pietern pietern temporarily deployed to test-trigger-is June 4, 2026 09:59 — with GitHub Actions Inactive
Add govulncheck to the tools/go.mod tool directive and build it from there,
so its version is managed alongside the other tools (and bumpable by
dependabot) rather than hardcoded as @Version in the workflow. The
vulnerability database is still fetched from vuln.go.dev at runtime, so the
pinned binary scans against the latest advisories.

Also point setup-go at tools/go.mod, the module this job compiles.

Co-authored-by: Isaac
@pietern pietern temporarily deployed to test-trigger-is June 4, 2026 10:03 — with GitHub Actions Inactive
@pietern pietern temporarily deployed to test-trigger-is June 4, 2026 10:03 — with GitHub Actions Inactive
Use `go tool -modfile=tools/go.mod govulncheck`, matching the repo's GO_TOOL
idiom in Taskfile.yml. -modfile resolves the pinned tool from tools/go.mod
while it scans the root module (the working directory), so there's no need to
build the binary first.

Co-authored-by: Isaac
@pietern pietern temporarily deployed to test-trigger-is June 4, 2026 10:08 — with GitHub Actions Inactive
@pietern pietern temporarily deployed to test-trigger-is June 4, 2026 10:08 — with GitHub Actions Inactive
Tests run from the package directory, so the fixture can be read with
os.ReadFile rather than //go:embed.

Co-authored-by: Isaac
@eng-dev-ecosystem-bot
Copy link
Copy Markdown
Collaborator

eng-dev-ecosystem-bot commented Jun 4, 2026

Commit: 3852f44

Run: 27129295760

Env 🟨​KNOWN 🔄​flaky 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
🟨​ aws linux 7 15 261 923 6:58
🟨​ aws windows 7 15 263 921 13:13
💚​ aws-ucws linux 7 15 357 837 6:52
💚​ aws-ucws windows 7 15 359 835 8:55
💚​ azure linux 1 17 264 921 5:56
🔄​ azure windows 4 1 17 262 919 10:36
💚​ azure-ucws linux 1 17 362 833 7:08
💚​ azure-ucws windows 1 17 364 831 9:19
🔄​ gcp linux 4 17 257 924 8:24
💚​ gcp windows 1 17 262 922 9:21
27 interesting tests: 15 SKIP, 7 KNOWN, 5 flaky
Test Name aws linux aws windows aws-ucws linux aws-ucws windows azure linux azure windows azure-ucws linux azure-ucws windows gcp linux gcp windows
🟨​ TestAccept 🟨​K 🟨​K 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 🔄​f 💚​R
🔄​ TestAccept/bundle/destroy/jobs-and-pipeline ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f ✅​p ✅​p ✅​p ✅​p
🔄​ TestAccept/bundle/destroy/jobs-and-pipeline/DATABRICKS_BUNDLE_ENGINE=terraform ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f ✅​p ✅​p ✅​p ✅​p
🙈​ TestAccept/bundle/invariant/no_drift 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/permissions 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions 🟨​K 🟨​K 💚​R 💚​R 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=direct 🟨​K 🟨​K 💚​R 💚​R
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=terraform 🟨​K 🟨​K 💚​R 💚​R
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions 🟨​K 🟨​K 💚​R 💚​R 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=direct 🟨​K 🟨​K 💚​R 💚​R
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=terraform 🟨​K 🟨​K 💚​R 💚​R
🙈​ TestAccept/bundle/resources/postgres_branches/basic 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/recreate 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/replace_existing 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/update_protected 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/without_branch_id 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_endpoints/basic 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_endpoints/recreate 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_projects/update_display_name 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/synced_database_tables/basic 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_endpoints/drift/recreated_same_name 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_indexes/basic 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_indexes/grants/select 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🔄​ TestAccept/selftest/record_cloud/pipeline-crud ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f ✅​p ✅​p 🔄​f ✅​p
🔄​ TestAccept/selftest/record_cloud/pipeline-crud/DATABRICKS_BUNDLE_ENGINE=direct ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f ✅​p ✅​p 🔄​f ✅​p
🔄​ TestAccept/selftest/record_cloud/pipeline-crud/DATABRICKS_BUNDLE_ENGINE=terraform ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f ✅​p
🙈​ TestAccept/ssh/connection 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
Top 23 slowest tests (at least 2 minutes):
duration env testname
4:59 gcp windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
4:44 gcp linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
4:40 gcp linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
4:23 gcp windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
4:08 azure windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
4:02 azure linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:46 azure-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:22 aws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:16 aws-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:16 gcp windows TestAccept
3:10 aws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:09 azure-ucws windows TestAccept
3:08 azure windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:07 aws-ucws windows TestAccept
3:06 azure-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:54 azure-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:50 aws-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:49 azure linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:44 aws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:44 aws-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:38 azure-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:36 aws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:32 aws-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct

Comment thread .github/workflows/bump-vuln-deps.yml Outdated
Comment thread .github/workflows/bump-vuln-deps.yml
with:
branch: auto/bump-vuln-deps
commit-message: "Bump dependencies with known vulnerabilities"
title: "Bump dependencies with known vulnerabilities"
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.

nit: we could also write small file with list of upgraded deps and pass it to title

Comment thread tools/vulnbump/main.go
if err := runCmd(dir, "go", "mod", "tidy"); err != nil {
return err
}
}
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.

Pretty simple - nice. I wonder if we need dependabot or can use this also for patch releases.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I suspect this is limited to the vulnerability patches and not arbitrary releases.

Rely on set -euo pipefail to abort on govulncheck failure instead of an
explicit if-check, and document why the create-pull-request branch is fixed.

Co-authored-by: Isaac
@pietern pietern temporarily deployed to test-trigger-is June 8, 2026 09:44 — with GitHub Actions Inactive
@pietern pietern temporarily deployed to test-trigger-is June 8, 2026 09:44 — with GitHub Actions Inactive
@pietern pietern enabled auto-merge June 8, 2026 10:08
@pietern pietern added this pull request to the merge queue Jun 8, 2026
Merged via the queue into main with commit 263e729 Jun 8, 2026
32 of 33 checks passed
@pietern pietern deleted the add-vulnbump-workflow branch June 8, 2026 10:33
github-merge-queue Bot pushed a commit that referenced this pull request Jun 8, 2026
The `bump-vuln-deps` workflow added in #5437 runs on the protected
runner group, which can't reach `proxy.golang.org`, so building vulnbump
failed. Add the `Setup JFrog` step (and the `id-token: write` it needs)
to route module downloads through Artifactory, like the other Go
workflows.
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.

4 participants