php-laravel-audit

Analyze Laravel PHP source for security misconfigurations and risks.

386|38|Updated Mar 24, 2026
One-click install
npx skills add https://github.com/0xShe/PHP-Code-Audit-Skill --skill php-laravel-audit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: php-laravel-audit
Source: https://github.com/0xShe/PHP-Code-Audit-Skill/tree/main/php-laravel-audit
Command: npx skills add https://github.com/0xShe/PHP-Code-Audit-Skill --skill php-laravel-audit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Laravel 项目在权限、CSRF、会话管理、模型填充和 Blade 模板渲染等方面常见的实现缺陷与误配置导致的安全风险。该审计技能提供对源码中框架特性与踩坑模式的白盒静态分析,帮助团队识别并缓解这些风险。

Core Features & Use Cases

  • 鉴权与路由保护分析(middleware/auth/Policies/Gates)及权限模型的一致性校验
  • CSRF 与 token 保护的覆盖范围、except 列表及 API 认证差异评估
  • Session 与 Cookie 安全性检查(session_regenerate_id、cookie flags、SameSite 等配置)
  • Eloquent mass assignment 的输入到模型写入链路分析及填充策略审查
  • Blade 渲染中的 raw 输出风险与未转义数据的影响评估
  • Signed URL 与路由签名校验闭环性检查
  • 生成的证据与改进建议对照现有通用漏洞类型体系输出

Quick Start

指定 Laravel 项目根目录作为源路径,运行分析并输出结构化的风险报告到输出目录。

Frequently Asked Questions about php-laravel-audit

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

FAQPage Schema
How do I audit a Laravel project for mass assignment and CSRF vulnerabilities?

Auditing a Laravel project for mass assignment and CSRF vulnerabilities involves static analysis of Eloquent fillable attributes and CSRF token middleware. This process maps framework security mechanisms to identify misconfigurations and produce evidence-based risk findings.

What security risks exist in Laravel Blade rendering and session configurations?

Laravel Blade rendering and session configurations carry risks like unescaped raw output and insecure cookie flags. Analyzing these patterns reveals potential XSS exposures and session fixation points for structured risk reporting.

Can I check Laravel authentication middleware and Policies for consistency issues?

Yes, you can check Laravel authentication middleware and Policies for consistency. Static analysis evaluates middleware/auth, Gates, and Policies to verify that permission models align correctly and identify implementation flaws.

How does static analysis detect Laravel signed URL and route validation weaknesses?

Static analysis detects Laravel signed URL and route validation weaknesses by parsing PHP source to verify signature checks. It maps the closure of route protection to expose unsigned or tampered URL acceptance points.

Does this security audit cover API routes that bypass the CSRF except list?

Yes, the security audit covers API routes that bypass the CSRF except list. It evaluates token protection coverage, identifies except list entries, and assesses API authentication differences to map exposure boundaries.