laravel-security

Implement Laravel security protocols for CSRF, XSS, and SQL injection mitigation.

1|Updated Apr 11, 2026
One-click install
npx skills add https://github.com/its-Basudeba/Care-HMS --skill laravel-security-its-basudeba
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel-security
Source: https://github.com/its-Basudeba/Care-HMS/tree/main/.agent/skills/laravel-security
Command: npx skills add https://github.com/its-Basudeba/Care-HMS --skill laravel-security-its-basudeba

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill addresses the complexity of securing web applications by providing a centralized, actionable framework for implementing Laravel-specific security best practices.

Core Features & Use Cases

  • Authentication & Authorization: Guidance on implementing Sanctum, policies, and gates to ensure robust access control.
  • Data Protection: Best practices for input validation, mass assignment protection, SQL injection prevention, and encrypted storage.
  • Use Case: When building a new user-facing feature, use this Skill to verify that your Form Requests are properly validated, your routes are protected by appropriate middleware, and your sensitive data is encrypted at rest.

Quick Start

Use the laravel-security skill to audit the current authentication and data validation implementation in the project.

Frequently Asked Questions about laravel-security

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

FAQPage Schema
How do I prevent SQL injection and XSS vulnerabilities in Laravel applications?

To prevent SQL injection and XSS in Laravel applications, implement comprehensive security protocols covering input validation, mass assignment protection, and secure session management across the entire request handling lifecycle.

What is the best way to implement authorization and access control in Laravel?

The best way to implement authorization in Laravel is by using Sanctum alongside policies and gates to ensure robust access control and enforce strict security permissions for user-facing features.

How do I configure secure session management and environment settings for production Laravel deployments?

Secure session management and environment configuration for production Laravel deployments require enforcing industry-standard security headers and robust data protection mechanisms to harden applications against modern threats.

How do I validate user input and encrypt sensitive data at rest in Laravel?

To validate user input and encrypt sensitive data at rest in Laravel, use Form Requests for proper validation and apply encrypted storage mechanisms to ensure data protection and mitigate mass assignment vulnerabilities.

Can I use this security framework to audit existing Laravel authentication implementations?

Yes, you can use this framework to audit current authentication and data validation implementations in your Laravel project, verifying that routes are protected by appropriate middleware and sensitive data is properly encrypted.