T06 · System Persistence
- Location
SKILL.md:89- Finding
Persistent System-Wide API Proxy Service
- Content
View full analysis
/etc/systemd/system/pastewatch-proxy.service << 'EOF' [Unit] Description=Pastewatch API Proxy (secret redaction) After=network-online.target Before=chainwatch-intercept.service [Service] Type=simple ExecStart=/usr/local/bin/pastewatch-cli proxy \ --port 9998 --upstream https://api.anthropic.com \ --severity high --audit-log /var/log/pastewatch-proxy.log Restart=always RestartSec=3 MemoryMax=128M [Install] WantedBy=multi-user.target EOF # 2. Update chainwatch to forward to pastewatch (not Anthropic directly) # Change --upstream from https://api.anthropic.com to http://localhost:9998 # 3. Enable and start systemctl daemon-reload systemctl enable pastewatch-proxy systemctl start pastewatch-proxy systemctl restart chainwatch-intercept ``` ### Technical Analysis The instructions create a system-level service under `/etc/systemd/system`, enable it for automatic startup, and configure it to restart continuously. They also direct the user to modify another proxy service so that API requests are routed through the downloaded `pastewatch-cli` executable. Continuous execution is relevant to an API proxy, but a root-managed, boot-enabled service is not required for the Skill's basic MCP scanning and redaction functionality. A foreground process or unprivileged per-user service would provide the relevant functionality with a smaller privilege and persistence footprint. Because the proxy is positioned in the outbound LLM request path, it can inspect and modify prompts, credentials, API headers, responses, and other data sent between the agent and its upstream provider. The reviewed project contains no source code for the executable, so its actual handling of intercepted traffic cannot be independently verified from ...[truncated 1834 chars]- Remediation
View remediation
