360 Secure SkillHub
360 安全技能中心

ShieldCortex

通过 GPL 无依赖的 CLI 与 MCP 记忆服务器,为代理提供语义检索、知识图谱、记忆衰减与矛盾检测的本地长期记忆,并用六层防御管线在记忆读写时扫描、隔离或拦截提示注入、凭证泄露与投毒内容。默认本地运行,云同步为可选。

分类:安全
jarvis-drakon
jarvis-drakon
热度 57.12
最近更新 2026-11-29 16:40:15

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add jarvis-drakon/shieldcortex
兼容性
通用兼容
联网要求
不联网
数据出网
可选出网
Metadata
name
shieldcortex
description
Memory and defence for AI agents: semantic recall, knowledge graph and decay, plus a memory firewall that scans and enforces against prompt injection, credential leaks and poisoning.
license
MIT-0
metadata
{"author":"Drakon Systems","version":"5.22.2","mcp-server":"shieldcortex","category":"memory-and-security","tags":["memory","security","knowledge-graph","mcp","iron-dome","openclaw-plugin","audit"],"source":"https://github.com/Drakon-Systems-Ltd/ShieldCortex","homepage":"https://shieldcortex.ai","npm":"https://www.npmjs.com/package/shieldcortex","verified_publisher":"Drakon Systems Ltd","publisher_github":"https://github.com/Drakon-Systems-Ltd","npm_audit":"0 unwaived production advisories; 3 waived (sharp: GHSA-f88m-g3jw-g9cj, GHSA-rgj7-g3m4-5g8c, GHSA-wq5f-xc86-pv6w, via optional @huggingface/transformers) - see docs/security/audit-waivers.md","downloads":"11K+/month"}
install
{"command":"shieldcortex quickstart","runtime":"node","minVersion":"22.14.0","note":"Requires Node 22.14+ LTS or Node 24+; Node 23 is unsupported. Run the installed `shieldcortex` binary directly. The quickstart command detects your environment. Claude Code and OpenClaw get hooks that can deny; Codex/Cursor/VS Code get an MCP memory server only (not a tool gate). All data stays local in ~/.shieldcortex/. No account or API key needed for local use.\n"}
permissions
{"filesystem":"readwrite","network":"optional","credentials":"optional","justification":"Filesystem read: scans agent instruction files for prompt injection threats (same files the agent already reads). Filesystem write: stores memory DB and config in ~/.shieldcortex/. Network: local-first — outbound only for the embedding-model download when it is not cached (huggingface.co; disable with SHIELDCORTEX_SKIP_EMBEDDINGS=1), Cloud sync (opt-in), licence-key validation when a key is activated, and the npm registry for the dashboard Overview's automatic latest-version lookup (on by default; turn off with `shieldcortex config --dashboard-update-check false` or SHIELDCORTEX_SKIP_UPDATE_CHECK=1), explicit updates and X-Ray package lookups, and the OpenClaw `cortex-memory` hook's npx package resolution (`npx mcporter`, and `npx -y shieldcortex` when no accessible `binaryPath` or `PATH` binary is found) when those packages are not installed locally; the package check (registry.npmjs.org, pypi.org, api.osv.dev) by Action Guard when it is on and by the agent-config watch, on by default, for MCP servers it reports as added or changed; plus URLs you ask `env scan` to fetch and webhooks you configure (full list in network_endpoints). Credentials: optional Cloud API key for team sync (not required for local use).\n","paths_read":["~/.shieldcortex/ (own config and memory database)","~/.claude/ (project memory files, MCP config)","~/.openclaw/ (MCP config, extensions)","~/.cursor/ (rules, memories, MCP config)","~/.windsurf/ (memories, rules)","~/.codex/ (MCP config)","$CWD/.claude/, $CWD/.cursor/ (project-level configs)","$CWD/.cursorrules, $CWD/.windsurfrules, $CWD/.clinerules","$CWD/CLAUDE.md, $CWD/copilot-instructions.md","$CWD/.aider.conf.yml, $CWD/.continue/config.json","$CWD/.env (env-scanner checks for leaked secrets — reads, never writes)"],"paths_write":["~/.shieldcortex/ (memory DB, config, cortex log, licence, audit cache)","~/.cache/shieldcortex/models (embedding model download cache)","~/.openclaw/extensions/shieldcortex-realtime/ (OpenClaw plugin via the wrapper install only; native `openclaw plugins install` uses OpenClaw's managed npm tree instead)","~/.claude/mcp.json, ~/.cursor/mcp.json (MCP server registration, when user runs setup)"],"network_endpoints":["https://api.shieldcortex.ai (Cloud sync + audit telemetry — only when Cloud sync is enabled; licence validation — only when a licence key is activated, fired at CLI `license activate` and the dashboard's activation call (POST /api/license/activate), with no periodic or background re-check; sends the subscription id, works with Cloud sync off; never called when no key is configured)","https://huggingface.co (embedding-model download — Xenova/all-MiniLM-L6-v2, ~90 MB, fetched into ~/.cache/shieldcortex/models by the MCP server's background preload at startup or the first operation needing an embedding, whenever the model is not already cached, plus one re-download if a cached copy is detected corrupt; SHIELDCORTEX_SKIP_EMBEDDINGS=1 prevents it. The optional Local AI Explainer model downloads from the same host only on explicit, consent-prompted `review-copilot enable`/`download-model` — its review runs use the local cache only)","https://registry.npmjs.org (three paths — update checks and updates via npm subprocess; the dashboard Overview looks up the latest version automatically while open (cached 5 minutes; `shieldcortex config --dashboard-update-check false` or SHIELDCORTEX_SKIP_UPDATE_CHECK=1 turns that lookup off), plus the dashboard \"Update\" action and `shieldcortex update`; X-Ray package inspection, `shieldcortex xray <package>` or the dashboard X-Ray page, which queries package metadata directly over HTTPS and with `--deep` also downloads the package tarball from whatever URL that metadata names — normally registry.npmjs.org, size- and redirect-capped, but with no separate host allowlist; and the OpenClaw `cortex-memory` hook's npx package resolution (`npx mcporter`, and `npx -y shieldcortex` when no accessible `binaryPath` or `PATH` binary is found) when those packages are not installed locally — whenever an enabled hook path calls the bridge, so it is automatic on hook-enabled hosts, not user-initiated)","https://registry.npmjs.org, https://pypi.org and https://api.osv.dev (package check, 5.20+, metadata only, within 3 seconds for a tool-call check and 2 seconds for a watch check, nothing downloaded or run; two paths — with Action Guard on, the Claude Code hook and the OpenClaw plugin look up a package a tool call installs by name before the call runs; and, with Action Guard on or off, the agent-config watch, which is on by default and runs in the background at session start, looks up a package launched by an MCP server entry it reports as added or changed and sends any finding as a follow-up after its change notification. Each request carries the package name and version, never memory or conversation content. `actionGuard.packageVetting.enabled false` in config.json always stops the watch's lookups, policy lock or not, because the watch reads config.json as written; it stops the tool-call lookups only on a host without a policy lock or the strict fail-closed posture, since a verified or unverifiable policy lock and the strict posture drop that setting and keep checking tool calls while Action Guard is on; `sessionStart.agentConfigWatch false` stops the watch)","User-configured webhook URLs (two POST paths — memory-event notifications to webhooks you add to ~/.shieldcortex/config.json, and Iron Dome operator-notify messages for action-guard holds/denies, plus `maintenance_fail` check names from `shieldcortex maintain` and the OpenClaw plugin's session-end digest of recorded approval timeouts, to the `actionGuard.notify` webhook you configure; both off until you configure them)","The URL you pass to `shieldcortex env scan <url>` (fetched once for analysis)","http://localhost:3001 (local REST API + WebSocket — loopback only)","http://localhost:3030 (local dashboard UI; also the worker health check — loopback only)"],"env":[{"SHIELDCORTEX_CONFIG_DIR":"Override config directory (default ~/.shieldcortex/)"},{"SHIELDCORTEX_API_KEY":"Cloud sync API key (optional; only used when Cloud is enabled)"},{"SHIELDCORTEX_LICENSE_TIER":"Override licence tier (development use)"},{"SHIELDCORTEX_SKIP_EMBEDDINGS":"Disable embedding generation"},{"SHIELDCORTEX_SKIP_SELF_HEAL":"Set to 1 to make the cortex-memory hook's bootstrap self-heal warn-only (writes nothing)"},{"SHIELDCORTEX_SKIP_UPDATE_CHECK":"Set to 1 to stop the dashboard's automatic npm registry version lookup (that lookup only — not an offline mode)"},{"SHIELDCORTEX_HOST":"Override dashboard/API bind host"},{"PORT":"Override dashboard/API port"}]}

