T02 · Agent Memory Poisoning
- Location
scripts/update-context.sh:142- Finding
Untrusted Git Metadata Can Poison Persistent Agent Context
- Content
View full analysis
/dev/null; then CONFIG_PORT=$(jq -r '.gateway.port // empty' "$CLAWDBOT_CONFIG" 2>/dev/null) CONFIG_TOKEN=$(jq -r '.gateway.auth.token // empty' "$CLAWDBOT_CONFIG" 2>/dev/null) fi # Use config values or fall back to env/defaults GATEWAY_PORT="${CONFIG_PORT:-${CLAWDBOT_GATEWAY_PORT:-19000}}" GATEWAY_TOKEN="${CONFIG_TOKEN:-${CLAWDBOT_TOKEN:-}}" GATEWAY_URL="http://localhost:$GATEWAY_PORT" if [ -n "$GATEWAY_TOKEN" ]; then # Escape the prompt for JSON ESCAPED_PROMPT=$(echo "$PROMPT" | jq -Rs .) # Call gateway's OpenAI-compatible endpoint RESULT=$(curl -s -X POST "$GATEWAY_URL/v1/chat/completions" \ -H "Authorization: Bearer $GATEWAY_TOKEN" \ -H "Content-Type: ap ...[truncated 3255 chars]- Remediation
View remediation
