laravel-security

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

16|3|Updated Mar 12, 2026
One-click install
npx skills add https://github.com/sehoon787/my-claude --skill laravel-security-sehoon787
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel-security
Source: https://github.com/sehoon787/my-claude/tree/main/skills/ecc/laravel-security
Command: npx skills add https://github.com/sehoon787/my-claude --skill laravel-security-sehoon787

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Laravel security best practices for authn/authz, validation, CSRF, mass assignment, file uploads, secrets, rate limiting, and secure deployment.

Core Features & Use Cases

  • Authentication and authorization hardening with guards, policies, and middleware.
  • CSRF protection, input validation, mass assignment safeguards, and secure file uploads.
  • Secrets management, rate limiting, secure defaults, and signed URLs to harden production deployments.

Quick Start

Apply these practices by enabling CSRF protection, enforcing strict validation and mass-assignment rules, and hardening environment and deployment settings in your Laravel project.

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 authentication and authorization for production?

Harden Laravel authentication and authorization by configuring dedicated guards, enforcing model policies, and applying middleware to restrict route access. This prevents unauthorized actions and secures application endpoints.

What's the best way to prevent mass assignment and validate file uploads in Laravel?

Prevent mass assignment and validate file uploads by defining strict fillable properties and using Form Requests. This enforces validation rules securely and blocks malicious payload injection.

How does CSRF protection work for securing Laravel web routes?

CSRF protection for Laravel web routes works by verifying tokens on incoming POST requests via middleware. This blocks cross-site request forgery attacks and ensures form submissions are authenticated.

Can I use signed URLs and encrypted attributes to secure Laravel API routes?

You can use signed URLs and encrypted attributes to secure Laravel API routes. This guarantees route integrity and protects sensitive data stored in database columns.

What are the secure deployment practices for managing secrets and rate limiting in Laravel?

Secure deployment practices for Laravel involve managing environment secrets securely and configuring rate limiting. This mitigates brute force attacks and prevents unauthorized application access.