laravel-security

Implement Laravel security practices for auth, validation, and deployment.

Updated Apr 2, 2026
One-click install
npx skills add https://github.com/richardnpaul/everything-vscode-copilot --skill laravel-security-richardnpaul
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel-security
Source: https://github.com/richardnpaul/everything-vscode-copilot/tree/main/.github/skills/laravel-security
Command: npx skills add https://github.com/richardnpaul/everything-vscode-copilot --skill laravel-security-richardnpaul

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Laravel security best practices to defend against common vulnerabilities in authn/authz, validation, CSRF, mass assignment, file uploads, secrets, rate limiting, and secure deployment.

Core Features & Use Cases

  • Middleware protections for CSRF and security headers (CSRF token checks, Content-Security-Policy, HSTS).
  • Guards, policies, and Form Requests for robust access control and input validation.
  • Rate limiting, secure secrets management, and signed routes to harden APIs and web endpoints.

Quick Start

Apply the recommended security practices to a Laravel project by auditing middleware, guards, CSRF, validation rules, and environment settings.

Frequently Asked Questions about laravel-security

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

FAQPage Schema
How do I implement Laravel security best practices for authentication and authorization?

Laravel security best practices for auth involve configuring guards, Gates, and Policies to enforce robust access control. You can apply these middleware protections to shield application routes and API endpoints from unauthorized access.

What is the best way to prevent CSRF and mass assignment vulnerabilities in Laravel?

Preventing CSRF and mass assignment vulnerabilities in Laravel requires applying middleware-based CSRF token checks and using Form Requests for input validation. These mechanisms ensure only authorized data modifies your database records.

How do I harden Laravel APIs with rate limiting and secure configuration?

Hardening Laravel APIs with rate limiting and secure configuration involves defining rate limits on routes and managing environment secrets securely. Signed routes can also be implemented to protect sensitive web endpoints from tampering.

Can I use Form Requests for file upload validation and encrypted attributes in Laravel?

Yes, you can use Form Requests for robust file upload validation and apply encrypted attributes to secure sensitive database fields. This ensures uploaded files and stored secrets remain protected within your Laravel application.

Does Laravel production hardening require specific security headers and secrets management?

Laravel production hardening requires implementing security headers like Content-Security-Policy and HSTS alongside strict secrets management. Configuring these environment settings mitigates deployment risks and protects your application in production.