ShieldCortex — Persistent Memory & Security for AI Agents

Memory system with built-in security. Gives agents persistent memory (semantic search, knowledge graphs, decay, contradiction detection) and protects it with a 6-layer defence pipeline (input sanitisation → trust scoring → firewall → sensitivity classification → fragmentation detection → credential-leak detection). Skill threat patterns (tool injection, scope escalation, data exfiltration, persistence, supply-chain, agent manipulation, stealth instructions) block at memory-write time, not just on skill-file scans.

This is an enforcing memory boundary, not a passive scanner. Across the read/write boundary it actively: quarantines or blocks poisoned/credential-bearing writes; trust/ACL-filters recalled memory (RESTRICTED isolation, own-only for low-trust callers) before it reaches the agent, on both the prompt hooks and the MCP read tools; runs a tool-output firewall that, in enforce mode, redacts or withholds malicious tool results before the model sees them (advisory by default); and keeps a provenance ledger recording read/write/delete operations with content hashes for forensics. Enforcement that could surprise is opt-in (the tool-output firewall defaults to advisory; shieldcortex config --tool-firewall-enforce turns on blocking).

Provenance & Trust

Signal Value
Publisher Drakon Systems Ltd (UK company)
Source code github.com/Drakon-Systems-Ltd/ShieldCortex — fully open, MIT licence (this skill file itself is published MIT-0, per the frontmatter)
npm package npmjs.com/package/shieldcortex — every release git-tagged with a matching GitHub release
npm audit Not clean: 0 unwaived production advisories, 3 waived (not fixed) — all three in sharp, reachable only through the optional @huggingface/transformers package. Reachability and expiry dates: docs/security/audit-waivers.md
Downloads 11,000+/month (July 2026)
CI/CD CI lint/test on every push; the maintainer manually tags each release, and the tag push triggers an automated CI publish to npm
Postinstall script Declared and bounded: prints setup instructions; on global installs it also smoke-tests the native SQLite binding, seeds default config on first install, and refreshes an OpenClaw hook/plugin that a previous setup already installed. It never adds integrations to a machine that had none, and it is a no-op for CI and local dependency installs. SHIELDCORTEX_SKIP_AUTO_OPENCLAW=1 skips the refresh.
Dependencies 8 runtime deps: better-sqlite3, zod, @modelcontextprotocol/sdk, express, ws, cors, safe-regex2, semver. express/ws/cors serve the bundled localhost-only dashboard/API. One optional dep, @huggingface/transformers, runs the local embedding model and fetches it from huggingface.co when it is not cached (see network_endpoints). Nothing else dials out except the cases listed under network_endpoints (Cloud sync opt-in, licence-key validation, update checks, X-Ray package lookups, the OpenClaw hook's npx package resolution, package-check lookups to registry.npmjs.org, pypi.org and api.osv.dev, env-scan URLs, configured webhooks).

Safety & Scope

This section explains every privileged operation the tool performs and why.

  • Active interception, not scan-only — on hosts that can deny. Writes failing the pipeline are quarantined/blocked; recalled memory is trust/ACL-filtered before the agent sees it. Tool-call denial is bound on Claude Code (PreToolUse), OpenClaw (before_tool_call), and Hermes (pre_tool_call, enforce by default). Codex, Cursor, Copilot, and generic MCP get a memory server / scanner the model may ignore — they are not bound. Tool-output firewall defaults to advisory. shieldcortex doctor and shieldcortex lease report bound / not-bound / unknown per plane.
  • Setup is user-initiated, with one bounded exception. Installing hooks, registering the MCP server, and migrating data are manual steps the user runs in their terminal, and bare quickstart / setup asks before each action; a named host, as in setup claude, is wired without asking. The npm postinstall script (disclosed in the trust table above) never adds integrations that weren't already present — on global installs it only prints instructions, checks the native binding, seeds default config on first install, and refreshes an existing OpenClaw hook/plugin install. The exception: the bundled cortex-memory hook performs a small automatic self-heal at gateway bootstrap, documented in full under "Automatic self-heal at gateway bootstrap" below.
  • Setup migrates legacy data. The first quickstart/setup run may move or remove legacy config/memory directories (e.g. ~/.claude-cortex/, ~/.claude-memory/) into ~/.shieldcortex/ and copy hook files into place. This happens only on the user-run setup command — never on npm install (the postinstall script does not touch memory or config data beyond seeding defaults on a first-ever global install).
  • Destructive forget is bounded and gated. Per-memory and filtered bulk deletes go through a delete ACL (own-only) and are recorded in the audit ledger. Revoke-by-source (forget --fromSource, bulk-delete every memory from one source — for purging a poisoned agent) is disabled by default and only enabled by an out-of-band human action (shieldcortex config --allow-revoke-by-source); even then it is bounded by a trust-hierarchy ACL (you must own the source or out-rank it) and a per-call row cap. A compromised agent cannot mass-delete your memory.
  • The bundled dashboard never renders RESTRICTED content. The local visualization API and its WebSocket feed redact credential-class (RESTRICTED) memory content before it reaches the browser — the row stays visible (title/metadata) so you can manage it, but the secret is withheld (view full content via the CLI). Credential patterns in titles/metadata are masked too. This is a display-surface safeguard on top of the on-disk store; it does not weaken the firewall.
  • No credentials required for local use. Memory, scanning, and audit work fully offline. Cloud sync is opt-in and requires a user-provided API key via shieldcortex config --cloud-enable --cloud-api-key <key>.
  • File access is declared and scoped. Security scans read agent config directories listed in the permissions block above — the same directories the agent itself already has access to. They do not traverse arbitrary directories.
  • Writes are contained. All data goes to ~/.shieldcortex/ (plus the embedding-model cache at ~/.cache/shieldcortex/models). MCP config edits (setup, copilot, codex commands) modify specific JSON files and confirm before writing.
  • First-use model download (huggingface.co). Semantic memory runs a local embedding model (Xenova/all-MiniLM-L6-v2, ~90 MB ONNX) that is not bundled with the package. Whenever it is missing from ~/.cache/shieldcortex/models, the MCP server downloads it from huggingface.co — triggered by the background preload at server start, or by the first operation that needs an embedding, plus a single re-download if a cached copy is detected corrupt. It is not user-initiated (the other default outbound connections are listed below). Avoid it with SHIELDCORTEX_SKIP_EMBEDDINGS=1 (memory falls back to full-text search) or by pre-seeding the model cache. The optional Local AI Explainer (review-copilot) downloads its model from the same host only on an explicit, consent-prompted enable/download-model command; its review runs never fetch remotely.
  • Outbound connections that happen by default. With no licence key activated, no Cloud sync enabled, and no webhooks configured, ShieldCortex can still connect out without an explicit request: (1) the embedding-model download just described (on server start when the model is not cached); (2) the dashboard's automatic version check — opening the dashboard Overview makes the local API run npm view shieldcortex version against registry.npmjs.org (the answer is cached for 5 minutes). This check is on by default; shieldcortex config --dashboard-update-check false or SHIELDCORTEX_SKIP_UPDATE_CHECK=1 turns it off. Either switch stops that one lookup only — it is not an offline mode. (3) On hosts with the OpenClaw cortex-memory hook enabled, the OpenClaw cortex-memory hook's npx package resolution (npx mcporter, and npx -y shieldcortex when no accessible binaryPath or PATH binary is found) when those packages are not installed locally (see Subprocess execution and package resolution below); preinstalling both (npm install -g shieldcortex mcporter) where the gateway's PATH can find them avoids those downloads, but is not an offline guarantee. (4) The agent-config watch's package check (5.20+): the watch is on by default, runs in the background at session start whether or not Action Guard is on, and when it reports an MCP server entry as added or changed whose command launches a package (npx, uvx), it asks registry.npmjs.org or pypi.org and api.osv.dev about that package name and version (metadata only, report-only); actionGuard.packageVetting.enabled: false or sessionStart.agentConfigWatch: false stops it, policy lock or not (the watch reads enabled: false from config.json as written). That is the watch only: under a verified or unverifiable policy lock or the strict fail-closed posture, enabled: false is dropped for the tool-call check, which keeps looking packages up while Action Guard is on. Every other entry in network_endpoints is opt-in or user-initiated: Cloud sync (opt-in), the Action Guard package check for installs a tool call makes (only while Action Guard, off by default, is on), licence-key validation when you activate a key (at CLI or dashboard activation only, no background re-check — works even with Cloud sync off), npm-registry updates (shieldcortex update and the dashboard's Update action — explicit actions, separate from the automatic check above), X-Ray package lookups (shieldcortex xray or the dashboard X-Ray page, tarball download with --deep), URLs you pass to env scan, and webhooks you configure (memory events and Iron Dome operator notifications). The dashboard binds to localhost by default but may be explicitly exposed with SHIELDCORTEX_HOST; when exposed, the loopback session-token endpoint stays disabled. The worker binds to localhost.
  • Source code. This ClawHub skill is instructions and a manifest only; it contains no executable code. The OpenClaw plugin and cortex-memory hook ship in the shieldcortex and @drakon-systems/shieldcortex-realtime npm packages, and the source is on GitHub for inspection before use.
  • Lifecycle event handlers. ShieldCortex registers lifecycle handlers that auto-extract important context from conversations. These are registered in ~/.claude/settings.json during setup and can be removed at any time. They run locally, never phone home.
  • Proactive recall. The UserPromptSubmit handler queries local memory on each prompt (<100ms) and surfaces relevant context. Fully local, configurable: shieldcortex config --proactive-recall false.

Installing the OpenClaw hook and plugin

This skill ships no executable files. Install the tools it describes from npm:

npm install -g shieldcortex          # CLI, MCP server and the cortex-memory hook
shieldcortex quickstart              # detect hosts and wire them (asks first)
openclaw plugins install --force npm:@drakon-systems/shieldcortex-realtime@latest   # optional realtime plugin

Automatic self-heal at gateway bootstrap

The cortex-memory hook registers for the agent:bootstrap event. On the first bootstrap after each OpenClaw gateway start (once per gateway process), it runs a self-check that can write without a prompt. In the interest of full disclosure, this is exactly what it does:

  1. Removes stale legacy hook copies. If the hook is running from its expected home (~/.openclaw/hooks/internal/cortex-memory or ~/.openclaw/hooks/cortex-memory), it recursively deletes the pre-rename leftovers ~/.clawdbot/hooks/cortex-memory and ~/.clawdbot/hooks/internal/cortex-memory — and only those two directories. It skips this entirely when ~/.clawdbot is a symlink (i.e. still pointing at a live install). No backup is taken before deletion; these directories are assumed to be dead copies of this hook's own files, not your data.
  2. Copies itself to the expected hook path. If the hook finds itself running from anywhere else (for example, from inside the npm package directory), it creates ~/.openclaw/hooks/internal/cortex-memory/ and copies its full file set (HOOK.md, handler.ts, runtime.mjs) there so the gateway loads it from the canonical location on the next restart, and surfaces a SHIELDCORTEX_HOOK_MIGRATED.md notice into the session's bootstrap context. If any file in that set fails to copy, the migration is reported as incomplete rather than as a success — a partially-copied hook cannot load.
  3. Checks for staleness (read-only). It compares the running hook files against the installed npm package's copies and warns if they differ. This step never writes.

Scope limits: the self-heal writes only inside ~/.openclaw/hooks/** and deletes only the two ~/.clawdbot hook directories named above. It does not modify openclaw.json, ~/.claude/settings.json, MCP config, shell configs, or any other file; it makes no network calls; failures are swallowed so it can never block agent startup.

Opting out (since v4.47.12): either of these downgrades steps 1 and 2 to warn-only — the hook logs exactly what it would have deleted or copied and touches nothing:

shieldcortex config --self-heal false     # writes "selfHeal": false to ~/.shieldcortex/config.json
export SHIELDCORTEX_SKIP_SELF_HEAL=1      # or set the env var for the gateway process

Restart the gateway for either to take effect. Step 3 (the read-only staleness check) still runs, and shieldcortex openclaw install performs the same migration on demand. Disabling the cortex-memory hook in your hooks config also disables the self-heal entirely, since it only runs inside the hook.

Data handling, privacy & consent

ShieldCortex is local-first: memory, scanning, and audit run entirely on your machine — no account and no telemetry by default. Outbound requests can still happen by default — the embedding-model download, the dashboard's automatic version lookup, on hosts with the OpenClaw hook enabled, its npx package resolution, and the agent-config watch's package check for MCP servers it reports as added or changed (see Outbound connections that happen by default above); none of them carries memory or conversation content. Because the tool can auto-capture conversation content, here is exactly what it reads, stores, and (only if you opt in) transmits.

  • What it reads. With the lifecycle handlers enabled (opt-in at setup), ShieldCortex reads your agent session transcripts — both your prompts and the assistant's replies — to auto-extract memorable context. PreCompact (before context compaction) reads the recent transcript; the SessionEnd and Stop handlers are off by default; the OpenClaw integration extracts from assistant output (the cortex-memory hook does this on /new and /stop when openclawAutoMemory is true); the hook's keyword-trigger path is not registered on core OpenClaw 2026.9.6, so keyword phrases are not captured through it. SessionStart does not read transcripts (it only loads existing local memory and scans project rule files).

  • What it stores, and for how long. Saved and auto-extracted memories are written to a local SQLite database at ~/.shieldcortex/memories.db — title and content verbatim — and persist across sessions until you remove them (decay/consolidation prune low-value entries over time). Nothing is stored remotely unless you enable Cloud sync. Delete a memory with the forget tool, or remove the database to wipe everything.

  • Secrets & credentials. Every write — manual or auto-extracted — passes the defence pipeline first; high-confidence credential patterns (49 patterns across 25 providers) and content classified RESTRICTED are blocked or quarantined before storage, not saved as live memory. This is a strong filter, not a guarantee: low-confidence or low-entropy secrets can still be stored. On sensitive work, review what auto-memory captures and disable auto-extraction (shieldcortex config --openclaw-auto-memory false; the Claude Code handlers can be removed from ~/.claude/settings.json).

  • Keyword triggers are dormant on OpenClaw. The cortex-memory hook contains keyword auto-save code (e.g. "remember this", "don't forget"), but it is not registered on core OpenClaw 2026.9.6: the hook's events list has no message key, so saying a phrase saves nothing through the hook. The code captures the nearby text, which may include more than the phrase, is capped (auto-extracts never outrank explicit saves) and runs through the same credential/injection scan.

  • Subprocess execution and package resolution. The OpenClaw cortex-memory hook (shipped in the shieldcortex npm package) runs short-lived child processes (argv-array, no shell) to talk to your local ShieldCortex MCP server over stdio. It always starts mcporter through npx (npx mcporter call --stdio <server> …) without --yes or --no: npx runs a mcporter that is already installed, and otherwise npm can download mcporter from the npm registry and run it (npm skips its install prompt when stdin is not a terminal, as here). For <server> the hook uses the configured binaryPath (from ~/.shieldcortex/config.json, or $SHIELDCORTEX_CONFIG_DIR/config.json when set) only if that path is accessible, else a shieldcortex found on PATH, else npx -y shieldcortex, which can download the shieldcortex package from the npm registry and run it. To avoid those downloads, preinstall both where the gateway's PATH can find them: npm install -g shieldcortex mcporter.

  • Cloud sync — off by default, opt-in, explicit. No data leaves your machine unless you run shieldcortex config --cloud-enable --cloud-api-key <key>. When enabled:

    • Audit telemetry (/v1/audit/ingest): scan metadata only — trust scores, threat indicators, categories, timings, device name. No memory content.
    • Memory sync (/v1/sync/memories, Enterprise licence — grandfathered Team keys also unlock it): transmits full memory title + content of PUBLIC/INTERNAL memories so they sync across your team. CONFIDENTIAL/RESTRICTED memories are excluded by default; switch to metadata-only with the contentMode control.
    • Quarantine sync (Enterprise licence): flagged content is sent with detected credentials redacted.
    • OpenClaw realtime plugin (optional): scans live input and output locally. When it flags something, only threat metadata (type, scores, timestamps — never the input text itself) is forwarded, and only when Cloud sync is enabled. Flagged-content previews are kept in your local audit log; they are never transmitted.

    Raw conversation/input text is never transmitted by the audit, threat, or interceptor paths — they carry metadata only. The single exception is Memory sync above, which uploads the content of memories you chose to store (PUBLIC/INTERNAL, off by default, Enterprise licence). You can disable any of the above at any time, and the realtime plugin and lifecycle handlers can be removed entirely.

What it does NOT do

  • Does not read SSH keys, AWS credentials, GPG keys, or /etc/ files
  • Does not send your data to external servers, with three narrow, user-initiated exceptions: Cloud sync when you enable it, the subscription id sent to the licence endpoint when you activate a licence key, and event payloads to webhooks you configure (memory-event and Iron Dome operator notifications). Its remaining outbound calls are downloads/fetches that carry only the request itself — never memory or conversation content: npm-registry update checks, X-Ray package lookups and the OpenClaw hook's npx package resolution (the package name appears in the URL), package-check lookups to registry.npmjs.org, pypi.org and api.osv.dev (the package name and version only), the huggingface.co embedding-model download, and URLs you explicitly pass to env scan
  • Does not modify .bashrc, .zshrc, .profile, or shell configs
  • Does not use eval or dynamic code execution of any kind
  • Does not build subprocess commands from agent, memory, or network content. The update flow and the OpenClaw MCP bridge never start a shell — argv-array child processes only (npm view update check, npm update/npm install, pgrep, mcporter). The dashboard X-Ray surface adds two more argv-array, local-only children: osascript with fixed script lines (macOS folder picker) and ShieldCortex's own Node binary relaunched for xray --watch background scans (hook and server helpers relaunch process.execPath the same way, always with fixed local script paths). Sudo-aware home resolution validates the username, then runs getent passwd <user> as an argv-array — never through a shell, no tilde-eval. User-run CLI commands (setup, service, migrate, uninstall, audit, doctor, the npx-staleness warning) and corrupt-database recovery run fixed local admin tools (npm, launchctl, systemctl, sqlite3), some through a shell, parameterised only by local paths and usernames
  • Does not bypass, disable, or override any agent safety mechanisms
  • Does not auto-approve actions or skip verification prompts
  • Does not mine cryptocurrency, trade tokens, manage wallets, or initiate purchases
  • Does not make purchases, place orders, or move money on the user's behalf

CLI Reference

Getting Started

shieldcortex quickstart          # Detect integrations, guide setup
shieldcortex setup               # Register MCP server for current project
shieldcortex doctor              # Diagnose registration issues
shieldcortex status              # Show protection status
shieldcortex uninstall           # Remove from project

Memory

# Memory is typically used via the MCP server, not the CLI directly. The tools are:
#   remember · recall · forget · get_context · get_memory · get_related
#   consolidate · graph_query · graph_entities · scan_memories · memory_stats
#   start_session · end_session
# (there is no `store`, `search` or bare `graph` tool — use remember/recall/graph_query)
shieldcortex graph backfill      # Build knowledge graph from stored memories
shieldcortex stats               # Memory statistics

Security Scanning

shieldcortex scan "text"                    # Scan text (exit 0=allow, 1=caught, 2=usage, 3=tool-fail; parse stdout)
shieldcortex scan-skill path/to/SKILL.md    # Scan one instruction file for threats
shieldcortex scan-skills                    # Scan all discovered agent instruction files
shieldcortex audit                          # Full security audit (memory, env, MCP configs, rules files)
shieldcortex iron-dome status               # Iron Dome behavioural protection status

Cortex — Mistake Learning

# capture requires all four flags: --category --what --why --rule
shieldcortex cortex capture --category code --what "Guessed API endpoints" \
  --why "Didn't check the docs" --rule "Verify endpoints in API docs before calling"
shieldcortex cortex preflight --task "deploy to production"           # Pre-task check
shieldcortex cortex review                                            # Pattern analysis
shieldcortex cortex list                                              # View mistake log
shieldcortex cortex search "<query>"                                  # Full-text search
shieldcortex cortex stats                                             # Category breakdown
shieldcortex cortex confirm --category code --what "..." \
  --why-worked "..." --when-repeat "..."                              # Capture what worked
shieldcortex cortex graduate                                          # Archive mastered rules

Dashboard & Services

shieldcortex dashboard           # Dashboard on localhost:3030 (starts the API on :3001 too)
shieldcortex api                 # Start the API server only (localhost:3001)
shieldcortex worker              # Background sync + heartbeat worker
shieldcortex service start|stop|status  # Manage background service

Integrations

# subcommand is `install`, not `setup` (also: status, uninstall; openclaw adds repair, skill)
shieldcortex openclaw install    # Hook + realtime plugin — tool gate BOUND
shieldcortex copilot install     # VS Code / Cursor MCP memory server — NOT a tool gate
shieldcortex codex install       # Codex CLI MCP memory server — NOT a tool gate
shieldcortex config --openclaw-auto-memory true   # Enable auto-memory in OpenClaw
shieldcortex config --proactive-recall true|false  # Enable/disable proactive recall

Cloud & Licensing

shieldcortex config --cloud-enable --cloud-api-key <key>  # Enable cloud sync
shieldcortex cloud sync --full    # Backfill memories + graph to cloud
shieldcortex license activate <key>  # Activate an Enterprise (or legacy) licence key
shieldcortex license status       # Check licence tier

Maintenance

shieldcortex update              # Self-update (npm package + OpenClaw plugin + skill)
shieldcortex maintain --dry-run  # Preview storage/memory hygiene (plain `maintain` applies it)

What Gets Scanned

scan-skills discovers and scans:

  • SKILL.md, HOOK.md, handler.js (Claude Code / OpenClaw skills)
  • .cursorrules, .windsurfrules, .clinerules (editor rules)
  • CLAUDE.md, copilot-instructions.md (agent instructions)
  • .aider.conf.yml, .continue/config.json (tool configs)
  • Searches: ~/.claude/skills/, ~/.openclaw/skills/, ~/.openclaw/hooks/, project directories

audit checks:

  • Memory files — ~/.claude/projects/, ~/.cursor/memories/, ~/.windsurf/memories/
  • Environment — .env files for leaked credentials (read-only check, never writes)
  • MCP configs — ~/.claude/mcp.json, ~/.openclaw/mcp.json, ~/.cursor/mcp.json, project-level equivalents
  • Rules files — CLAUDE.md, .cursorrules, copilot-instructions.md for injection patterns

What Gets Uploaded to Cloud

Cloud sync is off by default. Audit metadata sync is included on the cloud free tier; full memory/graph replication requires an Enterprise licence (grandfathered Team keys keep working).

  • Uploaded when Cloud sync is enabled by the user: selected memory records, related embeddings/metadata, and knowledge-graph entities/relationships required for sync.
  • Not uploaded by default: local agent configs, MCP configs, raw rules files, shell configs, SSH keys, secrets, .env contents, or arbitrary project files.
  • Security scan results stay local unless the user explicitly exports or syncs data through a Cloud-enabled workflow.
  • No sync traffic occurs unless the user explicitly enables Cloud sync and provides a valid API key. Outside sync, the only api.shieldcortex.ai call is licence-key validation when a key is activated (subscription id only, never memory content) — see network_endpoints.

Licence Tiers

Public tiers are Free and Enterprise (sales@drakonsystems.com). Every local feature is Free; grandfathered Pro/Team keys keep working.

Feature Free Enterprise
Memory (store/recall/search/graph) ✅ ✅
Proactive recall (auto-inject on prompts) ✅ ✅
Defence pipeline (scan, Iron Dome) ✅ ✅
Audit & scan-skills ✅ ✅
Dashboard ✅ ✅
Custom injection patterns ✅ ✅
Custom Iron Dome policies ✅ ✅
Custom firewall rules ✅ ✅
Audit export ✅ ✅
Deep skill scanning ✅ ✅
Cortex (mistake learning) ✅ ✅
Cloud audit sync (metadata, 500 scans/mo, 7-day retention) ✅ ✅
Cloud memory/graph sync ❌ ✅
Team management ❌ ✅
Shared patterns ❌ ✅

Links

API bind (#411)

  • Default bind is loopback (127.0.0.1).
  • Non-loopback requires SHIELDCORTEX_ALLOW_NON_LOOPBACK=1 and SHIELDCORTEX_API_TOKEN (≥32 chars).
  • Public /api/auth/session-token is loopback-only.