DSH Hub
dsh-api-relay-audit cover

toby-bridges/api-relay-audit

dsh-api-relay-audit

BundleWorkflow801 GitHub stars· updated 2026-08-15

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.

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

dsh-api-relay-audit DSH Hub badge
[![DSH Hub](https://dshhub.dev/badge/api-relay-audit.svg)](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>

What Is API Relay Audit?

API Relay Audit is a local security audit tool for AI API relays and LLM proxies. It keeps API relay audit, prompt injection audit, model substitution signals, and Web3 relay audit as separate query families so each result keeps a clean evidence boundary. Your API key is sent only to the relay URL you choose.

Use it when you rely on a third-party AI API relay, OpenAI-compatible proxy, Claude-compatible proxy, or Web3 agent workflow and want a repeatable Markdown report before trusting that relay with production or wallet-related traffic.

AI API Relay Security Audit

  • Detect relay tampering: prompt injection, prompt extraction, identity consistency signals, context truncation, tool-call rewriting, error-response leakage, and SSE stream anomalies.
  • Run locally: the standalone audit.py uses only Python stdlib plus curl; your API key is sent only to the relay URL you choose.
  • Produce reviewable evidence: each run generates a structured Markdown report with per-step findings and a final LOW / MEDIUM / HIGH verdict.

Quick Start

AUDIT_SCRIPT_REF=v2.4.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. 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.

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

  • It does not certify that a relay is safe.
  • It does not replace manual security review or operational monitoring.
  • It does not treat inconclusive as clean; blocked probes and ambiguous responses stay visible in the report.

Query Family Boundaries

Related plugins