disableRDP

Secure LLM Gateway — Security skill for Claude Code

Security community

Security-focused gateway in front of an LLM API — auth, prompt-injection defense, output filtering, audit logging, and rate limiting, each control mapped to a documented threat model.

How to install Secure LLM Gateway

This entry records only its repository, not the path inside it, so there is no exact command to give. Open disableRDP/secure-llm-gateway and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Secure LLM Gateway does

Security-focused gateway in front of an LLM API — auth, prompt-injection defense, output filtering, audit logging, and rate limiting, each control mapped to a documented threat model. Portfolio project.

Alternatives in Security

  • Defense In Depth — Implement multi-layered testing and security best practices 98.1k ★
  • Anthropic Cybersecurity Skills — 734+ structured cybersecurity skills for AI agents · MITRE ATT&CK mapped · agentskills.io open standard · Work 3.8k ★
  • MCP Security Checklist (SlowMist) — Comprehensive checklist: input validation, rate limiting, RBAC, credential management, container hardening 819 ★

README

Secure LLM Gateway

A reference implementation of a security-focused gateway sitting in front of an LLM API (Claude), built as a portfolio project demonstrating applied security architecture — not just working code, but the design decisions and trade-offs behind it.

**Status:** v1 complete — all 6 slices done. See the docs below for the design work behind it.

Why this exists

This project is a hands-on demonstration of security architecture thinking applied to a real, if small, system: an LLM gateway that mediates access between client applications and an upstream LLM API. It's built slice-by-slice, with each control mapped back to a specific entry in the threat model and documented as it lands.

Docs

  • THREAT_MODEL.md — assets, actors, STRIDE-based attack paths, and trust boundaries

Build order (v1)

  1. Input validation & sanitization — done (see below)
  2. Auth layer (per-client, scoped) — done (see below)
  3. Prompt injection defenses — done (see below)
  4. Output filtering — done (see below)
  5. Audit logging — done (see below)
  6. Rate limiting / cost controls — done (see below)

Each slice gets a working control, a README section explaining the design decision behind it, and a test or demo showing it functioning.

Getting started

python -m venv .venv
.venv\Scripts\activate      # macOS/Linux: source .venv/bin/activate
pip install -r requirements.txt

# run the gateway
uvicorn gateway.main:app --reload

# run the tests
pytest

# register a client and get an API key (printed once)
python scripts/generate_client_key.py my-client

# verify the audit log's tamper-evident hash chain
python scripts/verify_audit_log.py

Note: the default rate limit (5 requests, refilling at 1 per 2 seconds per client) applies immediately — expect `429`s if you script more than a handful of quick requests against one client while testing.

Local demo UI

Once the gateway is running (`uvicorn gateway.main:app --relo