laravel-security

Enforce Laravel security best practices across authentication, authorization, validation, and CSRF.

Updated Mar 20, 2026
One-click install
npx skills add https://github.com/KanakMalpani/General-Private-Skills --skill laravel-security-kanakmalpani
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel-security
Source: https://github.com/KanakMalpani/General-Private-Skills/tree/main/skills/laravel-security
Command: npx skills add https://github.com/KanakMalpani/General-Private-Skills --skill laravel-security-kanakmalpani

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Laravel applications are frequently exposed to security risks if authentication, authorization, validation, CSRF, and deployment configurations are not properly hardened; this Skill provides a practical guide to address those gaps.

Core Features & Use Cases

  • Middleware protections for CSRF, security headers, and rate limiting to shield web routes
  • Guards, policies, and Form Requests to enforce robust access control and input validation
  • Secrets management and secure deployment practices to protect credentials and environment settings

Quick Start

Enable Laravel security best practices by turning on CSRF protection, applying security headers, configuring Sanctum or Passport for API authentication, and validating inputs with Form Requests.

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 by configuring guards and policies to enforce robust access control across web and API routes. This Skill guides setting up Sanctum or Passport and defining authorization rules to protect application endpoints from unauthorized access.

What's the best way to implement CSRF protection and secure headers in Laravel?

Implement CSRF protection and secure headers by applying middleware to shield web routes. This Skill enables middleware configurations for rate limiting, security headers, and CSRF tokens to defend against cross-site request forgery and injection attacks.

How do I validate file uploads and form inputs securely in Laravel?

Validate file uploads and form inputs securely using Laravel Form Requests to enforce robust input validation. This Skill provides rules for form handling and file upload protection to prevent malicious data from entering your application.

Can I use this to manage environment secrets and secure my Laravel deployment?

Yes, you can manage environment secrets and secure your Laravel deployment using this Skill. It covers secrets management practices and production hardening configurations to protect credentials and environment settings from exposure.

Does this Skill cover rate limiting and encrypted attributes for Laravel APIs?

Yes, this Skill covers rate limiting and encrypted attributes for Laravel APIs. It enforces middleware protections for API routes and uses encrypted database attributes to secure sensitive data at rest within your application.