Repository navigation
Description
Description
bandit sits in imageTools, but nixpkgs builds it against CPython 3.13
while the entire rest of the image is 3.14 (UV_PYTHON, vig-utils, the
toolchain). That one entry drags a partial second Python stack into the
closure: bandit → ddt/stevedore/pyyaml/rich (→ markdown-it-py → mdurl,
pygments) / gitpython (→ gitdb → smmap), and — via gitpython — a full
git-minimal (52 MiB), even though the image already ships full git.
Marginal saving (measured on .#devkitImageEnv): ~74 MiB across 13 paths.
nix why-depends confirms nothing else in the image needs any of them.
The baked copy is already vestigial. The committed
.pre-commit-config.yaml:198 runs entry: uv run bandit … — the venv
bandit, pinned in pyproject.toml (lint/devkit extras,
bandit[toml]==1.9.4). The only Nix-bandit consumer is
nix/hooks.nix:512 (${pkgs.bandit}/bin/bandit) in the sandbox-pure
checks.pre-commit profile — which is outside the image closure and stays
untouched.
Note: this frees the 3.13 packages +
git-minimal. It does not by
itself free the 127 MiBpython3-3.13interpreter, which has three other
anchors — see the interpreter-eviction sub-issue. This cut removes one of
its four anchors.
Proposed mechanism
Remove bandit from imageTools (flake.nix). Image-mode users get it via
uv run bandit / uvx bandit, exactly as the committed hooks already do.
(Alternative considered: realign to python314Packages.bandit. Rejected —
keeps a redundant tool baked, pays an uncached 3.14 rebuild, and the hook path
doesn't use it anyway.)
Verification
nix path-info -Sh .#devkitImageEnvdrops ~74 MiB;git-minimaland all
python3.13-*package paths gone from the closure.pre-commit run bandit --all-files(viauv run) still passes in the image.nix flake check(checks.pre-commit) unaffected.
Notes
Part of the image-slimming epic. Independent; one of the four anchors gating
interpreter eviction.
Activity
refactor(image): drop vestigial baked bandit
refactor(image): drop vestigial baked bandit
refactor(image): drop vestigial baked bandit (#1120)
refactor(image): evict redundant CPython 3.13 via gitMinimal and unwr…
refactor(image): evict redundant CPython 3.13 via gitMinimal and unwr…
c-vigo commentedon Jul 15, 2026
Implemented and merged to dev in #1120 (−74.5 MiB measured).
chore: release 1.3.0 (#265)
chore: release 1.3.0 (#1138)