Repository navigation
fix: move devcontainer to the shared python_template image (drops emSign G3) - #10
Merged
Merged
Conversation
The shared image carries the ca-certificates fix that drops emSign ECC Root CA - G3 (CVE-2026-111943). Port python_template's .devcontainer/ and delete the private Dockerfile.
The shared image's pixi rewrote the v6 lock in post-create, so every new dl workspace started dirty. This is the format v7 lock; the package versions do not change.
post-create now runs `pixi install --frozen`, so a new dl workspace does not rewrite pixi.lock.
Reviewer's GuideMoves development containers onto the shared Python template image to remove the vulnerable emSign G3 CA, while simplifying networking and SSH setup, introducing frozen post-create provisioning, changing Claude configuration to a shared read-write host mount, and regenerating the pixi lockfile for pixi 0.83. Reviewers should focus on devcontainer behavior, host credential/security implications, and compatibility of the new post-create script and lock format. Sequence diagram for frozen devcontainer post-create provisioningsequenceDiagram
participant Devpod
participant Container
participant Git
participant Forge
participant Pixi
Devpod->>Container: initializeCommand
Container->>Container: mkdir ~/.claude
Devpod->>Container: post-create.sh
Container->>Container: sudo chown vscode .pixi
Container->>Git: git config --get remote.origin.url
Git-->>Container: SSH forge host
Container->>Forge: ssh-keyscan
Forge-->>Container: host keys
Container->>Container: update ~/.ssh/known_hosts
Container->>Pixi: pixi install --frozen
Pixi-->>Container: install committed environment
Container->>Pixi: pixi task list --summary
Pixi-->>Container: available tasks
Container->>Pixi: pixi run --frozen prek-install
Flow diagram for host-authenticated Claude configurationflowchart LR
Host[Host Claude CLI]
Credentials[Host ~/.claude credentials]
Mount[Read-write bind mount]
ContainerClaude[Claude in development container]
Host -->|OAuth authentication and token refresh| Credentials
Credentials --> Mount
Mount -->|CLAUDE_CONFIG_DIR=/home/vscode/.claude| ContainerClaude
ContainerClaude -->|shared live credentials and configuration| Credentials
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
devcontainer.json bind-mounts ~/.config/gh, and docker refuses a bind source that does not exist, so a host that never ran `gh auth login` could not create the container (main had no such mount). Not covered by pytest: with HOME=<empty dir>, `docker run --mount type=bind,source=$HOME/.config/gh` exited 125 "bind source path does not exist" before init-host.sh ran and 0 after. Same fix as blooop/dbw@56511c8.
Lint with ruff only. dev_template had no black, but it still ran pylint next to ruff. Drop pylint: the test-feature dependency, the pylint task, its place in lint and ci, the [tool.pylint] config, the dependabot group entry, the docs mentions, the VS Code task text and the one disable comment. Formatting stays with ruff format and linting with ruff check. pixi.lock re-locked with pixi 0.83.0; pixi run ci and pre-commit pass.
CI runs ruff through pixi (setup-pixi + pixi run ci), so the pixi pin is the CI version. Pin it exactly (ruff==0.14.11, the version already in pixi.lock) and move the ruff-pre-commit hook from v0.8.2 to v0.14.11 so the pre-commit workflow formats with the same ruff. pixi.lock re-locked with pixi 0.83.0; pixi run ci and pre-commit pass.
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.
This PR moves the devcontainer to the shared python_template image, so the container no longer trusts emSign ECC Root CA - G3 (CVE-2026-111943). It also lints with ruff only.
Evidence
main):Ubuntu 24.04.3 LTS,ca-certificates 20240203, pixi 0.62.2. G3 count1.pixi run test: 1 passed. Colddl: 97 s.Ubuntu 26.04.1 LTS,ca-certificates 20260816ubuntu0.26.04.1, pixi 0.83.0. G3 count0.pixi run ciexits 0:ruff format,ruff check,ty check, 1 test passed, 100 % coverage.pre-commit run -a: all hooks pass.pixi lock --check: up to date.git statusis clean after the cold create. post-create runspixi install --frozen, so it does not rewrite the lock.~/.config/ghcan create the container. WithHOMEset to an empty directory,docker run --mount type=bind,source=$HOME/.config/gh,...exits 125 (bind source path does not exist). Afterinit-host.shruns, the same command exits 0.dlfor a new workspace (image already pulled; create, post-create, dotfiles, test): 79 s. Other agents used the host at the same time, so these times are high.What this changes
.devcontainer/Dockerfile. It built a private image from an old Microsoft base with an old pixi..devcontainer/from blooop/python_templatemain(withoutci/):"image": "ghcr.io/blooop/python_template/devcontainer:latest",post-create.sh(seedsknown_hosts, runspixi install --frozen), andclaude-code/(forinitializeCommand). The shared image carries pixi, git-lfs, the claude-code feature and the CA fix.init-host.shcreates~/.config/ghas well as~/.claudeon the host.devcontainer.jsonbind-mounts both, and docker refuses a bind source that does not exist. Same fix as blooop/dbw@56511c8.~/.config/ghinto the container. That directory can hold a real OAuth token inhosts.yml. It givesgha login in a container opened withoutdl.~/.claudebind mount from the claude-code feature intodevcontainer.json.runArgs: ["--network=host"]. Nothing in this repo binds or discovers on the LAN../claude-codefeature fromfeatures. The shared image already has it.~/.ssh/known_hosts,~/.ssh/configandSSH_AUTH_SOCKmounts. devpod forwards the ssh agent, andpost-create.shseedsknown_hosts.testdependency, thepylinttask, its place inlintandci,[tool.pylint], the dependabot group entry, the README and docs mentions, the VS Code task text and one# pylint:disablecomment.ruff formatandruff checkstay.0.14.11inpyproject.toml(ruff==0.14.11) and sets theruff-pre-commithook torev: v0.14.11. CI runs ruff throughpixi run ci, so CI, local and pre-commit use the same ruff.pixi.lockwith pixi 0.83 (format v7). The pylint removal drops pylint, astroid, dill, isort, mccabe and tomlkit from the lock. No other package version changes."name": "dev_template"as the last key ofdevcontainer.json, as the template asks.How I checked it
All in a
dlworkspace on this branch (pixi 0.83.0):The
~/.config/ghfix has no pytest test. I proved it with a throwawaydocker runagainst an emptyHOME, before and afterinit-host.sh.Merge danger
Door: two-way. A revert brings back the old Dockerfile, pylint and the old lock.
Blast radius: small. Only the devcontainer, the lint tooling and the lock change. The package code does not change.
Review notes
devcontainer.jsonnames thedev-use-localanddev-use-prebuilttasks and.devcontainer/ci/devcontainer.json, andclaude-code/README.mdnames the sameci/file and aDockerfile. I kept the files identical to python_template so thatupdate-from-template-repomerges cleanly. The fix belongs in python_template.ruff==inpyproject.tomlbut not theruff-pre-commitrev:. A dependabot ruff bump must also change the hookrev:to keep the two the same.🤖 Generated with Claude Code