laravel-security

Apply Laravel security best practices for authentication, validation, and production hardening.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/mu-zhi/CaliberHub --skill laravel-security-mu-zhi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel-security
Source: https://github.com/mu-zhi/CaliberHub/tree/main/ai/skills/laravel-security
Command: npx skills add https://github.com/mu-zhi/CaliberHub --skill laravel-security-mu-zhi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a structured, practical guide to securing Laravel applications against common web vulnerabilities, reducing the risk of data breaches and downtime.

Core Features & Use Cases

  • Middleware protections and security headers to harden request handling.
  • Guards, policies, and Form Requests to enforce access control and validate inputs.
  • Secrets management, encryption, and configuration best practices for production deployments.
  • Rate limiting and general defensive measures to prevent abuse in API endpoints.

Quick Start

Review and apply the recommended Laravel security practices in your project to start hardening immediately.

Frequently Asked Questions about laravel-security

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

FAQPage Schema
How do I harden Laravel application security against common web vulnerabilities?

To harden Laravel application security, you must apply a structured set of best practices including proper environment configuration, middleware usage for security headers, policies for authorization, and form requests for input validation.

What's the best way to implement authentication and authorization in Laravel?

The best way to implement authentication and authorization in Laravel is by using built-in guards for authentication and creating policies to enforce structured access control across your application's resources.

How do I securely manage secrets and configuration for Laravel production deployments?

Securely managing secrets for Laravel production deployments involves proper environment configuration, ensuring APP_DEBUG is false, setting a valid APP_KEY, and following encryption configuration best practices.

How do I validate input and prevent abuse on Laravel API endpoints?

To validate input and prevent abuse on Laravel API endpoints, use Form Requests for input validation and apply rate limiting alongside middleware protections as general defensive measures.

Does this Laravel security hardening approach work for existing applications?

Yes, this Laravel security hardening approach works for existing applications as well as new projects, allowing you to review and apply recommended best practices to start securing your app immediately.

Why is setting APP_DEBUG to false important for Laravel production security?

Setting APP_DEBUG to false is important for Laravel production security because it prevents the exposure of sensitive environment details and stack traces to end users during application errors.