fix(scan): match renamed compromised packages header#74
Merged
Conversation
The upstream Cobenian/shai-hulud-detect compromised-packages.txt header was renamed from "Shai-Hulud NPM Supply Chain Attack" to "Shai-Hulud Supply Chain Attack - Compromised Packages List", causing `vtk scan repo` to fail validation with a false MITM/corrupted-file warning. Switch the expected-header check to a regex (`Shai-Hulud.*Supply Chain Attack`) so both the old and new wordings validate while still being specific enough to catch a tampered or unrelated file. Reported by Catalina Espinoza.
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.
Summary
Cobenian/shai-hulud-detect/compromised-packages.txtheader was renamed fromShai-Hulud NPM Supply Chain AttacktoShai-Hulud Supply Chain Attack - Compromised Packages List, breakingvtk scan repowith a falsepossible MITM or corrupted fileerrorShai-Hulud.*Supply Chain Attack) so both old and new wordings pass, while still rejecting unrelated or tampered filesTest plan
bash scripts/shai-hulud-repo-check.sh --refresh /tmp→ cached 2,123 packages, status CLEANvtk scan repoworks against a real repo with a lockfile-notmatchis built-in, no escape needed)