# Swagger / OpenAPI Documentation Exposed in Production

> Detects Swagger UI, Redoc, or OpenAPI documentation endpoints accessible without authentication in production.

- Skill: `zakirkun/swagger-openapi-documentation-exposed-in-production` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add zakirkun/swagger-openapi-documentation-exposed-in-production`
- Raw SKILL.md: https://api.skillmd.com/api/skills/zakirkun/swagger-openapi-documentation-exposed-in-production/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Docs & Writing
- Author: zakirkun (https://skillmd.com/u/zakirkun)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/zakirkun/swagger-openapi-documentation-exposed-in-production

---


# Swagger / OpenAPI Exposed in Production

## Overview
API documentation endpoints expose:
- Complete API schema including undocumented endpoints
- Authentication mechanisms and expected formats
- Example payloads that can be used for fuzzing
- Internal models and data structures

While useful in development, public Swagger in production gives attackers a full roadmap of the API.

## Remediation
- Restrict Swagger UI to internal networks or authenticated users
- Disable Swagger in production builds
- Use `NODE_ENV=production` check or similar to conditionally serve docs

