Loading npm security reports…
Loading npm security reports…
shieldcortex@5.20.2: Agent extension lifecycle risk – flagged | LPM Firewall
npm / shieldcortex / 5.20.2 Trustworthy memory and security for AI agents. Memory firewall for any host that writes through it; runtime tool gates on Claude Code, OpenClaw, and Hermes.
Flagged as agent extension risk
Allowed by default with warning: install-time first-party agent extension setup was detected.
AI security reviewscanned on Nov 22, 2026, 21:30 UTC · by lpm-firewall-ai The reachable global postinstall path automatically refreshes and registers ShieldCortex’s own OpenClaw integration when it detects an existing OpenClaw installation. The behavior serves the package’s stated purpose and is bounded by install conditions, but install-time agent configuration changes merit a warning.
Static reason
One or more suspicious static signals were detected.; source matched previously finalized malicious package; routed for review
Trigger
The package’s postinstall runs on a global install outside CI when OpenClaw is already installed, unless SHIELDCORTEX_SKIP_AUTO_OPENCLAW=1 is set; Docker also skips the refresh.
Impact
The package’s agent integration is refreshed and enabled without a separate user command. This is an agent-extension lifecycle risk; no credential theft or unrelated payload behavior was established.
Mechanism
Postinstall invokes `shieldcortex openclaw install`, which refreshes the package’s hook/plugin and registers its own plugin in OpenClaw configuration.
Evidence
scripts/postinstall.mjs dist/setup/openclaw.js ~/.openclaw/openclaw.json ~/.openclaw/extensions/shieldcortex-realtime ~/.openclaw/hooks
public snapshot
Evidence for warning
On global installs outside CI, postinstall refreshes an existing OpenClaw installation unless SHIELDCORTEX_SKIP_AUTO_OPENCLAW=1 is set. The refresh runs `shieldcortex openclaw install`; that setup registers the package’s plugin in OpenClaw configuration so it can execute. The manifest identifies ShieldCortex as an AI-agent memory and security integration, and the README describes its OpenClaw integration. Evidence against
The automatic refresh is limited to global installs with an existing OpenClaw installation; CI, Docker, and the documented opt-out prevent it. The inspected credential-scanner matches are detection patterns, not evidence that credentials are read and sent; no malicious credential flow 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 465 files · 6.96 MB of source
26 external domains referenced
127.0.0.1 api.anthropic.com api.deepseek.com api.example.com api.github.com api.minimax.io api.openai.com api.osv.dev api.shieldcortex.ai api.x.ai blocked.invalid chatgpt.com clawhub.ai evil.example evil.sh generativelanguage.googleapis.com github.com hooks.example.com inference-api.nousresearch.com json.schemastore.org openrouter.ai portal.qwen.ai pypi.org registry.npmjs.org shieldcortex.ai www.apple.com Findings24 high · 7 medium · 6 low Source & flagged code29 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 · L10 Code excerpt · 3 lines 10 import { fileURLToPath } from 'url' ;
11 import { execSync } from 'child_process' ;
12 import { runMigrations } from './migrations.js' ;
Code excerpt · 3 lines 161 stdio: ['pipe' , 'inherit' , 'inherit' ],
162 shell: true ,
163 });
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 · L17 Code excerpt · 3 lines 17 * • REQUIRING the package resolves JAVASCRIPT ONLY. `lib/index.js` is
18 * `require('./database')(require('./binding').getBinding, true)` , which
19 * hands `getBinding` over as a FUNCTION; no `.node` file is opened. So the
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 · L57 Code excerpt · 11 lines 58 const NOVELTY_CACHE_FILE = path.join (homedir (), ".shieldcortex" , "openclaw-memory-cache.json" );
59 const DEFAULT_NOVELTY_THRESHOLD = 0.88 ;
⋯
121 try {
122 const raw = JSON.parse (await fs.readFile (NOVELTY_CACHE_FILE, "utf-8" ));
123 if (!Array.isArray (raw)) return [];
⋯
632
Medium Install persistence
Source writes installer persistence such as shell profile or service configuration.
dist/setup/deep-clean.js View on unpkg · L21 Code excerpt · 12 lines 21 import os from 'os' ;
22 import { execFileSync, execSync } from 'child_process' ;
23 import { gatewayRestartCommand } from './gateway-restart-command.js' ;
⋯
35 function resolveHome () {
36 const sudoUser = process.env.SUDO_USER;
37 if (sudoUser && SAFE_USERNAME.test (sudoUser)) {
⋯
50 }
51 return os. ();
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 · L359 Code excerpt · 9 lines 359 ║ Starting Next.js dashboard... ║
360 ║ Dashboard: http://localhost:3030 ║
361 ║ API: http://localhost:3001 ║
⋯
371 if (useStandalone && dashboardPath) {
372 return spawn (process.execPath, ['server.js' ], {
373 cwd: dashboardPath.cwd,
374 stdio: ['ignore' , 'pipe' , 'pipe' ],
375 env: { ...process.env, PORT: '3030' , HOSTNAME: '127.0.0.1' },
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__={687 :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 · 20 lines Manifest-trigger-reachable source links an external AI-agent control path to a behavior-bearing write operation.
export function __openclawchildenvfortest(home) {
return home === undefined ? openclawchildenv() : openclawchildenv({}, home);
}
function isopenclawinstalled() {
try {
execsync('which openclaw', { encoding: 'utf-8', timeout: 5000 });
return true;
}
catch {
High Trigger reachable persistence
A manifest entrypoint or package-local install chain reaches persistence behavior.
dist/service/install.js View on unpkg · L12 Code excerpt · 12 lines Trigger-reachable persistence chain: scripts.start -> dist/index.js -> dist/service/install.js
12 import os from 'os' ;
13 import { execSync } from 'child_process' ;
14 import { fileURLToPath } from 'url' ;
⋯
16 const __filename = fileURLToPath (import .meta.url);
17 const __dirname = path.dirname (__filename);
18 function detectPlatform () {
19
plugins/hermes/shieldcortex/sc_client.py View file Medium Ships build helper
Package ships non-JavaScript build or shell helper files.
plugins/hermes/shieldcortex/sc_client.py View on unpkg Scanner record · 4 lines path = plugins/hermes/shieldcortex/sc_client.py
kind = build_helper
sizeBytes = 38429
magicHex = [redacted]
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]
plugins/hermes/shieldcortex/tests/test_posture_613.py View file High Payload in excluded dir
Package hides binary, compressed, or executable-looking payloads in test/fixture/hidden paths.
plugins/hermes/shieldcortex/tests/test_posture_613.py View on unpkg Scanner record · 4 lines path = [redacted]test_posture_613.py
kind = payload_in_excluded_dir
sizeBytes = 11569
magicHex = [redacted]
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
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@5.0.1
matchedPath = scripts/postinstall.mjs
matchedIdentity = npm:c2hpZWxkY29ydGV4:5.0.1
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 · 7 lines matchType = token_shingles
matchedPackage = shieldcortex@5.0.1
matchedPath = dist/defence/skill-scanner/scan-skill.js
matchedIdentity = npm:c2hpZWxkY29ydGV4:5.0.1
similarity = 1.000
shingleOverlap = 48
summary = source token shingles overlapped finalized malicious source
dist/integrations/openclaw-gateway-roster.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/integrations/openclaw-gateway-roster.js View on unpkg Scanner record · 6 lines matchType = normalized_sha256
matchedPackage = shieldcortex@5.0.1
matchedPath = dist/integrations/openclaw-gateway-roster.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@5.0.1
matchedPath = dist/audit/dependency-scanner.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/env-scanner.js View on unpkg Scanner record · 6 lines matchType = normalized_sha256
matchedPackage = shieldcortex@5.0.1
matchedPath = dist/audit/env-scanner.js
matchedIdentity = npm:c2hpZWxkY29ydGV4:5.0.1
similarity = 1.000
summary = normalized source hash matched finalized malicious source
dist/integrations/claude-code-version.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/integrations/claude-code-version.js View on unpkg Scanner record · 6 lines matchType = normalized_sha256
matchedPackage = shieldcortex@5.0.1
matchedPath = dist/integrations/claude-code-version.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/xray/file-scanner.js View on unpkg Scanner record · 6 lines matchType = normalized_sha256
matchedPackage = shieldcortex@5.0.1
matchedPath = dist/xray/file-scanner.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/xray/npm-inspector.js View on unpkg Scanner record · 6 lines matchType = normalized_sha256
matchedPackage = shieldcortex@5.0.1
matchedPath = dist/xray/npm[redacted]
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/xray/patterns.js View on unpkg Scanner record · 6 lines matchType = normalized_sha256
matchedPackage = shieldcortex@5.0.1
matchedPath = dist/xray/patterns.js
matchedIdentity = npm:c2hpZWxkY29ydGV4:5.0.1
similarity = 1.000
summary = normalized source hash matched finalized malicious source
dist/defence/iron-dome/cli-invoker.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/iron-dome/cli-invoker.js View on unpkg Scanner record · 6 lines matchType = normalized_sha256
matchedPackage = shieldcortex@5.0.1
matchedPath = dist/defence/iron-dome/cli-invoker.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/memory/import-native.js View on unpkg Scanner record · 6 lines matchType = normalized_sha256
matchedPackage = shieldcortex@5.0.1
matchedPath = dist/memory/import-native.js
matchedIdentity = npm:c2hpZWxkY29ydGV4:5.0.1
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
const fsSync = await import ("node:fs" );
633 const scDir = process.env.SHIELDCORTEX_CONFIG_DIR?.trim () || path.join (homedir (), ".shieldcortex" );
634 const cfgPath = path.join (scDir, "config.json" );
680 // the native driver from the package that supplied inject-pack.mjs, never
681 // relative to this copied/self-healed handler. Prefer package.json as the
682 // package-root anchor; the selected helper remains a correct ancestry anchor
homedir
57 const parsed = JSON.parse (fs.readFileSync (file, 'utf-8' ));
58 return typeof parsed === 'object' && parsed !== null
376
});
if (process.argv.includes('--confirm')) {
'/usr/lib/node_modules/openclaw',
'/usr/local/lib/node_modules/openclaw
switch (process.platform) {
20 case 'darwin' : return 'macos' ;
25 function detectDefaultServiceMode (platform) {
26 if (platform === 'linux' && !process.env.DISPLAY && !process.env.WAYLAND_DISPLAY) {
44 // If that absolute path no longer exists, systemd will fail to open it