laravel-security

Harden Laravel authentication, authorization, validation, and deployment security.

86|21|Updated Feb 9, 2026
One-click install
npx skills add https://github.com/Jamkris/everything-gemini-code --skill laravel-security-jamkris
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel-security
Source: https://github.com/Jamkris/everything-gemini-code/tree/main/skills/laravel-security
Command: npx skills add https://github.com/Jamkris/everything-gemini-code --skill laravel-security-jamkris

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Laravel applications often ship with insecure defaults and misconfigurations that expose authentication weaknesses, insecure data handling, and risky deployment practices. This Skill provides a comprehensive, developer-focused guide to hardening Laravel apps across authentication, authorization, validation, CSRF protection, mass assignment, file uploads, secrets, rate limiting, and deployment hardening.

Core Features & Use Cases

  • Middleware-based protections (CSRF, security headers) to reduce attack surface.
  • Guards, policies, and Form Requests to enforce proper authorization and input validation.
  • Best practices for secret management, secure cookies, password hashing, and safe logging to prevent data exposure and credential leakage.
  • Use Case: apply these guidelines to secure a new Laravel API or an admin panel with trusted roles and audited actions.

Quick Start

Apply the Laravel security best practices to harden auth, validation, CSRF, and deployments in your app workflow.

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 guards, defining policies, and using Form Requests. This enforces proper access control and validates user input before processing requests.

What is the best way to prevent CSRF attacks and set security headers in Laravel?

The best way to prevent CSRF attacks and set security headers in Laravel is by applying middleware-based protections. This reduces the application's attack surface by validating tokens and injecting secure response headers.

How do I protect sensitive data and manage secrets in a Laravel API?

Protect sensitive data and manage secrets in a Laravel API by using encrypted attributes, secure cookies, and proper secret management practices. This prevents data exposure and credential leakage during application deployment.

Can I apply Laravel security best practices to both small projects and large APIs?

Yes, you can apply Laravel security best practices to both small projects and large APIs. The guidelines cover rate limiting, signed URLs, and secure deployment configurations that scale across different application sizes.

How do I implement rate limiting and input validation for secure Laravel deployments?

Implement rate limiting and input validation for secure Laravel deployments by using Form Requests for validation rules and configuring rate limiters. This mitigates brute-force attacks and ensures only valid data enters the system.

Why does my Laravel app need hardened deployment configurations and safe logging?

Your Laravel app needs hardened deployment configurations and safe logging to prevent data exposure and credential leakage. Applying secure deployment recommendations ensures secrets remain protected and application vulnerabilities are minimized.