Php Audit Pipeline logo

Php Audit Pipeline

OrganizationPopular
wgpsec
php-audit-pipeline

PHP 白盒源码安全审计总方法论。当需要对 PHP 项目进行完整的源码安全审计、 或需要系统化的白盒漏洞挖掘流程时触发。 覆盖 5 阶段审计流水线: 路由映射→权限建模→数据流追踪→分类漏洞审计→利用链组装。 核心机制: 证据合约系统(EVID_*)防止 AI 幻觉误报,所有漏洞结论必须有数据流证据支撑。

Overview

Publisherwgpsec
RepositoryAboutSecurity
Skill namephp-audit-pipeline
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 Audit Pipeline 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-audit-pipeline .claude/skills/php-audit-pipeline
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Php Audit Pipeline 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 Audit Pipeline 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 Audit Pipeline 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 白盒审计总方法论

白盒审计在源码层面发现漏洞,关注"代码为什么不安全"。发现漏洞后的实际利用技术(构造 payload、绕过 WAF)属于黑盒 exploit skill 范畴。

深入参考


审计 5 阶段概览

阶段名称核心任务产出物
P1路由映射解析所有入口点及其参数路由清单
P2权限建模分析认证/授权,标记裸露路由权限矩阵
P3数据流追踪Source→Sink 完整路径追踪EVID_* 证据集
P4分类审计按 Sink 类型深入检查漏洞清单
P5报告组装评分 + 利用链编排审计报告

Phase 1: 路由映射与入口点识别

解析框架路由配置,建立完整的攻击面清单:

  • Laravel: routes/web.php + routes/api.php,关注 Route::any 和资源路由
  • ThinkPHP: config/route.php + 控制器自动路由(注意版本差异,TP5 默认开启自动路由)
  • 原生 PHP: 扫描所有可直接访问的 .php 文件,识别 $_GET/$_POST/$_REQUEST 入口

产出: 路由清单,每条记录包含路径、Handler 方法、接受参数、是否需认证。

Phase 2: 权限建模与认证审查

分析中间件/拦截器的挂载范围,找出哪些路由缺少认证保护:

  • 未认证即可访问的路由标记为高优先级审计目标
  • 审查全局过滤器(如 addslashes、自定义 WAF 类)的实际覆盖范围和绕过可能
  • 检查 Session 配置、CSRF token 机制、密码存储方式

Phase 3: 数据流追踪(Source → Sink)

这是白盒审计的核心阶段。每条潜在漏洞路径都要产出 EVID_* 证据点(详见 evidence-contract.md)。

三层分析法:

  1. — 全局关键字扫描: 搜索 Sink 函数(参考 sink-reference.md),快速定位危险代码区域
  2. 线 — 逐行追踪变量流: 从 Sink 反向追溯到 Source,记录每一步的变量传递和过滤操作
  3. — 验证利用条件: 确认过滤是否可绕过、参数是否可控、执行路径是否可达

当无法追踪到完整的 Source→Sink 路径时,只能标注为"待验证"。缺少任何一个环节的证据都不能标"已确认"。

Phase 4: 分类漏洞审计

按 Sink 类型分派到对应子 skill 进行深入审计:

  • 注入类(SQL/CMD/LDAP/表达式)
  • 文件类(读取/包含/上传/写入/归档)
  • 前端类(XSS/CSRF/重定向/CRLF)
  • 序列化类(反序列化/XXE)
  • 认证配置类(越权/弱加密/信息泄露)
  • 框架特定漏洞(已知 CVE、框架配置缺陷)

Phase 5: 报告与利用链组装

严重度评分: Score = R * 0.40 + I * 0.35 + C * 0.25(R=可达性, I=影响范围, C=利用复杂度,各 0-3 分)

将同一目标上的多个漏洞组合为利用链(如: 信息泄露→认证绕过→文件写入→RCE)。

审计质量检查清单

  • 所有公开路由均已纳入路由清单
  • 未认证路由已全部标记并优先审计
  • 每个"已确认"漏洞都有完整的 EVID_* 证据链
  • 全局过滤器的绕过可能性已评估
  • 框架版本已确认,已知 CVE 已交叉比对
  • 漏洞评分使用了统一公式,等级划分一致
  • 利用链可行性已在源码层面验证

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 Audit Pipeline AI skill do?

PHP 白盒源码安全审计总方法论。当需要对 PHP 项目进行完整的源码安全审计、 或需要系统化的白盒漏洞挖掘流程时触发。 覆盖 5 阶段审计流水线: 路由映射→权限建模→数据流追踪→分类漏洞审计→利用链组装。 核心机制: 证据合约系统(EVID_*)防止 AI 幻觉误报,所有漏洞结论必须有数据流证据支撑。

Why use Php Audit Pipeline on TypingMind?

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

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/wgpsec/AboutSecurity/tree/master/skills/code-audit/php/php-audit-pipeline. 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 Audit Pipeline?

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 Audit Pipeline?

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

Is the Php Audit Pipeline 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 👇