registry  /  @explorer02/cfm-survey-sdk  /  0.8.8

@explorer02/cfm-survey-sdk@0.8.8

A headless React SDK for building survey experiences. Give it a survey instance and it handles fetching, page navigation, answer state, validation, progress, and submission — you keep full control over the markup and styling.

AI Security Review

scanned 2h ago · by lpm-firewall-ai

LPM blocks this version under the AI-agent control-surface policy. Installation mutates the consuming project's AI-agent instruction files. With no detected agent, it writes all supported control files by default. This is an unconsented postinstall modification of a broad foreign AI-agent control surface.

Static reason
High-risk behavior combination matched malicious policy.; source matched previously finalized malicious package; routed for review; source fingerprint signature matched known malicious package; routed for review
Trigger
`npm install` of the package as a dependency
Impact
Future Codex, Claude Code, or Cursor sessions can be redirected to follow package-supplied instructions.
Mechanism
postinstall detects agent environment and writes/merges agent instruction stubs at the consumer project root
Policy narrative
On dependency installation, the lifecycle hook identifies the consumer project and automatically writes agent-control files there. If no supported agent signal is present, detection defaults to `all`, causing `AGENTS.md`, `CLAUDE.md`, and `.cursorrules` to be created or merged. Those files direct future AI coding agents to a package-provided operating contract, giving the package persistent influence over unrelated project agent behavior without an explicit user command.
Rationale
Source confirms a concrete unconsented postinstall mutation of consumer-project AI-agent control files. The absence of exfiltration does not remove this foreign broad control-surface hijack.
Evidence
package.jsonpostinstall.jspostinstall/detect-agent.jspostinstall/agent-stubs.jstemplates/AGENT.mdAGENTS.mdCLAUDE.md.cursorrules

Decision evidence

public snapshot
AI called this Malicious at 99.0% confidence as Malware with low false-positive risk.
Evidence for policy block
  • `package.json` runs `node postinstall.js` on installation.
  • `postinstall.js` activates for consumer installs under `node_modules` and targets `INIT_CWD` or the consumer project root.
  • `postinstall/detect-agent.js` defaults to `all` when no agent environment is detected.
  • `postinstall.js` writes project-root `AGENTS.md`, `CLAUDE.md`, and `.cursorrules` without user confirmation.
  • `postinstall/agent-stubs.js` injects instructions directing coding agents to package-owned `templates/AGENT.md`.
Evidence against
  • The postinstall source contains no network request, credential harvesting, shell execution, or destructive file deletion.
  • Written stubs are small redirects to a package-local document rather than a remote payload.
Behavioral surface
Source
ChildProcessEnvironmentVarsFilesystemNetwork
Supply chain
HighEntropyStringsMinifiedUrlStrings
Manifest
NoLicense
scanned 7 file(s), 382 KB of source, external domains: custom-p0.feedbook.me, distribution-dashboard-three.vercel.app, nodejs.org, raw.githubusercontent.com

Source & flagged code

12 flagged · loading source
package.jsonView file
scripts.postinstall = node postinstall.js
High
Install Time Lifecycle Scripts

Package defines install-time lifecycle scripts.

package.jsonView on unpkg
scripts.postinstall = node postinstall.js
Medium
Ambiguous Install Lifecycle Script

Install-time lifecycle script is not statically allowlisted and needs review.

package.jsonView on unpkg
dist/cli/index.jsView file
1#!/usr/bin/env node L2: "use strict";var Di=Object.create;var It=Object.defineProperty;var _i=Object.getOwnPropertyDescriptor;var Oi=Object.getOwnPropertyNames;var Ni=Object.getPrototypeOf,Mi=Object.proto... L3: `).length}function wt(e,t,n){let o=new Set;if(t==="fastPath"){let i=e.fastPath;for(let r of i?.read??[])o.add(r)}else if(t==="phase"&&n!==void 0){let r=e.phases?.find(s=>String(s.i...
High
Child Process

Package source references child process execution.

dist/cli/index.jsView on unpkg · L1
1#!/usr/bin/env node L2: "use strict";var Di=Object.create;var It=Object.defineProperty;var _i=Object.getOwnPropertyDescriptor;var Oi=Object.getOwnPropertyNames;var Ni=Object.getPrototypeOf,Mi=Object.proto... L3: `).length}function wt(e,t,n){let o=new Set;if(t==="fastPath"){let i=e.fastPath;for(let r of i?.read??[])o.add(r)}else if(t==="phase"&&n!==void 0){let r=e.phases?.find(s=>String(s.i... ... L7: `,"utf8"),console.log(` L8: ${R.green}OK:${R.reset} Wrote docInventory to MANIFEST.json`)}return s.ok||e.warnOnly?0:e.ci||s.slow.length>0?1:0}function Lt(e){let t=e??kt(),n=Rt(t),o=wt(n,"fastPath"),i=Et(t,o,"... L9:
High
Same File Env Network Execution

A single source file combines environment access, network access, and code or shell execution; review context before blocking.

dist/cli/index.jsView on unpkg · L1
1#!/usr/bin/env node L2: "use strict";var Di=Object.create;var It=Object.defineProperty;var _i=Object.getOwnPropertyDescriptor;var Oi=Object.getOwnPropertyNames;var Ni=Object.getPrototypeOf,Mi=Object.proto... L3: `).length}function wt(e,t,n){let o=new Set;if(t==="fastPath"){let i=e.fastPath;for(let r of i?.read??[])o.add(r)}else if(t==="phase"&&n!==void 0){let r=e.phases?.find(s=>String(s.i... L4: ${R.bold}Doc read budget audit (${s.profile})${R.reset}`),console.log("\u2500".repeat(40));for(let a of s.entries){let l=a.tier==="ok"?`${R.green}OK ${R.reset}`:a.tier==="warn"?`$... ... L7: `,"utf8"),console.log(` L8: ${R.green}OK:${R.reset} Wrote docInventory to MANIFEST.json`)}return s.ok||e.warnOnly?0:e.ci||s.slow.length>0?1:0}function Lt(e){let t=e??kt(),n=Rt(t),o=wt(n,"fastPath"),i=Et(t,o,"... L9: ... L74: Source: ${e.source}`),console.log(n),console.log(""),!1}function at(e,t,n=!1){let o=_r(t,n);return o.length?Mr({title:"INSTALL SURVEY-TYPE DEPS (run once before Phase 6)",packages:... L75: `)){let o=n.trim();if(!o||o.startsWith("#"))continue;let i=o.indexOf("=");if(i<=0)continue;let r=o.slice(0,i).trim(),s=o.slice(i+1).trim();(s.startsWith('"')&&s.endsWith('"')||s.st... L76:
High
Sandbox Evasion Gated Capability

Source gates dangerous network, credential, or execution behavior behind CI, host, platform, time, or geo fingerprint checks.

dist/cli/index.jsView on unpkg · L1
1#!/usr/bin/env node L2: "use strict";var Di=Object.create;var It=Object.defineProperty;var _i=Object.getOwnPropertyDescriptor;var Oi=Object.getOwnPropertyNames;var Ni=Object.getPrototypeOf,Mi=Object.proto... L3: `).length}function wt(e,t,n){let o=new Set;if(t==="fastPath"){let i=e.fastPath;for(let r of i?.read??[])o.add(r)}else if(t==="phase"&&n!==void 0){let r=e.phases?.find(s=>String(s.i... ... L5: ${R.dim}Total: ${s.totalLines} lines across ${s.entries.length} paths${R.reset}`),s.slow.length>0){console.log(` L6: ${R.yellow}A few doc reads are taking longer than expected even from temp files:${R.reset}`);for(let a of s.slow){let l=a.hint?` \u2014 ${a.hint}`:"";console.log(` - ${a.relPath} ... L7: `,"utf8"),console.log(`
High
Runtime Package Install

Package source invokes a package manager install command at runtime.

dist/cli/index.jsView on unpkg · L1
matchType = normalized_sha256 matchedPackage = @explorer02/cfm-survey-sdk@0.8.7 matchedPath = dist/cli/index.js matchedIdentity = npm:[redacted]:0.8.7 similarity = 1.000 summary = normalized source hash matched finalized malicious source
High
Known Malware Source Similarity

