PromptsMay 14, 2026·2 min read

api-relay-audit — Audit AI API Relays for Prompt Attacks

Local 13-step audit for AI API relays/proxies: injection/leakage, context truncation, tool rewriting; verified 419★, pushed 2026-05-11.

Agent ready

Review-first install path

This asset needs a review step. The copied prompt tells the agent to dry-run, show the writes, then proceed only after confirmation.

Needs Confirmation · 62/100Policy: confirm
Agent surface
Any MCP/CLI agent
Kind
Prompt
Install
Single
Trust
Trust: Established
Entrypoint
Asset
Review-first command
npx -y tokrepo@latest install d9581f75-3ab6-5930-9390-8b7413355b5c --target codex

Dry-run first, confirm the writes, then run this command.

Intro

Local 13-step audit for AI API relays/proxies: injection/leakage, context truncation, tool rewriting; verified 419★, pushed 2026-05-11.

Best for: Teams evaluating AI API gateways/relays before routing production traffic

Works with: Any relay exposing an OpenAI-compatible base URL + an API key; Python runtime to run audit.py

Setup time: 10-20 minutes

Key facts (verified)

  • GitHub: 419 stars · 41 forks · pushed 2026-05-11.
  • License: MIT · owner avatar + repo URL verified via GitHub API.
  • README-backed entrypoint: python audit.py --key <YOUR_KEY> --url <BASE_URL> --output report.md.

Main

  • Treat it as a pre-flight checklist for any API relay/proxy: run once, archive the Markdown report, then re-run after provider updates.

  • Use the built-in profiles (general, web3, full) to match your threat model and cost/time budget.

  • Focus on relay integrity signals it tests for (prompt leakage, instruction override, context truncation, tool-call rewriting, SSE anomalies).

  • Share the report with security + platform teams and require a “no HIGH findings” gate before production rollout.

Source-backed notes

  • README states it runs a local 13-step audit and outputs a structured Markdown report.
  • README lists three runtime profiles: general, web3, and full.
  • Quick Start in README uses a standalone audit.py downloaded via curl and executed with Python.

FAQ

  • Does it require installing a package?: No — README provides a standalone audit.py you can download and run locally.
  • What do I give it?: A provider API key and the relay/proxy base URL; the script runs a predefined audit sequence.
  • How often should I run it?: Run before onboarding a relay and re-run after provider updates, config changes, or incidents.
🙏

Source & Thanks

Source: https://github.com/toby-bridges/api-relay-audit > License: MIT > GitHub stars: 419 · forks: 41

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets