Back to skill

Security audit

CLAUDE.md Auto Discovery

Security checks for vulnerabilities and agentic risk

Overview

The skill is not overtly destructive, but it automatically reads local CLAUDE.md files and promotes their contents into privileged agent context without clear user control or containment.

Install only if you intentionally want CLAUDE.md files from the current directory and nearby parent directories to influence the agent. Review those files and any symlinks first, and prefer an opt-in version that confines reads to an approved project root and treats loaded content as untrusted reference material rather than system instructions.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T01 · Skill Instruction Hijacking

Error
Location
discover.mjs:43
Finding

Untrusted CLAUDE.md Content Is Loaded for Privileged Instruction Injection

Content
View full analysis
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
discover.mjs:17
Finding

Discovery Escapes the Project Boundary and Can Follow External Filesystem Links

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (6)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill is configured to auto-execute on every user message without manual invocation, causing automatic file discovery and context injection even when unrelated to the user's request. In this context, that makes the behavior more dangerous because it creates persistent, non-consensual exposure of local project content and increases the chance of prompt injection from repository-controlled files influencing all subsequent interactions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill explicitly states it will traverse directories, read CLAUDE.md files, process @include directives, and inject the resulting contents into system context, but it provides no user-facing warning or consent mechanism. This is dangerous because project files may contain sensitive instructions or data, and silently elevating file contents into system-level context can change model behavior in ways the user did not intend.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The script automatically discovers local CLAUDE.md files, reads their contents, and prints them specifically for injection into system context with no trust boundary checks, provenance validation, or user warning. Because these files can contain arbitrary natural-language instructions, this creates a prompt-injection supply-chain risk where repository-controlled content can silently influence downstream agent behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script automatically discovers and prints the full contents of CLAUDE.md files from the current and parent directories to stdout, with no confirmation, redaction, or warning. If those files contain secrets, internal instructions, or sensitive project context, invoking this utility can unintentionally disclose that data to logs, calling processes, or users who did not expect file contents to be emitted.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The file's user-facing natural-language description is entirely in Chinese, with no indication that other languages are supported or that Chinese is a required locale for a region-specific tool. Under the policy, forcing a specific language without user opt-in or justification is a locale-policy issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The human-readable comments and usage guidance are written in Chinese only, with no indication that language choice is optional or contextually required. Under the stated policy, forcing a specific language without user opt-in can be a locale-policy violation.

Content

No source excerpt is available for this finding.