Repository navigation
Closed
Labels
area:imageContainer image, Dockerfile, buildarea:workspaceWorkspace tooling, justfile, templatesbugSomething isn't workingeffort:smallLess than 1 hoursemver:patchBug fix, backward-compatible
Milestone
Description
Description
The workspace .pre-commit-config.yaml (deployed from assets/workspace/) contains two local hooks that fail inside the devcontainer because their dependencies are not available:
bandit—entry: uv run bandit -r src/ -llfails becausebanditis not installed system-wide in the Containerfile. The system pip install (Containerfile L176-180) installspre-commit,rich,ruff, andpip-licensesbut omitsbandit.check-skill-names—entry: scripts/check-skill-names.sh .cursor/skillsfails because the script only exists in the devcontainer repo (scripts/check-skill-names.sh), not in the deployed workspace. There is noassets/workspace/scripts/directory.
Steps to Reproduce
- Bootstrap a fresh project using the standard setup:
mkdir test-project && cd test-project curl -fsSL https://raw.githubusercontent.com/vig-os/devcontainer/dev/scripts/bootstrap.sh | bash
- Open the devcontainer
- Make any change to a Python file or
.cursor/skills/and attempt to commit
Expected Behavior
All pre-commit hooks pass (or are skipped if no matching files exist).
Actual Behavior
bandit (Python security linting).........................................Failed
- hook id: bandit
- exit code: 2
error: Failed to spawn: `bandit`
Caused by: No such file or directory (os error 2)
check-skill-names (enforce naming convention)............................Failed
- hook id: check-skill-names
- exit code: 1
Executable `/workspace/<project>/scripts/check-skill-names.sh` not found
Environment
- OS: Any (reproducible on macOS host + Debian Bookworm container)
- Container Runtime: Podman or Docker
- Image Version/Tag:
:devbuilt from currentdevbranch
Possible Solution
- Add
banditto the system-wide pip install in the Containerfile (alongsidepip-licenses) - Copy
scripts/check-skill-names.shintoassets/workspace/scripts/soinit-workspace.shdeploys it
Additional Context
Related to #161 which covers the vig-utils CLI hooks (check-action-pins, validate-commit-msg). This issue is narrower — the tools here are either standard PyPI packages or repo scripts that simply need to be included in the image/workspace.
Changelog Category
Fixed
Acceptance Criteria
-
banditis available in the container image -
scripts/check-skill-names.shis deployed to the workspace - All pre-commit hooks pass in a freshly deployed workspace
- TDD compliance (see .cursor/rules/tdd.mdc)
Metadata
Metadata
Assignees
Labels
area:imageContainer image, Dockerfile, buildarea:workspaceWorkspace tooling, justfile, templatesbugSomething isn't workingeffort:smallLess than 1 hoursemver:patchBug fix, backward-compatible
Activity
gerchowl commentedon Feb 24, 2026
Design
Problem: Two pre-commit hooks fail in freshly deployed workspaces because their dependencies are missing from the container image and workspace template.
Root causes:
uv run bandit -r src/ -ll. The workspace template has no bandit in pyproject.toml, and the container image does not install bandit system-wide. Unlike pip-licenses (which is installed in the Containerfile), bandit is omitted.scripts/check-skill-names.sh .cursor/skills. The script exists only in the devcontainer repo root (scripts/check-skill-names.sh), not inassets/workspace/. The sync manifest (scripts/manifest.toml) does not copy it, so deployed workspaces lack the script.Solution (aligned with issue proposed solution):
Add bandit to Containerfile — Extend the existing
uv pip install --systemblock (L176–180) to includebandit, alongside pre-commit, rich, ruff, and pip-licenses. Use the same pattern as pip-licenses. Add a version test intests/test_image.py(similar totest_pip_licenses_installed).Add check-skill-names.sh to workspace manifest — Add a manifest entry in
scripts/manifest.tomlto copyscripts/check-skill-names.shtoassets/workspace/scripts/check-skill-names.sh. Runjust sync-workspaceso the file appears in the workspace template. The pre-commit hook already referencesscripts/check-skill-names.shrelative to the workspace root, so no hook change is needed.Data flow:
assets/workspace/scripts/check-skill-names.shexists → bootstrap/init deploys it to project rootscripts/Testing strategy:
test_bandit_installedintests/test_image.py(RED first, then GREEN per TDD).tests/bats/skill-naming.bats. Verification: runjust sync-workspaceand confirmassets/workspace/scripts/check-skill-names.shexists; pre-commit in a fresh workspace will pass.Constraints:
gerchowl commentedon Feb 24, 2026
Implementation Plan
Issue: #186
Branch: bugfix/186-missing-bandit-and-check-skill-names
Tasks
tests/test_image.py— verify:just test tests/test_image.py -k banditfailsContainerfile— verify:just test-imagepasses (bandit test green)scripts/manifest.toml— verify:just sync-workspaceandtest -f assets/workspace/scripts/check-skill-names.shCHANGELOG.md— verify: grep -A2 "## Unreleased" CHANGELOG.md shows Fixed entry for [BUG] Container image missing bandit and check-skill-names.sh for workspace pre-commit hooks #186test: add red test for bandit installation
fix: install bandit system-wide in container image
fix: deploy check-skill-names.sh to workspace template
docs: add CHANGELOG entry for #186
gerchowl commentedon Feb 24, 2026
Autonomous Run Complete
Merge branch 'dev' into bugfix/186-missing-bandit-and-check-skill-names
Merge remote-tracking branch 'origin/bugfix/186-missing-bandit-and-ch…
feat: bootstrap smoke-test repo with bare-runner CI (#210)