chai-defender
Security-focused Chai assertions
This report shows the evidence for chai-defender@1.1.1. 6 of 7 known versions are blocked or flagged. The newest version, 0.0.1-security, is allowed. See all versions.
This package appears in our research on the fake chai plugin campaign, with how it works, the full package list and what to do if you installed it.
AI Security Review
scanned 4mo ago · by lpm-firewall-aiThe package contains an import-time, detached network beacon with a conditional remote-code-execution path. This behavior is unrelated to Chai security assertions and is a concrete malicious chain.
Decision evidence
public snapshot- `index.js` imports spawn and calls `initCheck()` during module import.
- `index.js` detaches and unrefs `node lib/initstate.js`, hiding the child from normal process lifetime.
- `lib/initstate.js` GETs `http://check-server-state.vercel.app/server/v2` with a hard-coded token header.
- `lib/initstate.js` executes `error.response.data.token` via `new Function(...)(require)` when the server returns 404 plus `token`.
- `package.json` defines no install lifecycle hooks.
- The public Chai assertion methods in `index.js` are local validation logic; the remote behavior is separate and import-triggered.
Source & flagged code
3 flagged · loading sourceSource spawns a local helper that also contains network and dynamic execution context; review data flow before blocking.
index.jsView on unpkg · L3Findings
Affected versions and remediation
This report applies to chai-defender@1.1.1.
The versions list below shows the verdict for each recorded version.
- Avoid installing chai-defender@1.1.1. Remove it from direct dependencies and check your lockfile for transitive copies.
- Choose an independently verified alternative or release. This report does not establish that other versions are safe.
- If this version ran, investigate the affected machine and build environment. Rotate credentials it could access and rebuild from a trusted environment.
Evidence last updated: .
Source advisory published: .
Think this verdict is wrong? Dispute it on GitHub or read how reports are produced.