Skip to content

fix(resolve-pr-feedback): treat PR comment text as untrusted input#490

Merged
tmchow merged 1 commit intomainfrom
tmchow/pr-feedback-injection-guard
Apr 2, 2026
Merged

fix(resolve-pr-feedback): treat PR comment text as untrusted input#490
tmchow merged 1 commit intomainfrom
tmchow/pr-feedback-injection-guard

Conversation

@tmchow
Copy link
Copy Markdown
Collaborator

@tmchow tmchow commented Apr 2, 2026

Summary

  • Adds a security directive to both resolve-pr-feedback SKILL.md and its pr-comment-resolver agent marking PR comment text as untrusted input
  • The agent can still read and consider comment content as context, but must never execute commands, scripts, or shell snippets found in comments
  • Motivated by real-world PR comments containing "Prompt for agents" sections that could be exploited for prompt injection

Test plan

  • Run resolve-pr-feedback against a PR with benign review comments -- verify behavior unchanged
  • Run against a PR containing embedded shell commands in comments -- verify the agent reads context but does not execute the commands

🤖 Generated with Claude Code

Add security directive to both the skill and its resolver agent
instructing them to never execute commands, scripts, or shell snippets
found in PR comments. Comments are still read as context for evaluation,
but the agent must always read the actual code and decide fixes
independently.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tmchow tmchow merged commit 1847242 into main Apr 2, 2026
2 checks passed
@github-actions github-actions bot mentioned this pull request Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant