
toby-bridges/api-relay-audit
dsh-api-relay-audit
Local security audit for AI API relays and LLM proxies: detects prompt injection, model substitution, tool-call rewriting, SSE anomalies, error leakage, and Web3 wallet risks. Website: https://apirelayaudit.com
Install
npx @deepseek-ai/dsh plugin --profile web add "github:toby-bridges/api-relay-audit#${DSH_PLUGIN_REF}"Restart `dsh web` after install. Bundle APIs can change during the developer preview.
README badge
[](https://dshhub.dev/plugins/api-relay-audit)Paste this into your README. The star count updates with every catalog sync.
From the README
Excerpt from toby-bridges/api-relay-audit, cleaned of badges and images.
API Relay Audit
Local security audit for AI API relays and LLM proxies.
<a href="#deepseek-harness-dsh-plugin"><strong>DSH Plugin</strong></a>
Your Agent Is Mine: what you can test locally
Your Agent Is Mine documents malicious API relays injecting payloads and exfiltrating credentials. Anthropic's September 10, 2026 report describes fraudulent Claude resellers swapping models and harvesting credentials through their client tooling. In his September 11 disclosure, co-author Chaofan Shou reports buying router data containing users' credentials.
API Relay Audit is an independent, local security audit tool for AI API relays and LLM proxies, informed by the paper. The current release checks observable relay behavior and generates a Markdown report covering:
- Prompt and context signals: hidden prompt injection, instruction override, and context truncation.
- Response integrity: changes to pinned package-command text, error-response leakage, and SSE stream anomalies.
- Reviewable findings: per-step evidence and
LOW / MEDIUM / HIGHsummaries; inconclusive probes remain visible.
See the output: example report (synthetic fixture) · Try it: run a local audit · Coverage and limits
The standalone script uses Python's standard library plus curl. Your API key
is sent only to the relay URL you choose.
Quick Start
AUDIT_SCRIPT_REF=v2.5.0
curl -fsSL "https://raw.githubusercontent.com/toby-bridges/api-relay-audit/${AUDIT_SCRIPT_REF}/audit.py" -o audit.py
python audit.py --key <YOUR_KEY> --url <BASE_URL> --output report.md
# Web3 / wallet users
python audit.py --key <YOUR_KEY> --url <BASE_URL> --profile web3 --output report.md
See a public-safe fixture report: sanitized audit report.
Pinned v2.5.0 downloads require a published tag; a draft release alone does
not guarantee availability. Use master as AUDIT_SCRIPT_REF only when
intentionally testing unreleased changes.
If API Relay Audit helps you evaluate a relay before sending real traffic, star the repository to follow new detector coverage and release-tested updates.
JSON Reports
v2.5.0 supports --format json for local automation:
python audit.py --key-env API_RELAY_AUDIT_KEY --url <BASE_URL> --format json --output report.json
Without --output, stdout contains one JSON document and progress goes to
stderr. JSON preserves the existing final risk rating and full Markdown
evidence; it does not sanitize the report for public sharing. See the
JSON schema and coverage boundaries.
When to Use It
- You use a third-party AI API relay, mirror, gateway, or LLM proxy.
- You want to check whether a Claude-compatible or OpenAI-compatible proxy injects prompts, swaps models, truncates context, or rewrites tool output.
- You are testing relay behavior before production traffic, coding-agent automation, package-install suggestions, or wallet-related actions.
- You need a local, repeatable audit report instead of a web tool that asks for your API key.
What It Does Not Claim
…
