Loading npm security reports…
Loading npm security reports…
shieldcortex@5.18.0: Agent extension lifecycle risk – flagged | LPM Firewall
npm / shieldcortex / 5.18.0 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, 23:11 UTC · by lpm-firewall-ai The global postinstall path can refresh ShieldCortex's own OpenClaw hook and plugin when an existing integration is detected. This is an automatic agent-extension lifecycle change, so it warrants a warning; the limited conditions and explicit opt-out reduce the risk.
Static reason
One or more suspicious static signals were detected.; previous stored version diff introduced dangerous source
Trigger
Global, non-CI npm installation when OpenClaw and a prior ShieldCortex hook or plugin are present; skipped by SHIELDCORTEX_SKIP_AUTO_OPENCLAW=1.
Impact
Existing agent integration files may be changed during package installation.
Mechanism
The postinstall script launches `shieldcortex openclaw install`, which refreshes the existing hook/plugin integration.
Evidence
package.json scripts/postinstall.mjs dist/setup/openclaw.js ~/.openclaw/hooks/cortex-memory ~/.openclaw/extensions/shieldcortex-realtime
public snapshot
Evidence for warning
The manifest runs scripts/postinstall.mjs during installation. On global non-CI installs, postinstall can refresh an existing OpenClaw integration unless SHIELDCORTEX_SKIP_AUTO_OPENCLAW=1 is set. The refresh runs the package's OpenClaw installer, which copies the ShieldCortex hook into an agent configuration directory. Evidence against
The automatic path requires a global, non-CI install and an existing OpenClaw integration; it does not install the integration for a fresh OpenClaw setup. The postinstall refresh has an explicit environment-variable opt-out, and its output identifies the refresh. No malicious credential theft, unrelated data collection, or reviewer-directed override 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 461 files · 6.63 MB of source
24 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.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 registry.npmjs.org shieldcortex.ai www.apple.com Findings1 critical · 12 high · 7 medium · 6 low Source & flagged code18 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
Critical Previous version dangerous delta
This package version adds a dangerous source file absent from the previous stored version; route for source-aware review.
dist/cli/doctor.js View on unpkg Scanner record · 5 lines matchType = previous_version_dangerous_delta
matchedPackage = shieldcortex@5.17.4
matchedIdentity = npm:c2hpZWxkY29ydGV4:5.17.4
similarity = 0.958
summary = stored previous version shares package body but lacks this dangerous source file
↓
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