All notable changes to skill-security-check are documented here.
- Bundled ATR (Agent Threat Rules) v2.1.2 as a static reference resource under
semgrep-rules/atr/— 338 YAML detection rules across 10 threat categories (prompt-injection, agent-manipulation, skill-compromise, context-exfiltration, tool-poisoning, privilege-escalation, model-abuse, excessive-autonomy, model-security, data-poisoning). Includes upstream LICENSE (MIT),atr statssnapshot (stats.txt), and Splunk SPL export (splunk-queries.spl). ATR rules are not evaluated by the skill mode or runtime hooks; they serve as a reference for downstream tooling such as the plannedatr_analyzer(opt-in) inskill-scannerv3.2.0. - docs/ATR-MAPPING.md — Cross-reference mapping ATR's 10 threat categories to cssc's 26 detection categories (Overlap / Net New / cssc-only sections) and v3.2.0
atr_analyzerrecommendations. - README.md gained an ATR Integration section between Detection Categories and Runtime Defense Hooks, pointing to the bundle and the mapping document.
- SKILL.md gained an External Reference: Agent Threat Rules (ATR) — bundled subsection under Detection Rule Packs.
- README.md ATR Acknowledgments updated from "311 rules" to "338 rules in v2.1.2" to reflect upstream snapshot at the time of bundling.
package.jsonversion bumped to3.1.1.binfield migrated from string form ("bin": "install.js") to object form ("bin": {"claude-code-skill-security-check": "install.js"}) to resolve thenpm pkg fixadvisory issued during v3.1.0 publish..npmignoreadds_deleted/to exclude the local file-deletion safe-area from npm tarballs (v3.1.0 tarball inadvertently shipped_deleted/bin/cli.js,_deleted/bin/install.mjs,_deleted/cli.js; v3.1.1 excludes them).
skills/security-check/SKILL.mdfrontmatterversioncorrected from"2.5.0"(stale since pre-v3.0.0) to"3.1.1"to align with package version.
- Acknowledged scope adjustment: Earlier ATR marketing materials referenced a
generic-regexexport, but ATR v2.1.2 CLI exposes onlyconvert splunk|elastic. The bundled snapshot includes the YAML source rules underrules/and the Splunk SPL export, which together cover the same patterns. Seesemgrep-rules/atr/README.md. - The previously published v3.1.0 tarball did not include ATR bundle (it was published from a working directory at commit
0fae335before the ATR commit was pulled). v3.1.1 includes the full ATR bundle (~4 MB unpacked) undersemgrep-rules/atr/.
- validate-bash.sh: Tier 5.5 npx ecosystem inline-eval deny — blocks arbitrary-code-execution flags (
-c,--call,eval,-e,-p) combined with npx/npm exec/pnpm/yarn/bun/deno. Mitigates CVE-2026-40933 (Flowise Authenticated RCE Via MCP Adaptersnpx -cpattern). Normal usage likenpx @scope/pkgandnpx --yes @scope/pkgpasses through via AND-condition design. Reference: https://github.com/FlowiseAI/Flowise/security/advisories/GHSA-c9gw-hvqq-f33r
- Discussion thread on anthropics/skills#492 with @eeee2345 (Agent Threat Rules upstream maintainer) helped frame the trust-boundary detection vector against an external benchmark.
- 8 new detection patterns: package manager lifecycle scripts, .git/hooks manipulation, settings.json hijack, GitHub Actions injection, symlink abuse, delayed execution, hidden state files, cross-project escape
- validate-bash.sh: Tier 10 (lifecycle scripts), Tier 11 (.git/hooks)
- mcp-response-inspector.mjs: 4 new detection categories
- package.json description updated for plugin submission
- Total detection patterns: 29 → 37
- Fix: rename
install.mjs→install.js— npm publish stripsbinentries with.mjsextension, causing the installer to be absent after install
- New: 3 detection patterns (#27-#29)
- #27: LLM Sampling Injection Markers —
[INST],<<SYS>>,<|im_start|>, Gemini/OpenAI tokenizer markers (Unit42) - #28: Log-To-Leak — logging/analytics/telemetry tool invocation instructions for data exfiltration (OpenReview)
- #29: Line Jumping — pre-approval action injection, silent/secret execution patterns
- #27: LLM Sampling Injection Markers —
- Enhanced: mcp-response-inspector.mjs (v1.4.0) — 3 new categories (sampling_injection CRITICAL, log_to_leak HIGH, line_jumping HIGH)
- Enhanced: Tool Shadowing — built-in tool name override detection (Read/Write/Edit/Bash), MCP config modification patterns
- Enhanced: Data Exfiltration — env theft chain strengthened (
set|,printenv > file, PowerShellGet-ChildItem Env:)
- New: 4 Semgrep custom rules (3 → 7 total)
ssrf.yml: Server-Side Request Forgery — fetch/axios/requests/urllib with user input, Express open redirect (CWE-918)sql-injection.yml: SQL Injection via ORM bypass — Django raw()/extra(), SQLAlchemy text(), Sequelize query(), Prisma $queryRaw (CWE-89)weak-crypto.yml: Weak cryptographic algorithms — MD5, SHA1, DES, RC4, Math.random() for security (CWE-327/328/330)insecure-deserialization.yml: Insecure deserialization — pickle, yaml.load, Marshal, unserialize, eval(JSON.stringify) (CWE-502)
- New: 4 detection patterns (#23-#26)
- #23: Tool Override / Shadow Attack — skill overriding existing tool definitions
- #24: Whiteboard / Memory Injection — injecting commands into shared files (CLAUDE.md, MEMORY.md, whiteboard)
- #25: Agent Spawn & Self-Replication — autonomous agent creation and propagation
- #26: MCP Elicitation Abuse — credential harvesting and privilege escalation via Elicitation UI
- New: Plugin manifest inspection —
.claude-plugin/plugin.jsonscanning for name impersonation, excessive permissions, undeclared hooks, metadata inconsistency - Enhanced: Role D —
allowed-toolsaudit for SKILL.md frontmatter (missing = Medium/High risk) - Enhanced: Red Team — plugin manifest poisoning, namespace squatting via plugins, hook chain injection vectors
- Enhanced: mcp-response-inspector.mjs (v1.3.0) — Elicitation abuse detection (5 patterns, WARNING severity)
- New: Semgrep custom rules (
semgrep-rules/) — 7 rules for/security-reviewcode change analysisangular-dom-xss.yml: AngularbypassSecurityTrustHtml/Script/Style/Url/ResourceUrl()detection (CWE-79)path-traversal.yml: Zip Slip viapath.resolve()+ string concat,fs.write*with path concat,path.join()with untrusted variable (CWE-22)idor-auth-check.yml: Express routes with auth middleware but no ownership check,findById(req.params)without owner filter (CWE-639)
- Enhanced:
/security-reviewworkflow — Added Step 2.5 (AI reasoning phase) for data flow analysis- Entry point identification (2-hop limit from changed code)
- Authentication/authorization check (IDOR prevention)
- Data flow tracing (input → validation → processing → output)
- Structured output table in Step 4 report
- Semgrep standard + custom rules run in single invocation (
--config auto --config ~/.claude/semgrep-rules/) - Inspired by GitHub Security Lab's Taskflow Agent findings on OWASP Juice Shop
- New detection: XOR/dynamic encoding obfuscation (ClawHavoc campaign patterns)
- New detection: agent-to-agent infection & lateral movement (P2P skill propagation)
- New detection: silent codebase exfiltration via DoD manipulation (Mitiga research)
- New detection: MCP tool redefinition/shadowing attacks
- New detection: API budget drain / overthinking DoS
- New detection: Auto Mode exploitation patterns
- New detection: multi-turn grooming (progressive privilege escalation)
- New Red Team vectors: DoD silent exfiltration, MCP tool shadowing, API budget drain
- New Deep Analyzer Role G: Auto Mode risk analysis
- Structural: Changelog extracted to CHANGELOG.md
- Structural: Credits moved to README.md
- Added LICENSE (MIT), .gitignore
- Added root README.md with disclaimer
- Updated mcp-response-inspector.mjs (v1.2.0): added tool_redefinition, agent_infection, budget_drain detection
- New: validate-bash.sh (
hooks/validate-bash.sh) — PreToolUse hook that blocks dangerous Bash commands- 9-tier defense: system destruction, git force push, git add -A, piped script execution, HTTP exfiltration, credential access, env exfiltration, AWS/IaC destruction, reverse shells
- All deny messages include actionable fix suggestions (→ 代替: ...)
- Quote-aware: literal strings inside
"..."and'...'are excluded from Tier 1-4, 8-9 checks to prevent false positives (e.g., PR body text mentioninggit push --force) - Tier 5-7.5 intentionally inspect quoted content (inline code HTTP exfiltration, credential access patterns must be caught even in quotes)
- New: Ghost File Detector Hook (
hooks/ghost-file-detector.sh) — PostToolUse hook that detects AI-generated "ghost files"- Catches common anti-pattern: creating
utils2.pyinstead of editingutils.py - Detects numeric suffixes,
_new,_copy,_backup,_old,_v*patterns - Warning-only (does not block) — the file may be intentional
- Reference: AI-generated code creates ghost files in 90-100% of repositories (Harness Engineering Best Practices 2026)
- Catches common anti-pattern: creating
- Improved: validate-bash.sh error messages — all deny messages now include actionable fix suggestions
- Example:
git push --force は禁止 → 代替: git push --force-with-lease - Principle: "Agents can ignore docs but cannot ignore linter errors" — error messages with fix examples guide correct behavior
- Example:
- New: MCP Response Inspector Hook (
hooks/mcp-response-inspector.mjs) — runtime PostToolUse hook for MCP response inspection- Detects: prompt injection, dangerous commands, data exfiltration, suspicious URLs, hidden content (zero-width chars, bidi override)
- CRITICAL findings on untrusted MCP → blocks response (exit 2)
- Trusted MCP whitelist for false positive reduction
- FIDES LOW enforcement at runtime
- New detection: API endpoint hijacking (ANTHROPIC_BASE_URL override, proxy injection, DNS/hosts manipulation)
- New detection: namespace squatting / typosquatting (official prefix abuse, Levenshtein similarity)
- New detection: Unicode homoglyph & encoding attacks (Cyrillic homoglyphs, bidirectional override, IDN homograph)
- New detection: context window poisoning (oversized references, repetitive filler, instruction dilution)
- New Red Team vector: clipboard & output exfiltration chains
- New Red Team vector: cloud metadata / IMDS access (169.254.169.254, metadata.google.internal)
- New Red Team vector: symlink & path traversal attacks
- New Role F: temporal attack analysis (conditional triggers, progressive escalation, delayed payload, state file manipulation)
- Enhanced Role D: allowlist escape chain analysis (all runtime patterns: python/node/ruby/perl/npm/npx), API endpoint integrity check
- New CLI analyzers:
namespace_analyzer(typosquat detection),size_analyzer(context poisoning),temporal_analyzer(delayed attacks) - New YAML rule packs:
api_hijacking,cloud_metadata,namespace_abuse - Enhanced
obfuscationrule pack: Unicode homoglyph patterns added
- CLI tool released:
pip install skill-scanner— standalone Python package - 9 pluggable analyzers: static (YAML+YARA), bytecode, pipeline, behavioral (AST+taint), trigger, LLM judge, meta (FP filtering), VirusTotal, Cisco AI Defense
- YAML signature rule packs: 10 categories (prompt_injection, data_exfiltration, command_injection, hardcoded_secrets, obfuscation, social_engineering, supply_chain, unauthorized_tool_use, resource_abuse)
- Multiple output formats: summary, json, markdown, table, sarif (GitHub Code Scanning), html (interactive)
- Scan policy system:
--policypresets and custom YAML policies scan-allcommand for batch scanning entire skill directoriesinteractivewizard mode for guided scanninggenerate-policy/configure-policyfor custom rule configuration--fail-on-findings/--fail-on-severityfor CI/CD integration
- Added "Before You Run" section with time estimates, confirmation notes, and installation-free guarantee
- New detection: backdoor persistence patterns (SSH authorized_keys, crontab, cloud IAM, systemd, startup scripts)
- New detection: privilege escalation via system utilities (GTFOBins/LOLBAS patterns — find -exec, vim escape, tar extraction, SUID abuse, shadow dump)
- Enhanced Red Team: cross-skill privilege escalation chain analysis, references/ directory scrutiny, step-by-step normalization detection
- Enhanced Supply Chain: author trust tier classification (A-F), metadata completeness audit, author concentration analysis
- New Role E: Skill Interconnection Risk — maps recon/exploit/persist chains across skills
- Enhanced Synthesis: supply chain overview in output, metadata absence as a risk signal
- Added Credits & Acknowledgments section
- New detection: HTTP exfiltration bypass (python -c / node -e inline HTTP patterns)
- New detection: credential file access patterns (SSH, AWS, GCP, Azure)
- New detection: reverse shell patterns (Bash, netcat, Python, Ruby, Perl, PowerShell)
- New Red Team vector: MCP tool poisoning (CVE-2025-6514, CVE-2026-21852)
- New Red Team vector: settings.json manipulation
- New Role D: Settings & Hook Audit
- Initial release: pattern scanner, red team analyst, deep analyzer
- 6 detection categories: prompt injection, data exfiltration, dangerous commands, steganography, social engineering, permission bypass