Repository navigation
fix(devcontainer-setup): pin fnm instead of installing its latest release - #346
Conversation
…ease Fixes one half of trailofbits#330. The generated Dockerfile pins and version-checks most of what it fetches (GIT_DELTA_VERSION, FZF_VERSION, ZSH_IN_DOCKER_VERSION), but fnm's installer defaults to RELEASE="latest", so every devcontainer built from the template took whatever the newest release was at build time. The installer accepts --release, so this pins it the same way as the rest of the file, via an FNM_VERSION arg. The other unpinned install, claude.ai/install.sh, is left alone deliberately: I could not retrieve that script to establish whether it supports a version pin, and I am not going to guess at a flag. Recording that in the PR instead of changing it. Verified by building the image: the run downloads github.com/Schniz/fnm/releases/download/v1.39.0/fnm-linux.zip, so the pin takes effect, and the build completes.
|
Flagging a mechanical blocker rather than a code one, since the diff itself is settled and the review is in. Three required checks on this PR are parked in
If someone with write access can hit Approve and run under the checks, those should complete and the merge gate should clear without any change to the branch. Not asking for a re-review — just making sure this is not sitting behind something only I can see, because from the outside it looks like the checks are simply missing. (For what it is worth, the same three suites are awaiting approval on #311, #347, #348, #349 and #350 as well, so this may be a single fix across all six.) |
|
@claude review |
There was a problem hiding this comment.
Looks good, straightforward config change.
What was reviewed: the Dockerfile diff adding ARG FNM_VERSION=1.39.0 and passing --release "v${FNM_VERSION}" to the fnm installer. Confirmed this matches the existing versioned-install pattern already used for NODE_VERSION, GIT_DELTA_VERSION, etc. in the same file, and that the change is a minimal, self-contained pin with no other logic altered.
Extended reasoning...
Single-file, 4-line addition to a devcontainer resource Dockerfile that pins the fnm installer to a specific release instead of implicitly using "latest", consistent with sibling ARGs in the same file. No security-sensitive surface (no secrets, auth, or injection risk) and no CODEOWNERS or version-bump requirements apply to a resource Dockerfile change. The PR already has an independent approval and no unresolved CHANGES_REQUESTED or objections are evident in the timeline.
|
Just need the version bump, and we should be good to go |
The validate job requires the plugin version to increase whenever a plugin file changes, so clients pull the update. Version was 0.2.4 at the merge base.
|
Can you sync the marketplace version with plugin.json and update from main? |
52eff21 bumped plugin.json to 0.2.5 but left the marketplace entry at 0.2.4, so the two manifests disagreed. The validator requires them to match and the client resolves the plugin through the marketplace entry.
…unpinned-installs
|
Done — You were right that the two manifests disagreed, and the way it happened is worth recording: Both are now I also checked the other four branches in this series for the same split rather than assuming they were fine, since they share the pattern. |
Fixes one half of #330.
What changed
The generated Dockerfile pins and version-checks most of what it fetches —
GIT_DELTA_VERSION,FZF_VERSION,ZSH_IN_DOCKER_VERSION— but fnm's installer defaults toRELEASE="latest", so every devcontainer built from this template took whatever the newest fnm release happened to be at build time.The installer accepts
--release, so this pins it the same way as the rest of the file:I confirmed the flag exists by reading the installer rather than assuming it — it parses
-r | --releasealongside--install-dirand--skip-shell.What I did not change, and why
claude.ai/install.shis still unpinned. I tried to establish whether it accepts a version pin and could not: fetching it returned zero bytes from this machine, so I have no evidence either way about its flags. I am not going to invent one. It needs someone who can read that script, or a documented pin from Anthropic.The
claude-yoloalias is untouched. Whether to document it or drop it is a judgement call about an implicit endorsement, which is the maintainer's to make, not a supply-chain fix.So this is a partial fix and I would rather say so than let the PR look like it closes the issue. If you would prefer it to wait until both installs can be pinned in one change, say so and I will close it.
Verification
Built the image, which is the only thing that proves the pin takes effect:
The URL shows
download/v1.39.0/, so the release is pinned rather than resolved tolatest, and the rest of the build (Node 22 install, zsh-in-docker, plugins) is unaffected.docker build --build-arg TZ=UTCagainst the resources directory, withdocker29.7.2.Diff is one file,
+4/-1.