Loading npm security reports…
Loading npm security reports…
shieldcortex@4.47.7: Agent extension lifecycle risk – flagged | LPM Firewall
npm / shieldcortex / 4.47.7 Trustworthy memory and security for AI agents. Recall debugging, review queue, OpenClaw session capture, and memory poisoning defence for Claude Code, Codex, OpenClaw, LangChain, and MCP agents.
Flagged as agent extension risk
Allowed by default with warning: install-time first-party agent extension setup was detected.
AI security reviewscanned on Nov 12, 2026, 10:51 UTC · by lpm-firewall-ai The postinstall hook performs automatic setup outside the package directory on global installs, including enabling integration defaults and refreshing an existing OpenClaw extension. This is limited to the package's own integration, so it warrants a warning for install-time agent extension setup; no malicious data transfer was identified.
Static reason
One or more suspicious static signals were detected.; source matched previously finalized malicious package; routed for review
Trigger
A global npm installation or update outside CI, when an OpenClaw installation is already present; the automatic refresh can be disabled with SHIELDCORTEX_SKIP_AUTO_OPENCLAW=1.
Impact
Agent behavior may change after installation because ShieldCortex's memory integration is enabled or its hook/plugin files are refreshed without a separate setup command.
Mechanism
The postinstall script writes fresh defaults to ~/.shieldcortex/config.json and can invoke the package's OpenClaw installer, which copies ShieldCortex integration files into OpenClaw directories.
Evidence
package.json scripts/postinstall.mjs dist/setup/openclaw.js ~/.shieldcortex/config.json OpenClaw hooks directory/cortex-memory OpenClaw extensions/shieldcortex-realtime
Decision evidencepublic snapshot Evidence for warning
The postinstall hook runs only for global, non-CI installs and writes fresh-install defaults enabling OpenClaw auto-memory and proactive recall. On a global install, the hook can automatically refresh an existing OpenClaw integration. The refresh path copies the package's cortex-memory hook into an OpenClaw hook directory. Evidence against
The install hook skips local and CI installs; its automatic OpenClaw refresh also respects an opt-out and skips Docker environments. The inspected install flow concerns ShieldCortex's own integration files and settings; no unrelated data collection or outbound transfer was identified. Behavioral surface
Source Child process · Crypto · Dynamic require · Environment variables · Filesystem · Network · Shell · Web socket
Supply chain High entropy strings · Possible obfuscation · URL strings
Manifest No manifest risk signals triggered.
Scanned 285 files · 2.45 MB of source
8 external domains referenced
127.0.0.1 api.shieldcortex.ai blocked.invalid github.com json.schemastore.org registry.npmjs.org shieldcortex.ai www.apple.com Findings24 high · 6 medium · 6 low Source & flagged code28 flagged High Install time lifecycle scripts
Package defines install-time lifecycle scripts.
package.json View on unpkg Medium Ambiguous install lifecycle script
Install-time lifecycle script is not statically allowlisted and needs review.
package.json View on unpkg Shared scanner record · 2 findings · 1 line scripts.postinstall = node scripts/postinstall.mjs
High AI reviewer manipulation
Package text addresses the security reviewer or scanner and tries to influence the review outcome.
README.md View on unpkg Scanner record · 1 line shieldcortex scan "ignore previous instructions"
High Child process
Package source references child process execution.
dist/database/init.js View on unpkg · L8 Code excerpt · 3 lines 8 import { fileURLToPath } from 'url' ;
9 import { execSync } from 'child_process' ;
10 import { runMigrations } from './migrations.js' ;
Code excerpt · 3 lines 53 stdio: ['pipe' , 'inherit' , 'inherit' ],
54 shell: true ,
55 });
dist/database/better-sqlite3-guard.js View file Medium Dynamic require
Package source references dynamic require/import behavior.
dist/database/better-sqlite3-guard.js View on unpkg · L18 Code excerpt · 3 lines 18 import { createRequire } from 'module' ;
19 const require = createRequire (import .meta.url);
20 /**
hooks/openclaw/cortex-memory/handler.ts View file Low Weak crypto
Package source references weak cryptographic algorithms.
hooks/openclaw/cortex-memory/handler.ts View on unpkg · L53 Code excerpt · 5 lines 54 const NOVELTY_CACHE_FILE = path.join (homedir (), ".shieldcortex" , "openclaw-memory-cache.json" );
55 const DEFAULT_NOVELTY_THRESHOLD = 0.88 ;
⋯
117 try {
118 const raw = JSON.parse (await fs.readFile (NOVELTY_CACHE_FILE, "utf-8" ));
119 if (!Array.isArray (raw)) return [];
Medium Install persistence
Source writes installer persistence such as shell profile or service configuration.
dist/setup/deep-clean.js View on unpkg · L19 Code excerpt · 12 lines 19 import os from 'os' ;
20 import { execSync } from 'child_process' ;
21 const PLUGIN_ID = 'shieldcortex-realtime' ;
⋯
27 function resolveHome () {
28 const sudoUser = process.env.SUDO_USER;
29 if (sudoUser) {
⋯
42 }
43 return os.homedir ();
44 }
High Same file environment network execution
A single source file combines environment access, network access, and code or shell execution; review context before blocking.
dist/index.js View on unpkg · L346 Code excerpt · 9 lines 346 ║ Starting Next.js dashboard... ║
347 ║ Dashboard: http://localhost:3030 ║
348 ║ API: http://localhost:3001 ║
⋯
358 if (useStandalone && dashboardPath) {
359 return spawn (process.execPath, ['server.js' ], {
360 cwd: dashboardPath.cwd,
361 stdio: ['ignore' , 'pipe' , 'pipe' ],
362 env: { ...process.env, PORT: '3030' , HOSTNAME: '0.0.0.0' },
dashboard/.next/standalone/dashboard/node_modules/next/dist/compiled/edge-runtime/index.js View file High Command output exfiltration
Source combines command execution, command-output handling, and outbound requests; review data flow before blocking.
dashboard/.next/standalone/dashboard/node_modules/next/dist/compiled/edge-runtime/index.js View on unpkg · L1 Code excerpt · 1 line 1 (()=>{var __webpack_modules__={462 :e=>{e.exports='"use strict";var c=Object.defineProperty,f=Object.getOwnPropertyDescriptor,y=Object.getOwnPropertyNames,S=Object.prototype.hasOwnP...
High External AI agent control surface mutation
Runtime or CLI source writes behavior-bearing configuration into a user or project AI-agent control surface.
dist/setup/uninstall.js View on unpkg Scanner record · 21 lines Runtime or CLI code links a write operation to an explicit external AI-agent control path:
function blockagentuninstall() {
if (isagentcontext()) {
console.error('\n[shieldcortex] blocked: uninstall attempted from agent context.');
console.error('sub-agents cannot uninstall shieldcortex.');
console.error('only human operators can uninstall via interactive tty.\n');
return true;
}
return false;
}
export async function requireconfirmation(action) {
High Trigger reachable external AI agent control surface mutation
Manifest-trigger-reachable source writes behavior-bearing configuration into a user or project AI-agent control surface.
dist/setup/openclaw.js View on unpkg Scanner record · 25 lines Manifest-trigger-reachable source links an external AI-agent control path to a behavior-bearing write operation.
join('/home', username);
try {
if (!fs.statsync(userhome).isdirectory())
continue;
}
catch {
continue;
}
if (fs.existssync(path.join(userhome, '.openclaw')) ||
fs.existssync(path.join(userhome, '.claude'))) {
return userhome;
}
}
}
catch {
High Trigger reachable persistence
A manifest entrypoint or package-local install chain reaches persistence behavior.
dist/service/install.js View on unpkg · L11 Code excerpt · 12 lines Trigger-reachable persistence chain: scripts.start -> dist/index.js -> dist/service/install.js
11 import os from 'os' ;
12 import { execSync } from 'child_process' ;
13 import { fileURLToPath } from 'url' ;
⋯
15 const __filename = fileURLToPath (import .meta.url);
16 const __dirname = path.dirname (__filename);
17 function detectPlatform () {
18
dashboard/.next/standalone/dashboard/.next/server/app/apple-icon.png.body View file High Ships high entropy blob
Package ships high-entropy non-source blobs.
dashboard/.next/standalone/dashboard/.next/server/app/apple-icon.png.body View on unpkg Scanner record · 4 lines path = dashboard/.next/standalone/dashboard/.next/server/app/apple-icon.png.body
kind = high_entropy_blob
sizeBytes = 26212
magicHex = [redacted]
High Payload in excluded dir
Package hides binary, compressed, or executable-looking payloads in test/fixture/hidden paths.
dashboard/.next/standalone/dashboard/.next/server/app/apple-icon.png.body View on unpkg Scanner record · 4 lines path = dashboard/.next/standalone/dashboard/.next/server/app/apple-icon.png.body
kind = payload_in_excluded_dir
sizeBytes = 26212
dashboard/.next/standalone/dashboard/node_modules/next/dist/compiled/commander/index.js#virtual:string-array:round1 View file High Semantic analysis limited
A bounded semantic-analysis stage reached its safety limit; remaining detectors completed, but this package requires AI review.
dashboard/.next/standalone/dashboard/node_modules/next/dist/compiled/commander/index.js#virtual:string-array:round1 View on unpkg Scanner record · 1 line stage = ast_semantic_analysis; reason = ast_parse_error; limitedFiles = 2
dashboard/.next/standalone/dashboard/node_modules/next/dist/build/utils.js View file High Known malware source similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
dashboard/.next/standalone/dashboard/node_modules/next/dist/build/utils.js View on unpkg Scanner record · 6 lines matchType = normalized_sha256
matchedPackage = shieldcortex@4.45.2
matchedPath = dashboard/.next/standalone/dashboard/node_modules/next/dist/build/utils.js
matchedIdentity = npm:c2hpZWxkY29ydGV4:4.45.2
similarity = 1.000
summary = normalized source hash matched finalized malicious source
dist/defence/skill-scanner/scan-skill.js View file High Known malware source similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
dist/defence/skill-scanner/scan-skill.js View on unpkg Scanner record · 6 lines matchType = normalized_sha256
matchedPackage = shieldcortex@4.45.2
matchedPath = dist/defence/skill-scanner/scan-skill.js
matchedIdentity = npm:c2hpZWxkY29ydGV4:4.45.2
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.
scripts/postinstall.mjs View on unpkg Scanner record · 6 lines matchType = normalized_sha256
matchedPackage = shieldcortex@4.45.2
matchedPath = scripts/postinstall.mjs
matchedIdentity = npm:c2hpZWxkY29ydGV4:4.45.2
similarity = 1.000
summary = normalized source hash matched finalized malicious source
dashboard/.next/standalone/dashboard/node_modules/@next/env/dist/index.js View file High Known malware source similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
dashboard/.next/standalone/dashboard/node_modules/@next/env/dist/index.js View on unpkg Scanner record · 6 lines matchType = normalized_sha256
matchedPackage = shieldcortex@4.45.2
matchedPath = dashboard/.next/standalone/dashboard/node_modules/@next/env/dist/index.js
matchedIdentity = npm:c2hpZWxkY29ydGV4:4.45.2
similarity = 1.000
summary = normalized source hash matched finalized malicious source
dashboard/.next/standalone/dashboard/node_modules/next/dist/build/analyze/index.js View file High Known malware source similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
dashboard/.next/standalone/dashboard/node_modules/next/dist/build/analyze/index.js View on unpkg Scanner record · 6 lines matchType = normalized_sha256
matchedPackage = shieldcortex@4.45.2
matchedPath = dashboard/.next/standalone/dashboard/node_modules/next/dist/build/analyze/index.js
matchedIdentity = npm:c2hpZWxkY29ydGV4:4.45.2
similarity = 1.000
summary = normalized source hash matched finalized malicious source
dashboard/.next/standalone/dashboard/node_modules/next/dist/build/babel/loader/get-config.js View file High Known malware source similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
dashboard/.next/standalone/dashboard/node_modules/next/dist/build/babel/loader/get-config.js View on unpkg Scanner record · 6 lines matchType = normalized_sha256
matchedPackage = shieldcortex@4.45.2
matchedPath = dashboard/.next/standalone/dashboard/node_modules[redacted]-config.js
matchedIdentity = npm:c2hpZWxkY29ydGV4:4.45.2
similarity = 1.000
summary = normalized source hash matched finalized malicious source
dashboard/.next/standalone/dashboard/node_modules/next/dist/build/index.js View file High Known malware source similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
dashboard/.next/standalone/dashboard/node_modules/next/dist/build/index.js View on unpkg Scanner record · 6 lines matchType = normalized_sha256
matchedPackage = shieldcortex@4.45.2
matchedPath = dashboard/.next/standalone/dashboard/node_modules/next/dist/build/index.js
matchedIdentity = npm:c2hpZWxkY29ydGV4:4.45.2
similarity = 1.000
summary = normalized source hash matched finalized malicious source
dashboard/.next/standalone/dashboard/node_modules/next/dist/build/next-config-ts/transpile-config.js View file High Known malware source similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
dashboard/.next/standalone/dashboard/node_modules/next/dist/build/next-config-ts/transpile-config.js View on unpkg Scanner record · 6 lines matchType = normalized_sha256
matchedPackage = shieldcortex@4.45.2
matchedPath = dashboard/.next/standalone/dashboard/node_modules/next/dist/build/next-config-ts/transpile-config.js
matchedIdentity = npm:c2hpZWxkY29ydGV4:4.45.2
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/api/routes/xray.js View on unpkg Scanner record · 6 lines matchType = normalized_sha256
matchedPackage = shieldcortex@5.0.1
matchedPath = dist/api/routes/xray.js
matchedIdentity = npm:c2hpZWxkY29ydGV4:5.0.1
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/audit/dependency-scanner.js View on unpkg Scanner record · 6 lines matchType = normalized_sha256
matchedPackage = shieldcortex@4.45.2
matchedPath = dist/audit/dependency-scanner.js
matchedIdentity = npm:c2hpZWxkY29ydGV4:4.45.2
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/update.js View on unpkg Scanner record · 6 lines matchType = normalized_sha256
matchedPackage = shieldcortex@4.45.2
matchedPath = dist/cli/update.js
matchedIdentity = npm:c2hpZWxkY29ydGV4:4.45.2
similarity = 1.000
summary = normalized source hash matched finalized malicious source
High Command output exfiltration Code↓
Package metadata 8 findings
Medium Network
Medium Environment variables
Medium Structural risk force deep review
Low Non install lifecycle scripts
49 const parsed = JSON.parse (fs.readFileSync (file, 'utf-8' ));
50 return typeof parsed === 'object' && parsed !== null
363
});
if (process.argv.includes('--confirm')) {
switch (process.platform) {
19 case 'darwin' : return 'macos' ;
24 function detectDefaultServiceMode (platform) {
25 if (platform === 'linux' && !process.env.DISPLAY && !process.env.WAYLAND_DISPLAY) {
43 // If that absolute path no longer exists, systemd will fail to open it
High Known malware source similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
dist/service/install.js View on unpkg Scanner record · 6 lines matchType = normalized_sha256
matchedPackage = shieldcortex@4.45.2
matchedPath = dist/service/install.js
matchedIdentity = npm:c2hpZWxkY29ydGV4:4.45.2
similarity = 1.000
summary = normalized source hash matched finalized malicious source