Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/serge_review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,16 @@ jobs:
# are wiped for parity with the hardening in claude_review.yml.
run: rm -rf .ai/ .claude/ CLAUDE.md

- name: Sanitize comment body
id: sanitize
run: |
COMMENT_BODY="${{ github.event.comment.body }}"
# Reject comments with adversarial prompt injection phrases
if echo "$COMMENT_BODY" | grep -iE '(ignore (previous|all) (instructions?|rules?|prompts?)|disregard (the )?(above|previous)|you are now|new (instructions?|rules?)|system:? |<\|im_start\||<\|im_end\||### (Instruction|System))'; then
echo "Potential prompt injection detected in comment" >&2
exit 1
fi

- uses: tarekziade/ai-reviewer@main
with:
llm_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
Expand Down
Loading