Repository navigation
Bump virtualenv to 21.14.5 to fix 4 Dependabot alerts - #630
Merged
Merged
Conversation
virtualenv is a transitive dev dependency (via pre-commit) that only appears in uv.lock, so Dependabot never opened security update PRs for it -- the uv ecosystem can't bump lockfile-only transitive dependencies (dependabot/dependabot-core#16449). Four alerts accumulated as a result: - GHSA-p58f-9548-mpm2 (high): bash/fish activation scripts execute commands embedded in paths - GHSA-x78j-v8h9-3j2q (high): command injection via --prompt in activate.bat - GHSA-94p9-xgh2-xp45 (high): seed wheels not integrity-checked - GHSA-9h9j-4vrj-gf7g (medium): unsanitized prompt values written to pyvenv.cfg Ran `uv lock --upgrade-package virtualenv`, taking virtualenv from 21.7.0 to 21.14.5 (highest patched version required was 21.7.13) and python-discovery from 1.5.0 to 1.6.1 as a side effect. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Dependabot's uv ecosystem cannot update a transitive dependency that exists only in uv.lock, which is why four virtualenv security alerts accumulated with no PR attached. Declaring it as a direct dev dependency makes Dependabot track it, so future advisories get an automatic PR instead of a silent alert. virtualenv remains a pre-commit dependency; the pin only duplicates what the lockfile already resolved, so the resolution is unchanged. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Pinning virtualenv in the dev group fixes that one package, but every other transitive dependency has the same blind spot: Dependabot's uv ecosystem only updates what pyproject.toml declares, so a package living solely in uv.lock is never bumped and its advisories accumulate as alerts with no pull request (dependabot/dependabot-core#16449). This runs `uv lock --upgrade` every Monday and opens a PR when the resolution moves. Direct dependencies are all `==` pinned, so the refresh can only change transitive versions -- Dependabot keeps ownership of direct bumps and the two don't produce competing PRs. The PR body lists the version changes uv reported, mirroring how update-grills.yml summarises its own diff. Note the lockfile is 17 transitive packages behind as of this commit, so the first run will not be a small PR. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why no automatic PRs
virtualenvis a transitive dev dependency (pulled in bypre-commit), so it appeared only inuv.lockand never inpyproject.toml. Dependabot security updates are enabled on this repo and version updates work fine, but Dependabot'suvecosystem cannot bump a lockfile-only transitive dependency — a security update job for one fails withsecurity_update_not_possibleinstead of producing a lockfile-only PR (dependabot/dependabot-core#16449). So four alerts piled up with no PR attached.Fix the alerts
Ran
uv lock --upgrade-package virtualenv:virtualenv21.7.0 → 21.14.5 (highest patched version the alerts asked for was 21.7.13)python-discovery1.5.0 → 1.6.1 (transitive side effect)Resolves:
--promptinactivate.batpyvenv.cfgDev-tooling only; nothing in the published package changes.
Stop it recurring
Two changes, covering the specific package and the general case:
virtualenv==21.14.5is pinned in thedevdependency group. It stays apre-commitdependency — the pin only restates what the lockfile already resolved, so the resolution is unchanged, but Dependabot now treats it as a direct dependency and will open a PR for future advisories.New
.github/workflows/update-uv-lock.ymlrunsuv lock --upgradeevery Monday and opens a PR when the resolution moves, closing the blind spot for every other lockfile-only transitive dependency. Since all direct dependencies are==pinned, the refresh can only change transitive versions — Dependabot keeps ownership of direct bumps, so the two don't produce competing PRs. The PR body lists the version changes uv reported, mirroring howupdate-grills.ymlsummarises its own diff.Two things worth knowing about the new workflow:
dknowles-bot, whichauto-merge.ymlalready auto-merges once CI passes — same as the existinggrills.jsonrefresh. That is existing repo policy, not something this PR changes, but it does mean transitive bumps will land without review oncepytest/ruff/mypyare green.Verification
uv run pytest(1333 passed),uv run ruff check ., anduv run mypy .all pass. The new workflow's shell logic was replayed against a copy of the lockfile to confirm the change detection and PR-body summary render correctly.🤖 Generated with Claude Code