api-security-best-practices

Guide secure API design for REST, GraphQL, and WebSocket APIs.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill empowers developers to build robust and secure APIs by guiding them through the implementation of essential security patterns, protecting against common vulnerabilities and ensuring data integrity.

Core Features & Use Cases

  • Authentication & Authorization: Implement secure methods like JWT and OAuth 2.0, and set up role-based access control (RBAC).
  • Input Validation & Sanitization: Prevent injection attacks (SQL, XSS) by validating and sanitizing all incoming data.
  • Rate Limiting & DDoS Protection: Defend against abuse and attacks with configurable rate limiting and security headers.
  • Use Case: When developing a new user authentication API, use this Skill to ensure JWT tokens are securely generated, validated, and that routes are protected against unauthorized access.

Quick Start

Guide me through implementing JWT authentication for my Node.js API, including token generation and verification middleware.

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 JWT authentication for my REST API?

To implement JWT authentication for your REST API, this guidance details secure token generation, verification middleware setup, and route protection to prevent unauthorized access.

What are the OWASP API Security Top 10 vulnerabilities?

The OWASP API Security Top 10 vulnerabilities are common API security risks. This guidance provides compliance checklists, secure coding practices, and common pitfalls to protect REST, GraphQL, and WebSocket APIs against them.

How do I prevent injection attacks in my API through input validation?

To prevent injection attacks like SQL and XSS in your API, implement input validation and sanitization on all incoming data to ensure data integrity and block malicious payloads.

Does this API security guidance cover GraphQL and WebSocket APIs?

Yes, this API security guidance covers GraphQL and WebSocket APIs, providing secure design patterns, vulnerability protection, and OWASP compliance checklists tailored for those specific architectures.

What is the best way to set up rate limiting and DDoS protection for an API?

The best way to set up rate limiting and DDoS protection for an API is to configure rate limits and apply security headers to defend against abuse, ensuring robust traffic control and data availability.