repo-map
Fail
Audited by Gen Agent Trust Hub on Sep 14, 2026
Risk Level: HIGHPERSISTENCECOMMAND_EXECUTIONINDIRECT_PROMPT_INJECTION
Full Analysis
- [PERSISTENCE]: The skill establishes persistent execution on macOS systems by creating a launchd agent. The
schedule_onfunction inscripts/repo_map.pygenerates a property list (plist) at~/Library/LaunchAgents/com.claude-code.repo-map-sync.plistand executeslaunchctl bootstrapto register it as a background service. Additionally, the installation instructions facilitate the modification of the user's~/.claude/settings.jsonto register a permanentUserPromptSubmithook that executes the skill's logic on every prompt. - [COMMAND_EXECUTION]: The script
scripts/repo_map.pymakes extensive use of thesubprocess.runfunction to invoke system commands, includinggitfor repository metadata extraction andlaunchctlfor service management. These commands operate on paths and data discovered during the filesystem scanning process. - [INDIRECT_PROMPT_INJECTION]: The skill is vulnerable to indirect prompt injection due to its ingestion of untrusted content from local repositories. Specifically, the
readme_summaryfunction inscripts/repo_map.pyreads the first line ofREADME.mdfiles from scanned repositories, which is then stored in a cache and injected into the agent's context byscripts/prompt_hook.py. - Ingestion points: Filesystem scan of repository roots, reading
README.mdcontents inscripts/repo_map.py. - Boundary markers: The injected context is prefixed with a descriptive header ("本地仓库地图命中") and followed by instructions, but it does not employ robust delimiters to isolate the untrusted README content from the agent's instructions.
- Capability inventory: The skill possesses capabilities for executing
gitandlaunchctlcommands, reading and writing files within the user's home directory (specifically the~/.claudedirectory), and modifying agent configuration files. - Sanitization: The ingested README content is truncated to 80 characters, which limits the potential payload length but does not prevent malicious instruction injection.
Recommendations
- AI detected serious security threats
Audit Metadata