api-security-best-practices

Implement secure API design patterns across REST, GraphQL, and WebSocket APIs.

Updated Nov 15, 2025
One-click install
npx skills add https://github.com/geinala/entry --skill api-security-best-practices-geinala
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-security-best-practices
Source: https://github.com/geinala/entry/tree/main/.agents/skills/api-security-best-practices
Command: npx skills add https://github.com/geinala/entry --skill api-security-best-practices-geinala

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Secure APIs by providing a structured approach to authentication, authorization, input validation, rate limiting, and protection against common vulnerabilities, enabling safer integrations and audits.

Core Features & Use Cases

  • Authentication & Authorization patterns (JWT, OAuth 2.0, API keys) with RBAC
  • Input validation, sanitization, and safe error handling to prevent injection and data leaks
  • Rate limiting and abuse prevention to guard against DDoS and brute force
  • Security testing and governance guidance across REST, GraphQL, and WebSocket APIs
  • Use Case: Conduct API security reviews, audits, and implement secure-by-default design in new and existing endpoints

Quick Start

Configure your API to require authentication, enforce authorization, validate inputs, and enable rate limiting for protected endpoints.

Frequently Asked Questions about api-security-best-practices

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

FAQPage Schema
How do I implement secure API authentication and authorization across REST, GraphQL, and WebSocket?

Secure API authentication and authorization require structured patterns like JWT, OAuth 2.0, or API keys with RBAC. Apply these uniformly across REST, GraphQL, and WebSocket APIs to control access and ensure only authenticated users reach protected endpoints.

What is the OWASP API Top 10 and how do I protect against common API vulnerabilities?

The OWASP API Top 10 outlines critical API security risks like injection and data leaks. Protect APIs by enforcing input validation, sanitization, safe error handling, and robust token handling to mitigate these common vulnerabilities during development.

How do I prevent API abuse, DDoS, and brute force attacks?

Prevent API abuse, DDoS, and brute force attacks by enabling rate limiting and abuse prevention mechanisms. Configure rate limits on protected endpoints to guard against automated threats and ensure resilient application performance.

Can I use this approach for ongoing API security testing and audits?

Yes, you can use this approach for ongoing API security testing and audits. It provides governance guidance and security review patterns to evaluate new and existing endpoints, ensuring continuous compliance and secure-by-default design.

Does input validation and safe error handling prevent data leaks in APIs?

Input validation and safe error handling prevent data leaks in APIs by sanitizing incoming data and obscuring internal system details from error responses. This stops injection attacks and ensures robust encryption in transit.