Skip to content

REMEDIATION: a relock that shrinks the lockfile may be a false green - #16

Merged
bdelanghe merged 1 commit into
mainfrom
claude/remediation-lockfile-shrink
Jul 31, 2026
Merged

REMEDIATION: a relock that shrinks the lockfile may be a false green#16
bdelanghe merged 1 commit into
mainfrom
claude/remediation-lockfile-shrink

Conversation

@bdelanghe

Copy link
Copy Markdown
Contributor

The ladder tells you how to move versions but never says to check what the relock removed. Three cases in one wave made that concrete — and two of them point in opposite directions, which is exactly why it needs writing down rather than left to instinct.

The false green

fold-engine, deno: a plain deno install produced a lockfile that scanned green by cutting the graph from 52 npm entries to 7. markdown-it and linkify-it stopped being findings because they stopped being present — including a CVSS 8.7.

The scanner reads the lock. A package that isn't in it can't be reported. That is indistinguishable from a real fix if you only look at the check mark.

But a shrink isn't automatically wrong

repo change verdict
fold-engine 52 → 7 false green — whole lume subtree vanished
fold-engine (correct regen) 52 → 46 fine — stale nunjucks subtree nothing imports, plus a duplicate zod collapsing
lima-devshell 106 → 97 fine — cfg-gated Windows/wasi crates dropped when windows-sys collapsed to one version

So the rule can't be "a shrink is bad". It's: read the list of what left, not the number.

The signal that's cheap and easy to miss

A finding that is still reported after the relock proves the scan didn't go quiet by omission. On the correct fold-engine regen, markdown-it staying red is what made the other seven fixes believable.

Deno-specific cause, since it will recur

deno install resolves only the imports map and silently drops everything reachable through remote URL imports. Regenerate through the real entrypoints: deno cache src/main.ts src/cli.ts.

Verification

The diff-the-lock snippet was run against a real before/after pair (bounded-tools-mcp, 175 → 175, nothing gone) rather than written from memory.

Placed after rung 1 with a note that it applies to every rung that regenerates a lock.


Generated by Claude Code

The ladder told you how to move versions but never said to check what the
relock REMOVED. Three cases in one wave made that gap concrete, and two of them
point in opposite directions — which is the whole reason this needs writing
down rather than leaving to instinct.

fold-engine, deno: `deno install` produced a lockfile that scanned GREEN by
cutting the graph from 52 npm entries to 7. markdown-it and linkify-it stopped
being findings because they stopped being present — including a CVSS 8.7. The
scanner reads the lock; a package not in it cannot be reported. That is
indistinguishable from a real fix if you only look at the check mark.

fold-engine again, regenerated correctly through the task entrypoints: 52 -> 46.
Also a shrink, and this one is fine — a stale nunjucks subtree nothing in src/
imports, plus a duplicate zod collapsing.

lima-devshell, cargo: 106 -> 97, also fine — cfg-gated Windows/wasi crates
dropped when windows-sys collapsed to a single version.

So the rule cannot be "a shrink is bad". It is: read the list of what left, not
the number. If a package carrying an advisory disappeared, a finding has been
hidden; if what left is duplicate versions collapsing or an unimported subtree,
carry on.

Includes the strongest available signal, which is cheap and easy to miss: a
finding that is STILL reported after the relock proves the scan did not go
quiet by omission. On the correct fold-engine regen, markdown-it staying red is
what made the other seven fixes believable.

Also records the deno-specific cause, since it will recur: `deno install`
resolves only the imports map and silently drops everything reachable through
remote URL imports. Regenerate with `deno cache <entrypoints>` instead.

The diff-the-lock snippet was run against a real before/after pair
(bounded-tools-mcp, 175 -> 175, nothing gone) rather than written from memory.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LF9Cu8u4dkCEM8MXC1QeDL
@bdelanghe
bdelanghe marked this pull request as ready for review July 31, 2026 03:26
@bdelanghe
bdelanghe merged commit 6d6d6fa into main Jul 31, 2026
10 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in Front Desk Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants