Skip to content

Instantly share code, notes, and snippets.

@achantavy
Created September 8, 2025 20:54
Show Gist options
  • Select an option

  • Save achantavy/3309d0827675f2616553b2275e528570 to your computer and use it in GitHub Desktop.

Select an option

Save achantavy/3309d0827675f2616553b2275e528570 to your computer and use it in GitHub Desktop.
cartography-query-to-find-npm-debug-and-chalk-supply-chain-compromised-packages
// https://www.aikido.dev/blog/npm-debug-and-chalk-packages-compromised
// Note: this is a starting point. Verify with the version numbers in the article above.
// You can update the WHERE clause below with `d.requirements CONTAINS "x.y.z"`
MATCH (d:Dependency)--(r:GitHubRepository)
WHERE d.ecosystem = 'npm'
AND d.name IN ['backslash','chalk-template','supports-hyperlinks','has-ansi','simple-swizzle','color-string','error-ex','color-name','is-arrayish','slice-ansi','color-convert','wrap-ansi','ansi-regex','supports-color','strip-ansi','chalk','debug','ansi-styles']
RETURN d.name, d.requirements, d.manifest_file, r.id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment