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

@explorer02/cfm-survey-sdk@0.9.15

Headless React SDK for custom survey UIs. Matches CFM respondent-view behavior (navigation, logic, validation, progress, submission); you own all presentation.

AI Security Review

scanned 3h 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 without user consent. Default detection writes files for all supported agent targets.

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 inside node_modules
Impact
Hijacks or alters Codex, Claude Code, and Cursor instruction surfaces so future agent sessions follow package-supplied guidance.
Mechanism
postinstall writes AI-agent control stubs into the consumer project root
Policy narrative
On dependency installation, the postinstall script identifies the consumer project root via INIT_CWD and detects AI-agent environment variables. If no agent signal exists, it defaults to all targets and creates or merges package-authored instructions into AGENTS.md, CLAUDE.md, and .cursorrules. Those files direct future coding agents to read the installed package's operating contract before making code changes, modifying a broad foreign AI-agent control surface without an explicit user command.
Rationale
This is a concrete, unconsented postinstall mutation of a consuming project's AI-agent control files. The behavior meets the blocking policy regardless of the absence of credential exfiltration.
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` targets `INIT_CWD` or the consumer project root.
  • `postinstall/detect-agent.js` defaults to `all` when no agent is detected.
  • `postinstall.js` writes project-root `AGENTS.md`, `CLAUDE.md`, and `.cursorrules`.
  • `postinstall/agent-stubs.js` injects instructions directing AI agents to package-controlled documentation.
Evidence against
  • No credential harvesting, exfiltration, or network request was found in the inspected postinstall path.
  • CLI shell/package-manager actions are user-invoked commands, not triggered by installation.
Behavioral surface
Source
ChildProcessEnvironmentVarsFilesystemNetwork
Supply chain
HighEntropyStringsMinifiedUrlStrings
Manifest
NoLicense
scanned 7 file(s), 469 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 ai=Object.create;var an=Object.defineProperty;var li=Object.getOwnPropertyDescriptor;var ci=Object.getOwnPropertyNames;var ui=Object.getPrototypeOf,pi=Object.proto... L3:
High
Child Process

Package source references child process execution.

dist/cli/index.jsView on unpkg · L1
170`),process.exit(1))):(console.log(` L171: \u274C ${u.red}winget package manager is not installed on this system.${u.reset}`),console.log(`${u.bold}\u{1F449} To proceed, please either:${u.reset}`),console.log(" 1. Install... L172: `),process.exit(1)):s?Re("brew")?(console.log(` ... L177: `),process.exit(1))):(console.log(` L178: \u274C ${u.red}Homebrew package manager (brew) is not installed on this system.${u.reset}`),console.log(`${u.bold}\u{1F449} To proceed, please either:${u.reset}`),console.log(" 1... L179: `),process.exit(1)):(console.log(` ... L184: \u26A0\uFE0F ${u.yellow}Global installation failed or permissions restricted.${u.reset}`),console.log(`\u2139 ${u.dim}Falling back: Running Vercel dynamically via npx.${u.reset}`)... L185: ${u.dim}Step 3/4: Checking Vercel Login...${u.reset}`);let t=!!process.env.VERCEL_TOKEN,n=!1;if(t)console.log(`\u2714 ${u.green}VERCEL_TOKEN environment variable detected. Skipping... L186: \u2714 ${u.green}Logged in successfully!${u.reset}`)}return t}M();Se();async function Kn(e,t){console.log(`
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 · L170
1#!/usr/bin/env node L2: "use strict";var ai=Object.create;var an=Object.defineProperty;var li=Object.getOwnPropertyDescriptor;var ci=Object.getOwnPropertyNames;var ui=Object.getPrototypeOf,pi=Object.proto... L3: ... L66: L67: Example reply: "yes, AWS" or "no"`,Xn="CFM_NEXT_STEP=ASK_DEPLOY"});function eo(e){return Zn.join(e,Li)}function to(){return process.env.CFM_SKIP_WORKFLOW_GATE==="1"}function be(e){... L68: `,"utf8")}function no(e){let t=be(e);bt(e,{version:1,coreVerifyPassedAt:new Date().toISOString(),layoutVerifyPassedAt:t?.layoutVerifyPassedAt??null,deployConfirmed:t?.deployConfirm... L69: `).length}function At(e,t,n){let o=new Set;if(t==="fastPath"){let s=e.fastPath;for(let r of s?.read??[])o.add(r)}else if(t==="phase"&&n!==void 0){let r=e.phases?.find(i=>String(i.i... ... L82: Source: ${e.source}`),console.log(n),console.log(""),!1}function $t(e,t,n=!1){let o=Ka(t,n);return o.length?Wa({title:"INSTALL SURVEY-TYPE DEPS (run once before Phase 6)",packages:... L83: `)){let o=n.trim();if(!o||o.startsWith("#"))continue;let s=o.indexOf("=");if(s<=0)continue;let r=o.slice(0,s).trim(),i=o.slice(s+1).trim();(i.startsWith('"')&&i.endsWith('"')||i.st... L84: `)}function Ir(e){r
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
177`),process.exit(1))):(console.log(` L178: \u274C ${u.red}Homebrew package manager (brew) is not installed on this system.${u.reset}`),console.log(`${u.bold}\u{1F449} To proceed, please either:${u.reset}`),console.log(" 1... L179: `),process.exit(1)):(console.log(` ... L182: ${u.dim}Step 2/4: Checking Vercel CLI...${u.reset}`);let e="vercel",t=!1;if(Re("vercel"))console.log(`\u2714 ${u.green}Vercel CLI is installed!${u.reset}`);else{console.log(`\u2753... L183: \u{1F4E5} ${u.cyan}Installing Vercel CLI globally... (npm install -g vercel)${u.reset}`),se("npm",["install","-g","vercel"])&&Re("vercel")?console.log(`\u2714 ${u.green}Vercel CLI ... L184: \u26A0\uFE0F ${u.yellow}Global installation failed or permissions restricted.${u.reset}`),console.log(`\u2139 ${u.dim}Falling back: Running Vercel dynamically via npx.${u.reset}`)...
High
Runtime Package Install

Package source invokes a package manager install command at runtime.

dist/cli/index.jsView on unpkg · L177
matchType = normalized_sha256 matchedPackage = @explorer02/cfm-survey-sdk@0.9.14 matchedPath = dist/cli/index.js matchedIdentity = npm:[redacted]:0.9.14 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 = a950fc362b2393d4 signatureType = suspicious_hashes sourceLabel = final_verdict:malicious matchedPackage = @explorer02/cfm-survey-sdk@0.9.14 matchedPath = dist/cli/index.js matchedIdentity = npm:[redacted]:0.9.14 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 = 12551 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.9.14 matchedPath = dist/cli/index.mjs matchedIdentity = npm:[redacted]:0.9.14 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.9.14 matchedPath = dist/index.js matchedIdentity = npm:[redacted]:0.9.14 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