Repository navigation
Description
Found by a local review on #3859, then measured on a Windows host with Docker Desktop's WSL2 backend against a synthetic home.
Defect
Each catalog devcontainer snippet declares its public key and allowed_signers mounts in the object form with "readonly": true. The Dev Containers CLI drops that key. So docs/devcontainer.md's read-only mode for those rows is false, and the host files are writable from inside the container.
Measured with devcontainer up from the extension's bundled CLI (extension 0.469.0), using the Python snippet with its image tag replaced because of #3858:
docker inspectreportsRW=truefor/home/vscode/.ssh/id_ed25519.puband/home/vscode/.config/git/allowed_signers.echo "# synthetic write" >> /home/vscode/.config/git/allowed_signers, run asvscodein the container, succeeded, and the line appeared in the host's file.
Why It Matters
allowed_signers is the file git verify-commit and git log --show-signature trust on the host. A process in the container can add a signer to it, and that outlives the container. The docs tell a reader this cannot happen.
The review read the CLI's generateMountCommand as emitting only type, src, and dst for the object form, which matches this measurement. It was not traced further, and the CLI's supported route to a read-only bind mount is part of this work to confirm.
Reach
Both snippets declare the mounts this way, and ptr727/ESPHome-Config's .devcontainer/python/devcontainer.json carries the same lines. Nothing here depends on the host platform, so a Linux host can fix and verify it.
Done When
- A container started from each snippet reports
RW=falsefor both mounts, and the write above is refused. docs/devcontainer.md's table matches what the mounts do.- The
ghconfig mount stays read-write.
Bounds
The same mounts lines are touched by #1763, whichever lands second rebases over the first. #3858 holds the image tags that stop a snippet starting at all.
Activity
Document a Windows Devcontainer Launch With HOME and USERPROFILE Set (#…
Promote Develop: Document a Windows Devcontainer Launch With Both Hom…
Repoint the Devcontainer Snippets at Images That Start (#3866)
Make the Devcontainer Snippets' Read-Only Mounts Actually Read-Only (#…