php-file-write-audit
CommunityDetect and validate PHP file-write vulnerabilities
Software Engineering#php#web-security#code-review#security-audit#path-traversal#file-write#sink-analysis
Author0xShe
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This skill analyzes PHP project source code to identify and validate arbitrary file write vulnerabilities by tracing user-controlled data from input to sink, validating path traversal to final write targets, and assessing whether newly written content could be executed.
Core Features & Use Cases
- Write sink detection: identify writes to disk via functions like file_put_contents, fwrite, stream_write, fopen in write or append modes, and rename/copy-based write paths.
- Path traversal and normalization checks: evaluate how base directories are constructed, detect traversal patterns, and verify final resolved path remains within allowed base.
- Content origin tracing: map input sources (GET/POST/COOKIE/Upload) to their use in write operations to assess exploitability.
- Execution feasibility assessment: determine if the write destination is within web-accessible or executable directories and whether execution is possible.
- Use Case: Audit a PHP web application to catch unconstrained user writes that could lead to remote file inclusion or code execution.
Quick Start
Run the audit against your PHP codebase to trace user data through write sinks to potential targets and report on executable risk.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: php-file-write-audit Download link: https://github.com/0xShe/PHP-Code-Audit-Skill/archive/main.zip#php-file-write-audit Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.