Back to skill

Security audit

codemap

Security checks for vulnerabilities and agentic risk

Overview

This skill is a local code-symbol indexer that reads user-selected source trees and writes a local SQLite index, with no evidence of hidden network access, credential use, or destructive behavior outside its own index.

Install only if you are comfortable with an agent reading source files in the repository roots you pass to codemap and storing symbol names, signatures, absolute paths, and line numbers in a local SQLite database. Avoid pointing it at unrelated private directories if you do not want that metadata indexed.

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
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (3)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill instructs agents to invoke a local executable over arbitrary repository roots and files, but it declares no explicit tool scope such as allowed tools or permissions. Even though the description claims 'no network' and positions the tool as benign indexing, the effective capability surface includes shell execution and filesystem access, which can expand what an agent is able to do without policy constraints. In agent environments, missing scope declarations increase the risk of overbroad file access, unintended writes during index creation, or misuse of the executable if the binary or path is replaced.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · bench.py (reported line 37)May include surrounding context.

python
"--exclude-dir=.git", "--exclude-dir=dist",
        name,
    ] + ROOTS
    p = subprocess.run(cmd, capture_output=True, text=True)
    return len(p.stdout)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The build function performs a destructive database operation by executing DELETE FROM symbols, which removes all previously indexed entries before rebuilding. Although the docstring says the index is rebuilt from scratch, there is no runtime confirmation, log message, or explicit user-facing warning near the destructive action itself.

Content

No source excerpt is available for this finding.