laravel-security

Apply security best practices to Laravel authentication, input handling, and APIs.

Updated Apr 13, 2026
One-click install
npx skills add https://github.com/sakamoto-family-smile/agent_monorepo --skill laravel-security-sakamoto-family-smile
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel-security
Source: https://github.com/sakamoto-family-smile/agent_monorepo/tree/main/.claude/skills/ecc/laravel-security
Command: npx skills add https://github.com/sakamoto-family-smile/agent_monorepo --skill laravel-security-sakamoto-family-smile

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides comprehensive Laravel security guidance to protect authentication, input handling, API endpoints, secret management, and production deployments from common vulnerabilities.

Core Features & Use Cases

  • Middleware protections for CSRF protections and security headers
  • Guards and policies for access control
  • Validation and shaping input via Form Requests
  • Rate limiting for abuse protection
  • Secure defaults: encrypted casts, signed routes, and proper session settings
  • Guidance on configuring environment variables and trusted proxies

Quick Start

Configure your Laravel project to enable CSRF protection, apply security headers, implement token-based API authentication, validate inputs with Form Requests, and enforce secure session and secret handling.

Frequently Asked Questions about laravel-security

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

FAQPage Schema
How do I secure Laravel authentication flows and prevent unauthorized access?

Secure Laravel authentication by applying middleware protections and defining access control with guards and policies. This hardens login endpoints against unauthorized access and enforces strict user authorization rules across application routes.

What is the best way to implement rate limiting for Laravel API endpoints?

Rate limiting in Laravel protects API endpoints from abuse by restricting request volume per user. Configure rate limiters within your route definitions to throttle incoming requests and prevent denial-of-service attacks.

How do I validate user input safely in Laravel using Form Requests?

Validate user input safely in Laravel by using Form Requests to shape and authorize incoming data. This encapsulates validation logic, preventing malformed data from reaching controllers and mitigating injection vulnerabilities.

How do I configure Laravel CSRF protection and security headers?

Configure Laravel CSRF protection by enabling the built-in middleware for web routes. Apply security headers to protect against cross-site scripting and clickjacking, ensuring resilient applications with secure defaults.

Does this Laravel security guidance cover secret management and environment variables?

Yes, this guidance covers secret management by enforcing secure defaults for environment variables, encrypted casts, and proper session settings. It ensures sensitive data remains protected across production deployments.