T01 · Skill Instruction Hijacking
- Location
git_log_intelligence.py:112- Finding
Untrusted GitHub Commit Content Is Passed into the Agent Context Without Prompt-Injection Boundaries
- Content
View full analysis
= MAX_LINES: capped_out += 1 continue if full_context: # Truncate long messages to protect the agent's context window content = (full_msg[:MAX_MSG_LEN] + '...') if len(full_msg) > MAX_MSG_LEN else full_msg important.append(f"COMMIT: {sha}\nAUTHOR: {author}\nMESSAGE:\n{content}\n{'-'*20}") else: important.append(f"- {sha}: {subject} ({author})") ``` The corresponding Skill instructions state: ```markdown ### Agent Logic: Call the script with the repo name and timeframe. Receive a filtered list of "Important" commits. Present a natural language summary to the user, noting how many noisy commits were hidden. ``` ### Technical Analysis Commit messages, commit subjects, and author names are controlled by repository contributors. The implementation retrieves these fields from GitHub and places them directly into text intended for processing by an AI agent. The output does not establish a strong trust boundary around the remote content. In particular, the Skill does not instruct the agent to: - Treat all repository metadata as untrusted data rather than instructions. - Ignore directives, tool requests, links, or requests for disclosure embedded in commit text. - Avoid changing its goals or invoking tools based on retrieved cont ...[truncated 2005 chars]- Remediation
View remediation
