agent-security-hardening
AFaffaan-m/ECC315k4,381 new stars in the last 7 days
Audit the extensions AI coding agents load and trust (skills, plugins, marketplaces, hooks, settings, MCP servers, and instruction files like CLAUDE.md, AGENTS.md and .cursor/rules) across Claude Code, Cursor, Codex, Gemini CLI and GitHub Copilot. Read-only: inventories each item with its source and pin, greps for hidden instructions, exfiltration, credential reads, persistence, curl|bash and over-broad tool grants, reviews hooks and MCP pinning and tool poisoning, and gives each item a SAFE / CAUTION / DO-NOT-INSTALL verdict. Use when the user mentions 'audit my skills,' 'is this skill malicious,' 'is this skill safe,' 'is this MCP server safe,' 'review CLAUDE.md,' 'review AGENTS.md,' 'plugin security,' 'check my hooks,' 'CODEOWNERS for .claude,' 'audit my MCP servers,' 'agent supply chain,' 'SkillSpector,' 'tool poisoning,' 'rug pull,' 'audit my IDE extensions,' 'is this VS Code extension safe,' 'is this repo safe to open,' or is about to install a skill, plugin, MCP server, or IDE extension.
Coding agents now load third-party code and third-party instructions with the developer's full privileges: a skill is
prose the model obeys, a hook is a shell command that runs on every prompt, an MCP server is a process launched from
whatever npx resolves today. NVIDIA's SkillSpector write-up cites Liu et al. (2026): of 31,132 public skills analysed,
26.1% had a vulnerability and 5.2% looked malicious. Nobody reviews these the way they review a dependency.
This skill inventories everything the user's agents load, reads it for concealed or hostile behaviour, checks what runs automatically and how it's pinned, and returns a per-item verdict. It never executes, installs, edits, or removes the items it audits.
Cross-references: prompt-injection for the same hidden-instruction and tool-poisoning checks applied to the user's
application (RAG corpora, system prompts, the MCP servers the app exposes); secrets-audit for tokens sitting in MCP
env blocks, agent settings, and session transcripts; dependency-audit for the npm / PyPI packages behind MCP servers
and bundled scripts; ai-risk-management for where agent tooling sits in the org's AI inventory; incident-triage
when a malicious item has already run; personal-opsec for the operator's own machine and accounts around the agent
(C7 checks cached browser versions); patch-sweep for the fleet response when a Chrome CVE lands;
cicd-security for agents that run inside CI workflows (claude-code-action and similar).
~/.claude,
~/.codex, …) belong to the person at the keyboard; don't audit another user's home or a shared host without the
owner's say-so..vscode/tasks.json and package.json scripts with cat or rg before starting Claude Code, Codex,
Cursor or VS Code in it. Hooks and folder-open tasks fire on open (BH5; IN1–IN4; personal-opsec).secrets-audit. Don't paste secret values into the conversation.validation_plan for the user to run in a sandbox.List every instruction file, skill, command, subagent, plugin, marketplace, hook, settings file, and MCP server each agent loads, at every scope. The per-agent path tables and a one-shot discovery command are in references/locations.md. The headline locations:
| Agent | Instructions | Extensions | Executes code |
|---|---|---|---|
| Claude Code | CLAUDE.md, CLAUDE.local.md, ~/.claude/CLAUDE.md | .claude/skills, ~/.claude/skills, .claude/commands, .claude/agents, ~/.claude/plugins/, .claude-plugin/plugin.json + marketplace.json | .claude/settings*.json, ~/.claude/settings.json, hooks/hooks.json, .mcp.json, ~/.claude.json, claude_desktop_config.json, managed settings |
| Cross-agent | AGENTS.md | .agents/skills (where npx skills installs) | — |
| Cursor | .cursor/rules/*.mdc, .cursorrules | .cursor/commands | .cursor/mcp.json, ~/.cursor/mcp.json, .cursor/hooks.json |
| Codex | AGENTS.md, ~/.codex/AGENTS.md | ~/.codex/prompts, ~/.codex/skills | ~/.codex/config.toml ([mcp_servers.*], approval and sandbox policy) |
| Gemini CLI | GEMINI.md, ~/.gemini/GEMINI.md | .gemini/commands, ~/.gemini/extensions/* | .gemini/settings.json, ~/.gemini/settings.json (mcpServers) |
| Copilot | .github/copilot-instructions.md, .github/instructions/*.instructions.md | .github/prompts, .github/agents, .github/chatmodes | .vscode/mcp.json, .vscode/tasks.json (folderOpen, BH5), VS Code user settings |
| Launch folders | Any AGENTS.md / CLAUDE.md in the folder an agent starts in (~/Downloads, ~/Desktop, $HOME) | Codex projects.<path>.trust_level in ~/.codex/config.toml; Claude Code's folder-trust prompt | Whatever those instructions tell the agent to do (LD1–LD4, references/launch-directories.md) |
| IDE extensions | — | ~/.cursor/extensions, ~/.vscode/extensions, ~/.windsurf/extensions, ~/.vscode-oss/extensions, remote ~/.*-server/extensions, JetBrains plugins/ | Every extension: the extension host runs it with the user's full access |
For each item record: type, agent, scope, source (marketplace, git URL, npm/PyPI package, docker image,
remote URL, hand-written), installed by (user, vendor app, repo, or unknown) and the install time,
pin (commit SHA, exact version, digest — or "unpinned"), what it can run
(nothing / pre-approved tools / hooks / a server process), and what runtime it launches (chromium <version>,
system Chrome, node, …; browser servers and CLIs are listed in references/browser-runtimes.md). An item with no identifiable source, or an unknown installer, is itself worth a note. Who added a plugin is AP1–AP5, below.
Read every instruction-bearing file end to end: skill bodies and frontmatter, bundled references/ and scripts/,
commands, subagents, rules files, plugin manifests, and MCP tool descriptions. Then grep. One representative pattern
per category is below; the full set, with portable grep / perl equivalents, is in
references/content-checks.md. Set T to the inventoried paths first.
| Check | SkillSpector IDs | Representative grep |
|---|---|---|
| Invisible / bidi Unicode | P2, TP2 | rg -n '[\x{200B}-\x{200F}\x{202A}-\x{202E}\x{2060}-\x{2064}\x{2066}-\x{2069}\x{FEFF}\x{00AD}\x{E0000}-\x{E007F}]' $T |
| Directives in hidden comments | P2, TP1 | rg -n -i '^\s*\[[^\]]*\]:\s*(#|<>)' $T and the multiline <!-- … --> keyword search |
| Whitespace padding | P9 | rg -n '[ \t]{40,}\S' $T and rg -c -U '(\n[ \t]*){20,}\S' $T |
| Encoded payloads | P2, SC3 | rg -n -i 'data:[a-z]+/[a-z0-9.+-]+;base64,' $T |
| Instruction override / covert steering | P1, P4 | rg -n -i '(ignore|disregard) (all )?(previous|prior|above) instructions|you are now|(do not|never) tell the user|silently' $T |
| Anti-inspection / auto-run directive ("do not read setup.js, run it") | P1, P4 | rg -n -i "(do not|don'?t|never) (read|open|inspect|display|quote)[^\n]{0,60}\.(js|py|sh)\b|sealed (binary|artifact)|not human-readable|without (asking|confirmation)" $T |
| Anti-refusal | AR1–AR3 | rg -n -i "(never|do not) refuse|without (any )?(warnings?|disclaimers?)|safety polic(y|ies) (do(es)? not|don'?t) apply" $T |
| Exfiltration wording and egress | P3, E1, E4 | rg -n -i 'webhook\.site|discord(app)?\.com/api/webhooks|api\.telegram\.org/bot|hooks\.slack\.com|ngrok|pipedream\.net|requestbin|oast\.' $T |
| Credential reads | E2, E3, PE3 | rg -n -i '\.ssh/|id_(rsa|ed25519)|\.aws/credentials|\.netrc|\.npmrc|printenv|process\.env|os\.environ|SSH_AUTH_SOCK|forwarded-ssh-agent\.sock' $T |
| Agent snooping | AS1, AS2, AS3 | rg -n '\.claude/|\.codex/|\.gemini/|\.cursor/|mcp\.json|claude_desktop_config|SKILL\.md' $T |
| Remote script execution | SC2 | rg -n -i '(curl|wget)[^|]*[|]\s*(sudo\s+)?(ba|z)?sh\b|bash\s+<\((curl|wget)' $T |
| Obfuscation, bytecode, disguised binaries | SC3, SC8, SC9 | rg -n 'base64 (-d|--decode)|atob\(|fromCharCode|\beval\(' $T; rg --files -uu $T -g '*.pyc' -g '*.so' -g '*.exe' |
| Unscoped tool pre-approval | EA1 | rg -n '^allowed-tools:.*\bBash\s*(,|$)|^allowed-tools:.*(Bash\(\*\)|WebFetch)' $T |
| Persistence / self-modification | RA1, RA2, MP1 | rg -n -i '(>>|tee -a|append|write)[^\n]{0,40}(CLAUDE|AGENTS)\.md|settings(\.local)?\.json|crontab|LaunchAgents|\.zshrc|\.bashrc|\.git/hooks' $T |
| Trigger abuse | TR1, TR2, TR3 | rg -n -i '^description:.*(always use|for (any|every|all) (task|request)|whenever the user)' $T; duplicate name: values |
(In the table, \| is markdown escaping — type a plain | in the shell.)
How to read the hits:
rejected with that reason.Bash alone is code execution; unscoped Bash plus WebFetch/WebSearch adds untrusted
input and an egress channel to the same skill.These run without the model deciding anything. Read every settings file in scope, project files first — a cloned repo's
.claude/settings.json applies to whoever trusts the folder.
S=".claude/settings.json .claude/settings.local.json $HOME/.claude/settings.json hooks/hooks.json .cursor/hooks.json $HOME/.cursor/hooks.json"
# BH1/BH2: every hook command, then the ones that reach the network or decode payloads
rg -n '"(command|matcher|type)"\s*:' $S
rg -n -i '"command"\s*:\s*"[^"]*(curl|wget|\bnc\b|https?://|base64|\|\s*(ba|z)?sh|python[0-9.]* -c|node -e)' $S
# BH3: permission mode and broad grants
rg -n '"(defaultMode|allow|ask|deny|additionalDirectories|enableAllProjectMcpServers|enabledMcpjsonServers|disableAllHooks)"' $S
rg -n '"(Bash|Bash\(\*\)|WebFetch|Read\(~?/\*\*\)|mcp__[^"]*)"' $S
# BH4: settings keys that run a command on their own, and env that reroutes or injects
rg -n '"(apiKeyHelper|awsAuthRefresh|awsCredentialExport|otelHeadersHelper|statusLine|fileSuggestion)"' $S
rg -n '"(ANTHROPIC_BASE_URL|ANTHROPIC_API_URL|HTTPS?_PROXY|NODE_OPTIONS|LD_PRELOAD|DYLD_INSERT_LIBRARIES|GIT_SSH_COMMAND|CLAUDE_CODE_SHELL_PREFIX)"' $S
rg -n '"(PLAYWRIGHT_BROWSERS_PATH|PUPPETEER_EXECUTABLE_PATH|AGENT_BROWSER_EXECUTABLE_PATH)"' $S # which browser binary runs (RT1)
What to weigh:
| Item | Why it matters |
|---|---|
UserPromptSubmit / PostToolUse hooks | See every prompt / every tool result (file contents, command output). Any network call here is a BH2 exfil candidate. |
PreToolUse hooks that return an allow decision | Silently approve tool calls the user would otherwise be asked about |
SessionStart hooks | Run on open, before the user has typed anything; can inject context |
defaultMode: bypassPermissions / acceptEdits / dontAsk in a project file | Lowers the bar for everyone who clones the repo |
permissions.allow with Bash, Bash(*), Bash(curl:*), WebFetch, Read(~/**) | Pre-approval far beyond what a repo needs |
apiKeyHelper, statusLine, awsAuthRefresh, … | Shell commands that run on their own schedule; disableAllHooks doesn't cover every one of them — read each |
env.ANTHROPIC_BASE_URL / proxy vars | Route every prompt and file the agent reads through someone else's host |
NODE_OPTIONS=--require, LD_PRELOAD, GIT_SSH_COMMAND | Code injection into processes the agent spawns |
PLAYWRIGHT_BROWSERS_PATH, PUPPETEER_EXECUTABLE_PATH, --executablePath | Pick which browser binary runs. Check its version under RT1; a target in the repo or /tmp is its own finding |
enableAllProjectMcpServers: true | Auto-approves whatever .mcp.json a repo ships |
Equivalents elsewhere: Codex approval_policy = "never" with sandbox_mode = "danger-full-access"
(rg -n 'approval_policy|sandbox_mode|\[mcp_servers' ~/.codex/config.toml); Gemini CLI "trust": true on an MCP
server or auto-accept / YOLO settings (rg -n '"(trust|autoAccept|approvalMode)"' .gemini/settings.json ~/.gemini/settings.json);
VS Code / Copilot tool auto-approve settings; Cursor auto-run and allowlists (in the app UI — ask the user).
Change control (CC1–CC3). GTIG (2026-11-16) reports a DPRK cluster that edited .claude/settings.json in victims'
internal repos so Claude Code startup fetched a backdoor. Check who can change committed agent config (CODEOWNERS and
required review, CC1), what changed in the last 90 days (CC2), and whether CI flags hook changes (CC3, optional):
references/change-control.md.
Repo auto-run triggers (BH5). No agent needed: .vscode/tasks.json "runOn": "folderOpen" (BH5a), package.json
scripts that run a hidden file (BH5b), Composer / Gemfile / dev container commands (BH5c). Several triggers across
tools that run the same file (BH5d) is DO-NOT-INSTALL on its own. Greps: references/content-checks.md.
A normal desktop app can add plugins, a startup hook, and a remote MCP server to Claude Code, Codex, and Cursor when
it is merely opened, and the Codex installer can store its own hook-trust record. Record installed by for every
plugin, marketplace, hook, and MCP server. Paths are in references/locations.md. Read-only,
relative to $HOME:
rg -n -A3 '^\[(marketplaces|plugins|hooks\.state)' .codex/config.toml 2>/dev/null
jq '.enabledPlugins, .extraKnownMarketplaces' .claude/settings.json .copilot/settings.json 2>/dev/null
jq -r '.plugins | to_entries[] | [.key, (.value[0].version // "-"), (.value[0].installedAt // "-"), (.value[0].scope // "-")] | @tsv' .claude/plugins/installed_plugins.json 2>/dev/null
ls .copilot/installed-plugins 2>/dev/null
A Claude Code plugin's own hooks/hooks.json is not in settings.json. Also run claude plugin list and codex plugin list (the user runs these; they are not pre-approved here). Cross-check install times against app logs. For Postman, search auto-existing-upgrade in ~/Library/Application Support/Postman/logs/main.log.
| ID | Check | Finding |
|---|---|---|
| AP1 | An enabled plugin or marketplace the user did not install, whose install time matches an app launch or update | needs_validation, medium. Confirm with the user, then remove it or keep it on purpose |
| AP2 | A [hooks.state."<plugin>:...session_start..."] trusted_hash for a hook the user never reviewed in Codex's hook review | medium. Re-read the hook text, then remove the record or approve it knowingly. The record is a config file: it shows an approval was stored, not who stored it |
| AP3 | SessionStart hook text that sets a default workflow for broad work ("before responding to any … task, load … skill") | medium. A vendor instruction injected into every session is a prompt-injection surface that vendor controls. Postman's own text says AGENTS.md, CLAUDE.md, and direct user requests take precedence |
| AP4 | A remote MCP server added with the plugin (mcp.*.json inside it, or a new [mcp_servers.*] entry) | needs_validation. Record the URL and whether it is authenticated |
| AP5 | After removal, leftover marketplace entries, hooks.state records, plugin caches, or CLI binaries | low. Remove leftovers by hand |
Worked report, checked 2026-11-04, still one user's evidence and not reproduced on a clean Mac. Postman desktop (first report on 12.33.4, a second on 12.35.1) logged source: auto-existing-upgrade and installed plugins for Claude Code and Codex, enabled postman@claude-plugins-official, and wired https://mcp.postman.com/mcp. The plugin README says the Codex install approves Postman's session-start hook with no separate prompt. A maintainer replied on 2026-11-03 that opt-in would be made clearer and that the hook approval was under review. No fix and no CVE as of 2026-11-04. Nothing in the reporting says data left the machine, and nothing says the plugin is malicious. Cite the report. Do not call the vendor malicious. An AP2 or AP3 hit on a machine that holds production credentials or deploy keys is where the medium escalates. After any vendor app update, re-run this inventory.
Sources: postmanlabs/postman-app-support#14370, postman-plugin README.
M=".mcp.json .cursor/mcp.json .vscode/mcp.json $HOME/.claude.json $HOME/.cursor/mcp.json $HOME/.gemini/settings.json"
rg -n -A5 '"command"\s*:\s*"(npx|bunx|pnpm|uvx|uv|pipx|docker|deno)"' $M "$HOME/Library/Application Support/Claude/claude_desktop_config.json"
rg -n -A5 'command\s*=\s*"(npx|uvx|docker)"' $HOME/.codex/config.toml
rg -n '@latest|:latest"|"-y"|"--yes"' $M
rg -n '"(url|serverUrl|httpUrl)"\s*:' $M # remote servers
"args": ["-y", "@acme/mcp-server"] // unpinned (RP1): next launch runs whatever was published last
"args": ["-y", "@acme/[email protected]"] // pinned to an exact version
"args": ["run", "ghcr.io/acme/mcp@sha256:…"] // docker: digest; a numeric tag is weaker; no tag / latest is unpinned
Unpinned package runners are a confirmed finding (condition third_party_dependency), sized by what the server can
reach. Remote url servers can't be pinned at all — the vendor can change tools any time; record that and lean on
the diff process below. Secrets in env / headers blocks go to secrets-audit; config should hold ${VAR}
references only.
The editor that talks to those servers is part of the same supply chain. MC1: each editor that loads MCP servers and
its version. VS Code below 1.145.3 is high; a fork (Cursor, Windsurf, VSCodium) is needs_validation until its
release notes name the upstream build. MC2: legacy SSE transport entries. MC3: install links and network workspaces,
hardening notes unless one was already approved. Commands and CVEs: references/mcp-client.md.
The MCP project's own reference servers shipped six fixes in release v2.4.0 on 2026-11-11 (no CVE ids, none reported
exploited in the wild as of 2026-11-12). For each MCP config (.vscode/mcp.json, .cursor/mcp.json,
~/.cursor/mcp.json, ~/.claude.json, claude_desktop_config.json), list entries that launch mcp-server-git,
mcp-server-fetch or @modelcontextprotocol/server-filesystem and record the pinned version, or "unpinned":
rg -n 'mcp-server-git|mcp-server-fetch|server-filesystem' .vscode/mcp.json .cursor/mcp.json ~/.cursor/mcp.json ~/.claude.json \
"$HOME/Library/Application Support/Claude/claude_desktop_config.json" 2>/dev/null
mcp-server-git below 2026.11.11 → finding high. GHSA-6hqx-gqrx-c5r2 (CVSS 3.1 7.8): a read-only git_status on an untrusted repository ran a program named in that repo's .git/config (core.fsmonitor, diff.external, hooks, filter and merge drivers, signing) with the server's privileges. The repository the agent was asked to look at was the payload. Fixed in 2026.11.11. The same release covers GHSA-q74p-4wrc-q7w6 (medium): --repository confinement bypass via alternates, linked worktrees and symlinks. Windows junctions are not covered yet.mcp-server-fetch below 2026.11.11 → finding low. fec0::/10 was treated as public, and a robots.txt //private form bypassed the guard (GHSA-3rxj-6jhw-qfv7, GHSA-f9hh-cmx9-2f23).@modelcontextprotocol/server-filesystem on any date version from 2025.1.14 through 2026.8.31, or any semver below 2.3.0 → finding medium. A symlink swap after validation lets reads leave the allowed directories, and a swapped move_file source brings an outside file in (GHSA-p9cv-8g75-4xcg, GHSA-7m4x-rv66-mxhh). Fixed in 2.3.0. Windows is only narrowed.npx -y / uvx → needs_validation. The TypeScript servers moved from date versions (2025.x / 2026.x) to semver, so a package manager ranks fixed server-filesystem 2.3.0 below the old date versions and will not offer the fix. npx -y @modelcontextprotocol/server-filesystem may still resolve to a vulnerable date version. Pin @2.3.0 (or newer) explicitly. Say so in the finding. Source: release v2.4.0.git on a repository it did not set up should clear repo-defined config the way that fix does: GIT_CONFIG_COUNT overrides for core.fsmonitor, core.hooksPath, signing and pager; --no-ext-diff --no-textconv; refuse Git older than 2.31. Running git status on a freshly cloned untrusted repo is not a read.Browser servers and CLIs (Playwright MCP, Puppeteer servers, agent-browser) launch their own Chromium, which never
updates itself and runs every page the agent visits. Find the version each one starts and compare it with Chrome for
Testing stable. Below a known-exploited or sandbox-escape fix is confirmed: High when it browses untrusted URLs from
an app that holds Accessibility, Medium for untrusted URLs alone, Low for localhost only. More than 2 majors behind
with no named CVE is needs_validation. A pinned browser server also needs an update budget: once its Chromium is
more than one major behind, bumping the pin is a security fix. Recognizers, the grep, the ladder and the RP1
reconciliation are in references/browser-runtimes.md; the per-machine version check
is personal-opsec C7.
Ask where agents get started, and inventory instruction files and settings in catch-all folders the browser writes to.
In October 2026 a planted AGENTS.md in a customer's ~/Downloads told Codex to add a server to the machine-wide
~/.codex/config.toml and install a malicious npm package. Checks: a trusted catch-all folder (LD1), an instruction
file nobody wrote (LD2), a machine-wide server or base URL the user doesn't recognize (LD3, including a plugin or MCP server a desktop app added — AP1, AP4), a package from a known
campaign (LD4). LD2–LD4 are Critical. Codex trust is per exact path, so an untrusted entry for ~/Downloads
doesn't cover folders inside it. Details: references/launch-directories.md.
Read each IDE's extensions.json and list every version folder on disk: IDEs keep old versions after an update,
so a malicious build can outlive the update. Checks: known-bad version (EX1), auto-update on for high-privilege
extensions (EX2), same id from a different marketplace (EX3), code prepended to extension.js (EX4), unverified
publisher or typosquat (EX5), no extension policy (EX6). An EX1 or EX4 hit is Critical and goes to incident-triage
before anything is cleaned up. The prompting case is the malicious Anthropic.claude-code 2.1.312 and 2.1.313 builds
in Cursor's marketplace on 2026-10-29, written to the cache that serves it while Open VSX stayed clean. A clean
upstream registry does not clear a cache or mirror: check publisher and version against upstream. Inventory command,
check details and severity are in references/ide-extensions.md.
Read every tool's name, description, and each parameter's name, description, default, and enum labels. That text goes straight into the model's context and is as authoritative to it as the system prompt. Look for:
read_file look like a trusted tool, or
a name that shadows another server's tool.~/.ssh, opens sockets, spawns processes). Over-broad declared permissions (LP2), none declared despite
clear capabilities (LP3), or declared but unused (LP4) belong here too.A server can pass review at v1.0 and change its tool descriptions or add tools in v1.1, or a remote server can change overnight. The control is a snapshot at approval and a diff on every upgrade:
npm diff --diff=@acme/[email protected] --diff=@acme/[email protected] shows
every changed file, including tool registration code. Read changes to descriptions, schemas, new tools, and new
network or file access.npx @modelcontextprotocol/inspector@<version> --cli <server command> --method tools/list > mcp-snapshots/<server>@<version>.json,
then diff the sorted JSON against the approved snapshot. This launches the server, so it is a validation step for
the user, not something this skill runs.Ask where each agent tool was installed from, then check the installer itself. Read-only. Do not print credential values. The prompting report is Binance's account of its 2026-10-29 theft (about $6.3 billion), published as a preliminary report on 2026-11-03. The dated steps below are from a full-text translation (PANews) plus CoinDesk and The Block. The issue author did not reach Binance's own copy of that preliminary report, so treat the sequence as reported, not as something this repo re-verified against Binance's page. The initial announcement (2026-10-30) said a compromised DevOps laptop gave access to a service container. CoinDesk attributes the theft to North Korea, citing the FBI via Binance's CSO.
Reported sequence, and only this sequence: in June 2026 a wallet DevOps engineer searched for a popular AI coding tool, downloaded a tampered Homebrew installer, and tried to install the tool with it. In September a fake interview ended with a "homework" repository whose code ran on install, on the work computer, and endpoint protection did not detect it. On 20 October the attackers used Binance's internal AI tools to take over other engineers' machines and found a container-deployment token on a laptop. On 29 October that token deployed a container against the wallet signing service. Not in the report, so do not fill them in: the name of the AI coding tool, how the installer was tampered with, the name of the malicious component, and how the internal AI tools were abused.
| ID | Check | Finding |
|---|---|---|
| IN1 | Where each agent tool (Claude Code, Codex, Cursor, MCP servers) was installed from, compared with the vendor's docs. Flag an installer, a .pkg, or a pipe-to-shell URL that came from a search ad or a third-party blog | needs_validation. If the source cannot be shown, confirmed critical, and hand off to incident-triage (dev-tool compromise) |
| IN2 | Homebrew is the real one. git -C "$(brew --repository)" remote -v should be the Homebrew/brew repository (https://github.com/Homebrew/brew or [email protected]:Homebrew/brew.git). which brew should be /opt/homebrew/bin/brew or /usr/local/bin/brew. brew tap: flag any tap the user did not add | Confirmed critical if the brew remote is anything else. An unrecognized tap is needs_validation |
| IN3 | Long-lived deploy tokens on the laptop. Existence and permissions only, never contents: ~/.docker/config.json, ~/.kube/config, shell history, and agent env files. Recommend short-lived or per-job credentials. Rotation is secrets-audit | High if a token there can ship to production |
| IN4 | For each MCP server or internal agent tool, whether it can run commands, read files, or call APIs on another person's device without a per-call approval | Medium to high. A design check. The report names internal AI tools as the pivot and gives no mechanism, so do not claim this is how Binance was hit |
| IN5 | An agent CLI under a lookalike name or scope (@claudecode/cli is malware, GHSA-vp2q-gp5r-xh5j; the real one is @anthropic-ai/claude-code). Check package.json, npm ls -g --depth=0, and install docs (references/change-control.md) | Critical if installed. Hand off to incident-triage |
git -C "$(brew --repository)" remote -v
brew tap
which brew
Ask first; this is an exposure to inventory, not a version to patch. WB1: a remote-control or web-session feature is on. WB2: a browser extension that can run on the agent's web origin (high with WB1). WB3: one agent account across personal and work machines. WB4: an approval rendered in a page a script could operate (hardening note). Sources, checks and the manifest read: references/web-to-agent-bridges.md.
Install-time malware can reach a coding agent even when the package is not an npm skill or plugin. Worked incident, checked against Socket's write-up on 2026-11-06: strutil-core 1.0.1 on RubyGems (account jamnajiea). A clean 1.0.0 was followed in under two hours by a malicious 1.0.1, a new build of the testmetest / Miasma line descended from the public Shai-Hulud toolkit. Socket flagged it about 70 seconds after publish. RubyGems removed both versions about five hours later. Socket reported no public dependents and no confirmed victims. Treat that as "none confirmed." A PyPI sibling, pystr-codec, used the same collection endpoint. Do not reproduce the payload.
gem install, bundle install, or unexpected Ruby native-extension build on a machine that also runs Claude Code, Cursor, Codex, or a similar agent. Or new MCP server entries, session hooks, or agent-instruction files the operator did not approve.strutil-core and lookalikes, and pystr-codec on PyPI). A native extconf.rb that fetches a JS runtime and runs an adjacent script instead of compiling C. New or modified MCP server entries, session hooks, or AGENTS.md / CLAUDE.md / Codex instruction files outside an explicit user or agent action. Outbound to an unfamiliar host right after a package install. For this incident only, Socket names paleasbest.top, with GitHub and GitLab as fallbacks. That hostname is an IOC for this build, not a permanent blocklist.incident-triage.gem list strutil-core 2>/dev/null
rg -n 'strutil-core|paleasbest' Gemfile.lock ~/.gem 2>/dev/null | head
rg -n 'mcpServers|session.*hook' ~/.claude ~/.codex ~/.cursor 2>/dev/null | head
Source: Socket, 2026-11-06.
NVIDIA SkillSpector (Apache-2.0) runs ~70 static checks plus optional LLM-assisted ones and scores each skill 0–100 with a SAFE / CAUTION / DO NOT INSTALL verdict. If the user has it installed (pinned — it is one more tool you're trusting):
skillspector scan --no-llm .claude/skills -f json -o skillspector.json # also .agents/skills, ~/.claude/skills, a candidate dir
--no-llm is pre-approved here. LLM mode sends file contents to the configured provider (NVIDIA's hosted
API by default); run it only with the user's explicit OK and never on folders holding config secrets.Close every candidate as confirmed, needs_validation, or rejected (see
references/findings-format.md). Severity goes on confirmed findings only, and
overall never exceeds demonstrated impact (references/severity-calibration.md).
Anchors for this surface:
| Severity | Typical shape |
|---|---|
| Critical | Active item sends credentials, transcripts, or source to an external host; concealed directive that runs commands or disables approvals; a known-bad or code-prepended IDE extension on disk (EX1, EX4); an agent installer whose source cannot be shown (IN1), or a Homebrew remote that is not Homebrew/brew (IN2); an install-time package that already rewrote agent config (strutil-core class); a lookalike agent CLI installed (IN5); a committed hook nobody accounts for (CC2); a directive that forbids reading a file and asks for it to run; several repo triggers that run the same file (BH5d) |
| High | Hook or bundled script with undeclared egress; project settings that bypass permissions or reroute model traffic; persistence into instruction files, settings, or shell init; a deploy token on the laptop that can ship to production (IN3); VS Code below 1.145.3, the MCP-client fixes (MC1); mcp-server-git below 2026.11.11 (MS1); a folderOpen task or project script that runs a hidden repo file (BH5a–BH5c) |
| Medium | Unpinned MCP server or git-installed skill with broad tool access; an unreviewed agent extension on auto-update on a machine with production access (EX2); unscoped Bash + WebFetch pre-approval; tool description that steers the model toward another tool or extra data; an app-added session hook the user did not review (AP2, AP3), without calling the vendor malicious; a remote-control feature plus a browser extension that can run on the agent's site (WB1+WB2), worded as an exposure: a hijacked extension could drive the agent; server-filesystem on a date version or below 2.3.0 (MS1); committed agent config with no code owner on a branch that takes direct pushes (CC1). AP2, AP3 and WB1+WB2 rate high on a machine that holds production or deploy credentials |
| Low | Unpinned item with narrow reach; over-broad trigger that shadows another skill; mcp-server-fetch below 2026.11.11 (MS1) |
Not findings — hardening notes: no tool-definition snapshot, missing permissions.deny rules, a pinned tag rather
than a SHA, no review process for marketplace updates. Report them separately and never give them a severity.
Per item, roll the findings up:
needs_validation items; list what would clear it (pin, scope the grant,
remove the hook).rejected candidates and hardening notes. "SAFE" means "nothing found by this review", not a
guarantee — say so.This catalog installs into .claude/skills/ and .agents/skills/, so audit it like any other source:
prompt-injection examples, secrets-audit key patterns, this skill's own
patterns) — triage them as documentation, and record them as rejected so later runs stay quiet.Bash, some alongside WebFetch/WebSearch. That's an EA1 finding against
the catalog, sized by what the skill's instructions actually do. Report it like you would for anyone else's skill.Write the machine-readable findings first, validate them, then render the markdown from them.
findings.json — project-scope items, paths repo-relative. findings.user.json — user-scope items, paths relative to
$HOME (e.g. .claude/settings.json). The validator rejects absolute and ~ paths, so keep the two roots apart.
These are the only files this skill writes, and only after the user agrees where they go.skill: "agent-supply-chain-audit"; fingerprint like
agent-supply-chain-audit:BH2:.claude/settings.json:posttooluse-hook-posts-to-webhook (rule ID + item + root cause —
no line numbers); title prefixed with the rule ID ([BH2] PostToolUse hook posts tool output to webhook.site);
trace from activation (hook event, skill trigger, server launch) to sink (egress, exec, write); owasp_category
may carry the OWASP LLM / Agentic ID (e.g. LLM03:2025 Supply Chain); no secret values anywhere — prefix + last 4.node references/validate-findings.mjs findings.json (references/validate-findings.mjs) (and findings.user.json). Fix every error before
writing prose.# Agent Supply-Chain Audit
## Scope: [project / user / managed / candidate] — [paths]
## Date: [date] — SkillSpector: [version, --no-llm | not run]
### Inventory
| # | Item | Type | Agent | Scope | Source | Installed by | Pin | Runs | Runtime | Verdict |
|---|------|------|-------|-------|--------|--------------|-----|------|---------|---------|
| 1 | .claude/skills/pdf-helper | skill | Claude Code | project | github.com/x/y | user | unpinned (main) | Bash (unscoped) | — | DO-NOT-INSTALL |
| 2 | playwright (MCP) | MCP server | Claude Code | user | npm @playwright/mcp | unknown | 0.0.41 (pinned 2026-06-02) | server process | chromium 149.0.7827.55 ⚠️ | CAUTION |
### Findings
#### [SEVERITY] [RULE-ID] [Title]
**Item / file:** `path` — **Verdict:** confirmed — **Category:** Hidden Instruction / Tool Poisoning | Exfiltration | Agent Snooping | Hooks & Settings | Rug Pull / Pinning | Supply Chain | Excessive Agency | Persistence | Trigger Abuse
**Evidence:** [quoted text or config, secrets redacted]
**Activation → impact:** [when it runs, what it reaches]
**Fix:** [remove / pin to X / scope grant to Y / delete hook]
### Needs validation
| Item | Rule | Blocker | Validation plan |
### Hardening notes (not findings)
- [gap, why it matters, suggested control]
### Rejected candidates
| Item | Rule | Why ruled out (control + location) |
secrets-audit.incident-triage: rotate what it could
reach, preserve the files, check egress.paleasbest.top is an IOC for strutil-core 1.0.1 only, not a standing blocklist.AFaffaan-m/ECC315k4,381 new stars in the last 7 days
Audit the whole repo: find bugs, security holes and performance bottlenecks. Get a ranked report in plain English.
DIDietrichGebert/ponytail203k4,904 new stars in the last 7 days
GAgarrytan/gstack143k598 new stars in the last 7 days
ADaddyosmani/agent-skills122k1,667 new stars in the last 7 days
Harden code against the OWASP Top 10: input handling, authentication, sessions and dependencies.
ADaddyosmani/agent-skills122k1,667 new stars in the last 7 days
RUruvnet/RuView106k739 new stars in the last 7 days