laravel-security

Outline Laravel security best practices for authentication, authorization, validation, CSRF, and deployment.

Updated Apr 7, 2026
One-click install
npx skills add https://github.com/Sivanwol/sabo-platfom --skill laravel-security-sivanwol
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: laravel-security
Source: https://github.com/Sivanwol/sabo-platfom/tree/main/.ai/skills/laravel-security
Command: npx skills add https://github.com/Sivanwol/sabo-platfom --skill laravel-security-sivanwol

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a consolidated set of security best practices to harden Laravel applications, reducing exposure to common vulnerabilities in authentication, authorization, input validation, CSRF, mass assignment, file uploads, secrets, and deployment.

Core Features & Use Cases

  • AuthN/AuthZ hardening through middleware, guards, and policies.
  • Validation and data integrity via Form Requests and strict rules.
  • CSRF protection, secure session handling, and header hardening.
  • Mass assignment protection and safe model attributes.
  • Secure file uploads and secrets management with proper storage.
  • Rate limiting and guarded routes to prevent abuse.
  • Secure deployment guidelines including environment settings and key rotation.

Quick Start

Configure your Laravel project to apply the recommended security defaults today.

Frequently Asked Questions about laravel-security

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

FAQPage Schema
How do I secure authentication and authorization in a Laravel application?▼

Secure Laravel authentication and authorization by configuring middleware, guards, and policies. This Skill outlines concrete requirements for both API and web contexts to enforce strict access control and protect against unauthorized access.

What is the best way to prevent mass assignment and validate input in Laravel?▼

Prevent mass assignment in Laravel by defining safe model attributes and using Form Requests with strict validation rules. This ensures data integrity and blocks malicious input from overwriting protected database fields.

How do I configure CSRF protection and secure session handling for Laravel?▼

Configure CSRF protection and secure Laravel sessions by applying safe defaults and header hardening. This Skill specifies technical guardrails for managing secure session handling to prevent common web vulnerabilities.

Does this Laravel security guidance apply to both API and web contexts?▼

Yes, this security guidance applies to both API and web contexts. It covers rate limiting, guarded routes, and middleware configurations to prevent abuse and secure endpoints across different application environments.

How do I manage secrets and environment hardening for a Laravel deployment?▼

Manage Laravel secrets and environment hardening by applying secure deployment guidelines, including proper secret storage and key rotation. This ensures production environments satisfy strict security defaults against threats.