security-best-practices

Enforce HTTPS, security headers, input validation, and CSRF protections for web applications.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Implement security best practices for web applications and infrastructure. Use when securing APIs, preventing common vulnerabilities, or implementing security policies. Handles HTTPS, CORS, XSS, SQL Injection, CSRF, rate limiting, and OWASP Top 10.

Core Features & Use Cases

  • Enforce HTTPS and security headers
  • Input validation to prevent SQL Injection and XSS
  • CSRF protection with tokens and endpoint protection
  • Secrets management via environment variables and Kubernetes Secrets
  • Secure API authentication with JWTs and refresh token rotation

Quick Start

Configure HTTPS, security headers, input validation, CSRF protection, and secret management to harden your application in minutes.

Frequently Asked Questions about security-best-practices

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

FAQPage Schema
How do I implement OWASP Top 10 security controls for my web API?

To implement OWASP Top 10 security controls for your web API, enforce HTTPS, apply Helmet security headers, validate inputs with Joi to prevent SQL injection and XSS, and use JWT authentication with refresh token rotation.

What's the best way to secure JWT authentication in microservices?

The best way to secure JWT authentication in microservices is by implementing token rotation with refresh tokens, managing secrets via environment variables or Kubernetes Secrets, and enforcing strict CORS and rate limiting policies.

How does CSRF token protection work for single page applications?

CSRF token protection for single page applications works by generating secure tokens that validate endpoint requests, pairing this with Helmet-configured security headers and strict input validation to prevent cross-site request forgery.

Can I use this approach to harden security for Kubernetes-based infrastructure?

Yes, you can harden security for Kubernetes-based infrastructure by managing application secrets via Kubernetes Secrets, enforcing HSTS and HTTPS, and applying OWASP-aligned input validation and rate limiting across your microservices.

Why do I need Joi-based input validation to prevent XSS and SQL injection?

You need Joi-based input validation to prevent XSS and SQL injection because it strictly sanitizes and structurally validates incoming API request data, blocking malicious payloads before they reach your backend or database queries.

How to configure Helmet and HSTS for enforcing HTTPS on web applications?

To configure Helmet and HSTS for enforcing HTTPS on web applications, apply Helmet middleware to automatically set secure HTTP headers and enable HSTS to force browsers to strictly use HTTPS for all future domain requests.