Back to skill

Security audit

Codebase Stats

Security checks for vulnerabilities and agentic risk

Overview

This skill is a straightforward local codebase metrics tool that reads project files and optionally writes a user-requested report.

Before installing, expect this skill to scan source files in the target project to compute metrics and optionally write a report if you pass --output. Use it only on codebases you are comfortable having your local agent read, and set a specific path, --language, or --max-files when you want tighter scope.

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
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (3)

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 · scripts/codebase_stats.py (reported line 65)May include surrounding context.

python
# Directories to skip
SKIP_DIRS = {
    'node_modules', '.git', '__pycache__', '.next', '.nuxt', 'dist', 'build',
    'target', 'vendor', '.venv', 'venv', 'env', '.env', '.tox', '.mypy_cache',
    '.pytest_cache', 'coverage', '.coverage', 'htmlcov', '.idea', '.vscode',
    'bin', 'obj', '.gradle', '.cache', 'tmp', '.tmp',
}

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The description says to use the skill for requests like "analyze a codebase," "audit code quality," and triggers such as "project metrics," "code quality," and "code analysis." These phrases are broad and could match many general software-engineering conversations, increasing the chance of unintended invocation without clearer scope or exclusions.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.