laravel-security

Audit Laravel 11 and PHP 8.3 applications for security vulnerabilities.

Updated Jan 6, 2023
One-click install
npx skills add https://github.com/pekral/phpstan-rules --skill laravel-security-pekral
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel-security
Source: https://github.com/pekral/phpstan-rules/tree/main/.claude/skills/laravel-security
Command: npx skills add https://github.com/pekral/phpstan-rules --skill laravel-security-pekral

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the complexity of securing modern PHP applications by providing a centralized, copy-ready repository of secure defaults and audit workflows for Laravel 11 and PHP 8.3.

Core Features & Use Cases

  • Secure Configuration: Provides hardened settings for authentication, sessions, and production environments to prevent common vulnerabilities.
  • Security Audit Workflow: Includes a structured 7-area audit process to identify and remediate IDOR, XSS, and injection risks in existing codebases.
  • Use Case: Use this when setting up new authentication middleware or performing a security review of an existing Laravel project to ensure compliance with industry best practices.

Quick Start

Use the laravel-security skill to audit the current project for authorization vulnerabilities and suggest necessary policy implementations.

Frequently Asked Questions about laravel-security

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

FAQPage Schema
How do I audit my Laravel 11 application for authorization vulnerabilities?

You can audit a Laravel 11 application for authorization vulnerabilities by applying a structured 7-area workflow to identify and remediate IDOR, XSS, and injection risks. This enforces policy-based access control and strict typing compliance.

What are the best secure-by-default authentication settings for Laravel 11?

Secure-by-default authentication settings for Laravel 11 involve hardened configurations for middleware, sessions, and production environments. These defaults prevent common vulnerabilities by enforcing strict typing and policy-based access control out of the box.

How do I prevent IDOR and XSS vulnerabilities in PHP 8.3 applications?

Preventing IDOR and XSS vulnerabilities in PHP 8.3 applications requires implementing policy-based access control and Eloquent safety workflows. A structured security audit identifies these injection risks and applies secure-by-default building blocks for remediation.

Does this Laravel security workflow require specific PHP or framework versions?

This Laravel security workflow requires PHP 8.3 and Laravel 11, as the secure defaults and audit processes are built specifically for this environment. It mandates strict typing and automated dependency auditing within this stack.

How do I harden Eloquent queries to prevent injection risks in Laravel?

Harden Eloquent queries against injection risks by applying Eloquent safety workflows and secure-by-default building blocks. The structured audit process identifies potential injection vectors and enforces strict parameter binding and access policies.