Back to skill

Security audit

Project Analyzer

Security checks for vulnerabilities and agentic risk

Overview

This skill is a local project-scanning helper whose file reading and Python execution fit its stated purpose, with some privacy and prompt-injection caveats users should understand.

Install only if you are comfortable with the agent running a local Python script over the project directory you ask it to analyze. Avoid pointing it at broad home, company, or secrets-heavy directories, and treat any commands or instructions found inside scanned project files as untrusted project content rather than directions to follow.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T01 · Skill Instruction Hijacking

Warning
Location
scout.py:36
Finding

Untrusted Project Instructions Are Passed Verbatim to the AI Agent

Content
View full analysis

Vulnerability Details

File Location: scout.py:36-37, scout.py:315-318, and scout.py:410-414
Vulnerability Type: Indirect prompt injection through untrusted project files
Risk Level: Medium

Vulnerable Code

The scanner explicitly prioritizes files commonly used to provide instructions to AI agents:

python
PRIORITY_FILES = [
    "README.md", "README.rst", "README.txt", "readme.md",
    "CLAUDE.md", ".claude/CLAUDE.md",
    "package.json", "pyproject.toml", "setup.py", "setup.cfg",
    "Cargo.toml", "go.mod", "go.sum",
    "pom.xml", "build.gradle", "build.gradle.kts",
    "composer.json", "Gemfile",
    "docker-compose.yml", "docker-compose.yaml", "Dockerfile",
    "Makefile", "justfile", "Taskfile.yml",
    ".env.example", ".env.sample", ".env.template",
    "requirements.txt", "requirements-dev.txt", "Pipfile", "uv.lock",
    "tsconfig.json", "jsconfig.json",
    "vite.config.ts", "vite.config.js",
    "next.config.js", "next.config.ts",
    "webpack.config.js",
    "angular.json", "nuxt.config.ts",
]

It reads those attacker-controlled files without applying a trust-boundary transformation:

python
# Read priority files
for name in PRIORITY_FILES:
    candidate = root / name
    if candidate.exists() and candidate.is_file():
        result["priority_files"][name] = read_file(candidate, max_lines=100)

Their contents are then placed verbatim into output intended for the agent:

python
# Priority files
if data["priority_files"]:
    lines.append("KEY FILES")
    lines.append("-" * 40)
    for name, content in data["priority_files"].items():
        lines.append(f"\n### {name}")
        lines.append(content)
    lines.append("")

Technical Analysis

The project scanner crosses a trust boundary: text controlled by the owner of a scanned repository is copied into a report consumed by an AI agent. The copied text is not merely metadata; it can contain arbitrary natural-language instructions. CLAUDE.md and `.claud ...[truncated 2565 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove CLAUDE.md and .claude/CLAUDE.md from the default priority-file list. Only inspect them after explicit user consent, and never treat their contents as operating instructions.
  2. Replace raw file inclusion with structured fact extraction. Return only relevant metadata such as project description, dependency names, and documented run commands.
  3. Clearly delimit all repository-derived text as untrusted content. Add an explicit Skill-level instruction that the agent must never follow commands or behavioral directives found in scanner output.
  4. Use JSON fields with provenance labels such as source_file, content_type, and untrusted_text instead of concatenating raw prose into a conversational report.
  5. Apply conservative length limits and, where raw excerpts are necessary, quote or encode them so they are visibly data rather than agent instructions.
  6. Require confirmation before the agent acts on commands discovered in a scanned repository. Commands should be described to the user, not automatically executed.
  7. Add adversarial tests containing prompt-injection payloads in README.md, CLAUDE.md, nested documentation, and configuration files. Verify that these payloads cannot redirect the agent or trigger tools.
  8. Preserve provenance in the rendered report so every excerpt is clearly attributed to an untrusted repository file.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (7)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scout.py (reported line 25)May include surrounding context.

python
SKIP_DIRS = {
    ".git", ".svn", ".hg",
    "node_modules", "__pycache__", ".venv", "venv", "env", ".env",
    ".tox", ".pytest_cache", ".mypy_cache", ".ruff_cache", ".hypothesis",
    "dist", "build", "target", ".next", ".nuxt", ".output", "out",
    ".idea", ".vscode",

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The README advertises multiple broad natural-language invocations such as 'Analyze this project' and 'give me an overview' that are generic enough to overlap with ordinary conversation. In an agent environment, this can cause the skill to trigger unexpectedly on unrelated user prompts and run local project-scanning behavior without sufficiently explicit user intent.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
74% confidence
Finding

The skill instructs reading and analyzing arbitrary project directories and invokes a local script, yet it declares no explicit tool scope or permissions boundary. Without clear allowed-tools/permissions, the skill may gain broader filesystem access than users expect, increasing the chance of over-reading sensitive files during project analysis.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The trigger phrases are very broad and overlap with common developer requests, so the skill may activate in situations where the user did not intend a filesystem scan or script execution. That raises the risk of surprising behavior, unnecessary access to local codebases, and unintended disclosure of sensitive project contents in the generated report.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill directs the agent to execute a local Python script against a user-specified directory without warning the user that command execution and recursive filesystem inspection will occur. If the path is broad or sensitive, this can expose secrets, credentials, or proprietary code contents, and running the script also expands risk because its behavior is not constrained or explained here.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The tool intentionally reads and emits contents of priority project files, which can include sensitive material such as internal documentation, dependency metadata, Docker configuration, and example environment files. In an agent-skill context, automatically returning file contents without a clear user-facing warning or consent gate creates a real data-exposure risk, especially when scanning untrusted or private repositories.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The source sampling logic reads and returns snippets from up to 15 source files, which may expose proprietary code, embedded credentials, API keys, or security-sensitive implementation details. Because this happens automatically as part of project analysis, users may not realize that code contents—not just structure and metadata—will be disclosed to the calling agent or downstream chat channel.

Content

No source excerpt is available for this finding.