T01 · Skill Instruction Hijacking
- Location
scripts/guardian.sh:72- Finding
Untrusted pull request content can influence model-authorized merge decisions
- Content
View full analysis
/dev/null) DIFF_LINES=$(echo "$DIFF" | wc -l) echo "[guardian] Diff: $DIFF_LINES lines" # Truncate large diffs for context window if [[ $DIFF_LINES -gt 500 ]]; then DIFF=$(echo "$DIFF" | head -500) DIFF="$DIFF\n\n[... truncated, $DIFF_LINES total lines ...]" fi # Fetch PR files list FILES=$(curl -s -H "$AUTH" -H "$ACCEPT" "$API/repos/$REPO/pulls/$PR_NUM/files" 2>/dev/null | \ python3 -c "import sys,json; [print(f['filename']) for f in json.load(sys.stdin)]" 2>/dev/null || echo "unknown") REVIEW_PROMPT="You are reviewing PR #$PR_NUM on $REPO. Title: $PR_TITLE Branch: $PR_BRANCH Files changed: $FILES Diff: \`\`\`diff $DIFF \`\`\` Review this PR against these criteria: 1. CORRECTNESS — Does the code do what the PR title/description claims? 2. SECURITY — Any vulnerabilities, secret exposure, injection risks? 3. TESTS — Are changes tested? Could they break existing tests? 4. SCOPE — Does the PR stay within its stated purpose? 5. QUALITY — Code style, error handling, edge cases, naming Return your verdict as JSON: { \"verdict\": \"APPROVE\" or \"REQUEST_CHANGES\", \"summary\": \"One-line summary of your assessment\", \"findings\": [ {\"severity\": \"critical|major|minor\", \"file\": \"path\", \"line\": 0, \"issue\": \"description\", \"fix\": \"suggestion\"} ], \"confidence\": \"high\" or \"medium\" or \"low\" } If the PR is clean and correct, use verdict APPROVE with an empty findings array. If you find issues, use REQUEST_CHANGES with specific findings. Only use severity critical for security vulnerabilities or data loss risks. Return ONLY the JSON object, no other text." OPUS_RESULT=$( ...[truncated 3391 chars]- Remediation
View remediation
