REMEDIATION: a relock that shrinks the lockfile may be a false green - #16
Merged
Conversation
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
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.
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 installproduced a lockfile that scanned green by cutting the graph from 52 npm entries to 7.markdown-itandlinkify-itstopped 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
fold-enginefold-engine(correct regen)nunjuckssubtree nothing imports, plus a duplicatezodcollapsinglima-devshellwindows-syscollapsed to one versionSo 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-itstaying red is what made the other seven fixes believable.Deno-specific cause, since it will recur
deno installresolves only theimportsmap 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