Source file is highly similar to a previously finalized malicious package; route for source-aware review.

dist/cli/index.jsView on unpkg
matchType = malicious_source_fingerprint_signature signature = 895d247497209a4c signatureType = suspicious_hashes sourceLabel = final_verdict:malicious matchedPackage = @explorer02/cfm-survey-sdk@0.8.7 matchedPath = dist/cli/index.js matchedIdentity = npm:[redacted]:0.8.7 similarity = 1.000 shingleOverlap = 6 summary = package final verdict is malicious
High
Known Malware Source Fingerprint Signature

Source fingerprint signature matches a known malicious package signature; route for source-aware review.

dist/cli/index.jsView on unpkg
postinstall.jsView file
24Install-time AI-agent control hijack evidence: L34: L35: fs.writeFileSync(filePath, newContent, 'utf8'); L36: } ... L41: function writeClaudeMd(targetDir) { L42: const filePath = path.join(targetDir, 'CLAUDE.md'); L43: const stub = getClaudeMdStub(); ... L47: if (!canUpdateClaudeMd(existing)) { L48: console.log('Skipped CLAUDE.md (custom content outside @AGENTS.md bridge)'); L49: return; ... L51: if (existing.trim() === stub.trim()) { L52: console.log('CLAUDE.md already up to date'); L53: return; Payload evidence from postinstall/detect-agent.js: L24: */ L25: function detectAgent(env = process.env) { L26: const override = env.CFM_SDK_AGENT;
Critical
Ai Agent Control Hijack

Install-time source drops package-supplied AI-agent/MCP control files or instructions.

postinstall.jsView on unpkg · L24
templates/docs/survey-ui/verify-agent-build.shView file
path = templates/docs/survey-ui/verify-agent-build.sh kind = build_helper sizeBytes = 10511 magicHex = [redacted]
Medium
Ships Build Helper

Package ships non-JavaScript build or shell helper files.

templates/docs/survey-ui/verify-agent-build.shView on unpkg
dist/cli/index.mjsView file
matchType = normalized_sha256 matchedPackage = @explorer02/cfm-survey-sdk@0.8.7 matchedPath = dist/cli/index.mjs matchedIdentity = npm:[redacted]:0.8.7 similarity = 1.000 summary = normalized source hash matched finalized malicious source
High
Known Malware Source Similarity

Source file is highly similar to a previously finalized malicious package; route for source-aware review.

dist/cli/index.mjsView on unpkg
dist/index.jsView file
matchType = normalized_sha256 matchedPackage = @explorer02/cfm-survey-sdk@0.8.7 matchedPath = dist/index.js matchedIdentity = npm:[redacted]:0.8.7 similarity = 1.000 summary = normalized source hash matched finalized malicious source
High
Known Malware Source Similarity

Source file is highly similar to a previously finalized malicious package; route for source-aware review.

dist/index.jsView on unpkg

Findings

1 Critical9 High5 Medium6 Low
CriticalAi Agent Control Hijackpostinstall.js
HighInstall Time Lifecycle Scriptspackage.json
HighChild Processdist/cli/index.js
HighSame File Env Network Executiondist/cli/index.js
HighSandbox Evasion Gated Capabilitydist/cli/index.js
HighRuntime Package Installdist/cli/index.js
HighKnown Malware Source Similaritydist/cli/index.js
HighKnown Malware Source Similaritydist/cli/index.mjs
HighKnown Malware Source Similaritydist/index.js
HighKnown Malware Source Fingerprint Signaturedist/cli/index.js
MediumAmbiguous Install Lifecycle Scriptpackage.json
MediumNetwork
MediumEnvironment Vars
MediumShips Build Helpertemplates/docs/survey-ui/verify-agent-build.sh
MediumStructural Risk Force Deep Review
LowNon Install Lifecycle Scripts
LowScripts Present
LowFilesystem
LowHigh Entropy Strings
LowUrl Strings
LowNo License