php-framework-audit

Audit PHP framework codebases for framework-specific security flaws and misconfigurations.

1.7k|238|Updated Dec 7, 2019
One-click install
npx skills add https://github.com/wgpsec/AboutSecurity --skill php-framework-audit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: php-framework-audit
Source: https://github.com/wgpsec/AboutSecurity/tree/main/skills/code-audit/php/php-framework-audit
Command: npx skills add https://github.com/wgpsec/AboutSecurity --skill php-framework-audit

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

When performing white-box security audits of PHP applications, generic vulnerability checklists miss framework-specific risks such as Laravel Mass Assignment, ThinkPHP historical RCE chains, or WordPress nonce validation gaps. This Skill provides targeted audit checklists and patterns for six major PHP frameworks.

Core Features & Use Cases

  • Framework Identification: A decision table maps composer.json dependencies and directory markers (e.g., wp-content/) to the correct framework audit path.
  • Framework-Specific Checklists: Covers Laravel (Mass Assignment, Blade XSS, CSRF exceptions, Eloquent raw injection), ThinkPHP (historical RCE, route injection, cache file writing), WordPress (plugin hooks, $wpdb->prepare, nonce verification, REST API permission_callback), plus Symfony, Yii2, and CodeIgniter overviews.
  • Deep Reference Guides: Detailed audit patterns for Laravel, ThinkPHP, and WordPress including dangerous code patterns, safe/unsafe comparisons, and step-by-step audit procedures.
  • Use Case: During a code audit you discover composer.json requires topthink/framework. The Skill directs you to check version-specific RCE patterns, where-condition injection, cache file write primitives, and template engine injection points.

Quick Start

Identify the PHP framework used by the target application from composer.json or directory structure, then follow the corresponding audit checklist and reference patterns to inspect the codebase for framework-specific vulnerabilities.

Frequently Asked Questions about php-framework-audit

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

FAQPage Schema
How do I audit a Laravel application for security vulnerabilities?

Laravel security audits focus on Mass Assignment via $fillable/$guarded misconfiguration, Blade XSS through unescaped {!! !!} output, CSRF exceptions in VerifyCsrfToken, Eloquent raw query injection in whereRaw/DB::raw, missing Gate/Policy authorization, and APP_DEBUG or .env exposure in production.

How to find ThinkPHP RCE vulnerabilities in source code?

First confirm the framework version from composer.lock or the VERSION constant. TP5.0.x is vulnerable to _method override chains, TP5.1.x to unfiltered controller invocation, and Request class property overwrite can turn the filter attribute into an arbitrary callback. Also check url_route_must and cache file write paths.

What are common WordPress plugin security issues to check?

WordPress plugin audits focus on wp_ajax_nopriv_ hooks exposing unauthenticated actions, missing $wpdb->prepare in SQL queries, absent wp_verify_nonce or check_ajax_referer calls, REST routes with permission_callback set to __return_true, and custom upload handlers bypassing wp_handle_upload MIME checks.

How do I identify which PHP framework an application uses?

Check composer.json for framework packages: laravel/framework for Laravel, topthink/framework for ThinkPHP, symfony/framework-bundle for Symfony, yiisoft/yii2 for Yii2, and codeigniter4/framework for CodeIgniter. WordPress is identified by the wp-content directory or wp-config.php file.

Does this audit approach cover Symfony, Yii2, and CodeIgniter in depth?

Symfony, Yii2, and CodeIgniter are covered with brief overviews of key risks such as Symfony debug mode and YAML deserialization, Yii2 RBAC and ActiveRecord injection, and CodeIgniter XSS filtering and CSRF token issues. Deep-dive reference guides exist only for Laravel, ThinkPHP, and WordPress.