Php Framework Audit logo

Php Framework Audit

OrganizationPopular
wgpsec
php-framework-audit

PHP 框架特定安全审计。当在 PHP 白盒审计中已识别目标使用特定框架、 需要检查框架特有安全机制和常见配置缺陷时触发。 覆盖 6 大框架: Laravel(Mass Assignment/Blade XSS/CSRF 例外)、 ThinkPHP(RCE 历史漏洞/路由注入/缓存写入)、WordPress(插件漏洞/权限钩子/nonce 验证)、 Symfony(Debug Bar/YAML 解析/安全投票器)、Yii2(RBAC/ActiveRecord 注入)、CodeIgniter(全局 XSS/CSRF Token)。

Overview

Publisherwgpsec
RepositoryAboutSecurity
Skill namephp-framework-audit
Stars
1.7K
Forks
242
Bundled files
3
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 3 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by wgpsec on GitHub. Read the source before you install it.

Installation

Install the Php Framework Audit AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/wgpsec/AboutSecurity.git /tmp/AboutSecurity
mkdir -p .claude/skills
cp -r /tmp/AboutSecurity/skills/code-audit/php/php-framework-audit .claude/skills/php-framework-audit
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Php Framework Audit in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Php Framework Audit on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Php Framework Audit is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

PHP 框架特定安全审计

框架识别决策表

识别特征框架深入参考
composer.jsonlaravel/frameworkLaravelreferences/laravel-patterns.md
composer.jsontopthink/frameworkThinkPHPreferences/thinkphp-patterns.md
存在 wp-content/ 目录或 wp-config.phpWordPressreferences/wordpress-patterns.md
composer.jsonsymfony/framework-bundleSymfony本文简要覆盖
composer.jsonyiisoft/yii2Yii2本文简要覆盖
composer.jsoncodeigniter4/frameworkCodeIgniter本文简要覆盖

Laravel 核心检查点

  1. Mass Assignment -- $fillable / $guarded 是否正确配置,Model::create($request->all())update($request->all()) 是否存在未过滤字段
  2. Blade XSS -- 搜索 {!! !!} 未转义输出、@php 指令内直接 echo、自定义 Blade Directive 未调用 e()
  3. CSRF 例外 -- VerifyCsrfToken 中间件 $except 数组是否包含敏感路由,API 路由组默认不含 CSRF 中间件
  4. Gate / Policy -- 控制器方法是否调用 $this->authorize()Gate::allows(),Policy 定义是否覆盖所有 CRUD
  5. Eloquent Raw -- whereRaw / havingRaw / orderByRaw / DB::raw 中是否存在变量拼接
  6. 签名 URL / 调试 -- APP_DEBUG=true 残留、.env Web 可达、Telescope / Debugbar 路由暴露

ThinkPHP 核心检查点

  1. 历史 RCE 路由 -- TP5.x method() 覆盖、Request__construct 任意方法调用
  2. 缓存文件写入 -- 缓存文件路径可预测 + 内容可控 → 写入 WebShell
  3. 数据库 where 注入 -- where 数组条件中 exp / like / between 表达式注入、Db::raw
  4. Session 反序列化 -- TP6 session 序列化驱动可能触发 POP 链
  5. 模板注入 -- {php} 标签、变量函数 {:system()}

WordPress 核心检查点

  1. 插件 action/filter -- wp_ajax_nopriv_* 钩子暴露未认证操作、Shortcode 回调参数注入
  2. $wpdb->prepare 缺失 -- 直接拼接 SQL 到 $wpdb->query()
  3. nonce 验证 -- 表单处理 / AJAX handler 缺少 wp_verify_nonce / check_admin_referer
  4. REST API -- register_rest_routepermission_callback 是否为 __return_true 或缺失
  5. 文件上传 -- 插件自定义上传逻辑绕过 wp_handle_upload 的 MIME 检查

Symfony 简要概述

  • Debug 模式 -- APP_DEBUG=1 泄露 Profiler / Web Debug Toolbar,暴露环境变量和 SQL
  • YAML 反序列化 -- 低版本 Yaml::parse 支持 !!php/object 标签导致对象注入
  • Security Voter -- 自定义 Voter 逻辑缺陷或 ACCESS_ABSTAIN 误用导致越权

Yii2 简要概述

  • RBAC 配置 -- DbManager 权限项分配不当、checkAccess 调用缺失导致垂直越权
  • ActiveRecord 注入 -- findBySql / where 条件字符串拼接、orderBy 未过滤

CodeIgniter 简要概述

  • 全局 XSS 过滤 -- CI3 $config['global_xss_filtering'] 已弃用,CI4 需手动调用 esc()
  • CSRF Token -- 配置 CSRFProtection 但排除路由过多、Token 重生策略不当

深入参考

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Php Framework Audit AI skill do?

PHP 框架特定安全审计。当在 PHP 白盒审计中已识别目标使用特定框架、 需要检查框架特有安全机制和常见配置缺陷时触发。 覆盖 6 大框架: Laravel(Mass Assignment/Blade XSS/CSRF 例外)、 ThinkPHP(RCE 历史漏洞/路由注入/缓存写入)、WordPress(插件漏洞/权限钩子/nonce 验证)、 Symfony(Debug Bar/YAML 解析/安全投票器)、Yii2(RBAC/ActiveRecord 注入)、CodeIgniter(全局 XSS/CSRF Token)。

Why use Php Framework Audit on TypingMind?

Because you install it once and use it with any model. Php Framework Audit is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Php Framework Audit in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/wgpsec/AboutSecurity/tree/master/skills/code-audit/php/php-framework-audit. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Php Framework Audit?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Php Framework Audit?

As many as you like. As long as a model supports skills, you can use Php Framework Audit with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Php Framework Audit AI skill free?

It is published on GitHub by wgpsec. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