What problem does it solve?
Laravel applications are frequently targeted by common web security threats including authentication bypass, CSRF attacks, SQL injection, XSS, and insecure file uploads, which can lead to data breaches, unauthorized access, and compliance violations. This Skill provides actionable, framework-specific best practices to eliminate these risks and secure Laravel applications end-to-end.
Core Features & Use Cases
- Authentication & Access Control: Implement secure API authentication with Sanctum or Passport, enforce model-level authorization via policies and gates, and manage secure token lifecycles to prevent unauthorized resource access.
- Input & Data Protection: Enforce strict input validation, mass assignment guards, encrypted database attributes, and parameterized queries to keep user data safe from tampering and injection attacks.
- Production Hardening: Configure secure deployment settings, rate limiting, security headers, CORS policies, and secret management to protect live applications from abuse and exposure.
- Use Case: When building a Laravel API that handles user invoice uploads, use this Skill to implement secure file validation, authenticated route access, and CSRF protection to prevent malicious file uploads and unauthorized data access.
Quick Start
Use the laravel-security skill to audit your existing Laravel application's authentication, input validation, and production configuration for security gaps and apply the recommended hardening best practices.