Php Wordpress Audit logo

Php Wordpress Audit

Community
0xShe
php-wordpress-audit

WordPress 框架特效安全审计工具。针对 WordPress 常见 nonce/capability/check_admin_referer、AJAX action、escape/sanitize、重定向、安全上传与远程请求等机制进行白盒静态审计,并映射到通用漏洞类型体系(AUTH/CSRF/XSS/SQL/CFG/SSRF 等)。

Overview

Publisher0xShe
RepositoryPHP-Code-Audit-Skill
Skill namephp-wordpress-audit
Stars
406
Forks
42
Bundled files
Instructions only
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.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

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

Installation

Install the Php Wordpress 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.
    https://github.com/0xShe/PHP-Code-Audit-Skill/tree/main/php-wordpress-audit
  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/0xShe/PHP-Code-Audit-Skill.git /tmp/PHP-Code-Audit-Skill
mkdir -p .claude/skills
cp -r /tmp/PHP-Code-Audit-Skill/php-wordpress-audit .claude/skills/php-wordpress-audit
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Php Wordpress 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 Wordpress 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 Wordpress 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 WordPress 框架安全审计(php-wordpress-audit)

分析 WordPress 项目中的框架特效安全机制,重点覆盖:

  • nonce 校验与 capability 权限检查(防止 CSRF 与越权)
  • WordPress AJAX 回调(admin-ajax.php 的 wp_ajax_* 与 wp_ajax_nopriv_*)
  • 输出 escaping 与模板注入风险(esc_html/esc_attr/esc_url/wp_kses 等)
  • $wpdb 查询参数化与直接拼接风险
  • 重定向(wp_redirect 与 wp_safe_redirect)
  • 上传处理(wp_handle_upload)与可执行文件风险
  • 远程 HTTP(wp_remote_get/wp_remote_post)与 SSRF 关联

输入

用户提供:

  • source_path:WordPress 代码目录根(含 wp-content/plugins 或主题目录) 可选:
  • output_path:输出目录路径(默认 {source_path}_audit)

输出目录

输出到:

{output_path}/framework_audit/
  wordpress_{timestamp}.md

框架识别(必做)

必须给出识别 WordPress 的证据点(不允许空口断言):

  • 目录特征:wp-content/、wp-admin/、wp-includes/
  • 核心文件:wp-config.php 或 wp-settings.php
  • 插件/主题目录:wp-content/plugins/、wp-content/themes/

风险类型映射(必做)

每条发现都必须写明:

  • 通用类型码:AUTH / CSRF / XSS / SQL / CFG / SSRF / UPLOAD 等
  • 映射原因:为什么 WordPress 风险落到该类型码

必审清单(必做:逐项检查并输出结果)

1) nonce 与 CSRF 防护(CSRF/AUTH)

必须定位并输出:

  • 表单输出 nonce:wp_nonce_field 或自定义 nonce 输出
  • 提交处校验:check_admin_referer、wp_verify_nonce 的位置
  • AJAX nonce 校验:check_ajax_referer(若存在)

判定规则:

  • 若 nonce 存在但校验缺失或仅做在部分分支输出,则输出 CSRF 或 AUTH 风险

2) capability 权限校验(AUTH)

必须定位并输出:

  • 所有敏感操作调用前:current_user_can、user_can、is_user_logged_in
  • capability 值是否被用户控制或过宽(例如只做 manage_options 缺失但仍执行高权限操作)

3) AJAX action 与路由暴露(AUTH/CSRF)

必须定位并输出:

  • add_action('wp_ajax_{action}', {value}) 与 add_action('wp_ajax_nopriv_{action}', {value})
  • 回调函数内部是否对能力与 nonce 做校验

4) 输出 escaping 与 XSS(XSS)

必须定位并输出:

  • 直接 echo/print 用户数据的点
  • 是否使用 esc_html、esc_attr、esc_url、wp_kses_post 等
  • 插件主题是否禁用了过滤或使用了 raw 输出

5) $wpdb 查询参数化(SQL)

必须定位并输出:

  • 正确路径:$wpdb->prepare 与 prepare 占位符使用
  • 危险路径:$wpdb->query、get_results、get_row 直接拼接 SQL 字符串

6) 重定向与跳转安全(REDIR/CFG)

必须定位并输出:

  • wp_redirect 与 wp_safe_redirect 使用情况
  • 目的地来源(通常为用户输入)与是否做 scheme/host 校验

7) 上传与远程请求(UPLOAD/SSRF)

必须定位并输出:

  • 上传:wp_handle_upload、media_handle_upload,以及文件类型/目录/访问控制是否安全
  • 远程请求:wp_remote_get/wp_remote_post,目的 URL 是否可控以及是否做 allowlist

可观测 PoC(必做:框架特效可观测验证框架)

至少给出以下两类之一并写清观察点:

  • CSRF:缺失 nonce 校验的 action,构造缺失或错误 nonce 请求,观察响应与状态变更
  • AUTH:缺失 capability 校验的 action,使用低权限用户请求敏感 action,观察是否成功

PoC 输出要求:

  • 必须包含 action 标识、真实请求入口(通常 admin-ajax.php 或相应表单提交路径)
  • 必须说明你要观察的结果(HTTP 状态码与业务侧效果)

输出完整性检查(强制)

  • 输出包含:nonce/capability/AJAX/XSS/SQL/REDIR/UPLOAD/SSRF 的检查结果
  • 每条风险都有:映射类型码 + 位置证据 + 可观测验证框架 + 修复建议

Frequently asked questions

What does the Php Wordpress Audit AI skill do?

WordPress 框架特效安全审计工具。针对 WordPress 常见 nonce/capability/check_admin_referer、AJAX action、escape/sanitize、重定向、安全上传与远程请求等机制进行白盒静态审计,并映射到通用漏洞类型体系(AUTH/CSRF/XSS/SQL/CFG/SSRF 等)。

Why use Php Wordpress Audit on TypingMind?

Because you install it once and use it with any model. Php Wordpress 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 Wordpress Audit in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/0xShe/PHP-Code-Audit-Skill/tree/main/php-wordpress-audit. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Php Wordpress 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 Wordpress Audit?

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

Is the Php Wordpress Audit AI skill free?

It is published on GitHub by 0xShe. 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 👇