model-serving-security

Enforce server-side parameter bounds, rate limits, and SSRF-safe URL handling on model-serving endpoints.

4|Updated Apr 27, 2026
One-click install
npx skills add https://github.com/maruakshay/mii-ai-security --skill model-serving-security
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: model-serving-security
Source: https://github.com/maruakshay/mii-ai-security/tree/main/skills/model-serving-security
Command: npx skills add https://github.com/maruakshay/mii-ai-security --skill model-serving-security

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Model serving endpoints are expensive to operate. A single unthrottled client can exhaust GPU capacity for all users by submitting high-token-count requests. Streaming responses introduce new timing and partial-response leakage channels. Model-generated outputs that include URLs can cause the serving layer to make outbound requests — a classic SSRF vector in a non-obvious location.

Core Features & Use Cases

  • Parameter bounding: Enforce server-side caps on max_tokens, n, logprobs, and streaming to prevent resource exhaustion.
  • Multi-layer rate limiting: Apply per-key, per-user, per-IP, per-organization limits with shared state to deter abuse.
  • SSRF protections: Validate and restrict URLs derived from model outputs before outbound requests; disable URL following by default unless explicitly enabled.
  • Monitoring & quick win: Real-time latency, token usage, and error-rate monitoring with circuit-breaker behavior to maintain availability.

Quick Start

Implement parameter caps, multi-dimensional rate limiting, and SSRF-safe URL handling on your model-serving endpoints today.

Frequently Asked Questions about model-serving-security

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent token-exhaustion DoS on model-serving endpoints?▼

Prevent token-exhaustion DoS by enforcing server-side parameter bounding on max_tokens, n, and logprobs. This caps request costs and stops a single unthrottled client from exhausting GPU capacity for all users.

How does SSRF protection work for URLs generated in model outputs?▼

SSRF protection validates and restricts URLs derived from model outputs before any outbound requests occur. It disables URL following by default unless explicitly enabled, preventing unintended server-side requests.

What's the best way to implement multi-layer rate limiting for inference APIs?▼

Implement multi-layer rate limiting by applying per-key, per-user, per-IP, and per-organization limits with shared state. This deters abuse and prevents multi-dimensional rate-limiting bypass across your endpoints.

Do I need streaming limits to secure model-serving endpoints?▼

Yes, you need streaming limits to secure model-serving endpoints. Streaming responses introduce timing and partial-response leakage channels, so enforcing server-side bounds on streaming prevents resource exhaustion and data leakage.

Can I use circuit breakers to maintain availability during inference abuse?▼

Yes, you can maintain availability during inference abuse by using real-time monitoring of latency, token usage, and error rates. Circuit-breaker behavior triggers automatically to protect endpoint availability under heavy load.

Why does my model-serving endpoint make unintended outbound requests?▼

Unintended outbound requests occur when model-generated outputs include URLs that the serving layer follows. Enable SSRF-safe URL validation to restrict outbound requests before execution and disable URL following by default.