fix(incident): add manual intel for the May 2026 @antv npm compromise#134
Merged
Conversation
Adds known-compromised package/version entries for the May 2026 npm
supply-chain incident affecting the AntV visualization libraries and
a small set of related packages. The embedded OSV snapshot did not
carry these tuples at the time of writing, so aguara check returned
clean on installed trees and pnpm-lock.yaml lockfiles that pinned
the malicious versions.
Coverage added (npm ecosystem):
- @antv/g2 5.5.8, 5.6.8
- @antv/g6 5.2.1, 5.3.1
- @antv/x6 3.2.7, 3.3.7
- @antv/l7 2.26.10, 2.27.10
- @antv/f2 5.16.0
- @antv/data-set 0.12.8, 0.13.8
- echarts-for-react 3.0.7, 3.1.7, 3.2.7
- timeago.js 4.1.2
- size-sensor 1.0.4, 1.1.4, 1.2.4
- canvas-nest.js 2.2.4
Every entry is verified against the npm registry: the registry's
deprecated field on the version carries an explicit security,
"risk", "published in error", or malicious-version notice from the
package maintainer. Versions without that registry-side signal are
intentionally omitted even when third-party trackers list the
package.
The TanStack / Mistral / UiPath wave reported in the same campaign
is already covered by the embedded OSV snapshot (MAL-2026-3432 and
adjacent MAL-2026-* records) and is not duplicated here.
Tests:
- TestCheckNPM_MiniShaiHulud_AntvWave verifies the installed-tree
(node_modules) path emits CRITICAL findings with the advisory
ID in the title for one scoped and one unscoped package.
- TestCheckNPM_MiniShaiHulud_NeighborVersionDoesNotFalsePositive
pins adjacent clean versions and asserts no findings, guarding
against accidental range expansion in future intel updates.
- TestCheck_PnpmLockMiniShaiHuludAntvFiresFinding wires the new
testdata/pnpm-mini-shai-hulud-antv fixture through the full
CLI dispatch, asserting CRITICAL findings on a pre-install
pnpm-lock.yaml (no node_modules present).
Existing TestKnownCompromisedSnapshotParity continues to pass and
exercises every new entry through the intel matcher path.
Bumps knownCompromisedGeneratedAt to 2026-05-19 so the manual snapshot's GeneratedAt covers the freshest entry added in this branch. Without the bump, `aguara check --format json` would report an intel freshness timestamp older than the very incident it just detected, which breaks dashboards that gate on intel age. Adds TestKnownCompromisedSnapshotGeneratedAtCoversFreshestEntry which walks KnownCompromised, parses each Date string, and requires snap.GeneratedAt >= max(Date). The test fails with a direct error message pointing at intel_adapter.go and the entry that triggered the violation, so the next person to add manual intel sees exactly what to bump.
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
Adds known-compromised package/version entries for the May 2026 npm supply-chain incident affecting the AntV visualization libraries and a small set of related packages.
The embedded OSV snapshot did not carry these tuples at the time of writing, so
aguara checkreturned clean on installed trees andpnpm-lock.yamllockfiles that pinned the malicious versions.Coverage added (npm ecosystem)
deprecatedfield@antv/g2"risk"@antv/g6"SECURITY: This version was published with a compromised key. Do not use this version."@antv/x6"This version was published in error..."@antv/l7"恶意版本"(malicious version)@antv/f2"risk"@antv/data-set"This version was published in error..."echarts-for-react"This version was published in error..."timeago.js"This version was published in error..."size-sensor"This version was published in error..."canvas-nest.js"This version was published in error..."Verification policy
Every entry is verified against
registry.npmjs.org. Thedeprecatedfield on the version must carry an explicit security,"risk","published in error", or malicious-version notice from the package maintainer. Versions without that registry-side signal were omitted even when third-party trackers list the package.The TanStack / Mistral / UiPath wave reported in the same campaign is already covered by the embedded OSV snapshot (
MAL-2026-3432and adjacentMAL-2026-*records) and is not duplicated here.Snapshot freshness
knownCompromisedGeneratedAtis bumped to2026-05-19so the manual snapshot'sGeneratedAtcovers the new entries. A regression test (TestKnownCompromisedSnapshotGeneratedAtCoversFreshestEntry) walksKnownCompromised, parses everyDatestring, and requiressnap.GeneratedAt >= max(Date). Future intel additions that forget the bump fail the suite with a direct pointer atintel_adapter.go.Tests
TestCheckNPM_MiniShaiHulud_AntvWave: installed-tree (node_modules) path emits CRITICAL with the advisory ID in the finding title; covers one scoped and one unscoped package.TestCheckNPM_MiniShaiHulud_NeighborVersionDoesNotFalsePositive: pins adjacent clean versions; asserts no findings. Regression guard against accidental range expansion in future intel updates.TestCheck_PnpmLockMiniShaiHuludAntvFiresFinding: newtestdata/pnpm-mini-shai-hulud-antv/pnpm-lock.yamlfixture wired through the full CLI; asserts CRITICAL on a pre-installpnpm-lock.yaml(nonode_modulespresent).TestKnownCompromisedSnapshotGeneratedAtCoversFreshestEntry: new freshness guard described above.TestKnownCompromisedSnapshotParitycontinues to pass and exercises every new entry through the intel matcher path.End-to-end side-by-side
Scope
KnownCompromised.knownCompromisedGeneratedAt.Test plan
go test -race -count=1 ./...cleango vet ./...cleangolangci-lint run ./...0 issuesVERSION=v0.18.0 .github/scripts/check-version-pins.shcleanghcr.io/garagon/aguara:0.18.0shows the gap closes