php-security-audit
Analyze a PHP web application or codebase for security vulnerabilities and OWASP compliance. Use when the user asks to audit, check, review, or analyze the security, vulnerabilities, OWASP compliance, or hardening of a PHP, Laravel, Kirby, Livewire, or Blade application. Also use when the user mentions "securite", "security", "OWASP", "injection SQL", "XSS", "CSRF", "faille", "vulnerabilite", "pentest", "hardening", "authentication", or "authorization". Specialized for PHP, Laravel, Kirby CMS, Livewire, Blade, Vite, Tailwind CSS, and SQL databases.
Best use case
php-security-audit is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Analyze a PHP web application or codebase for security vulnerabilities and OWASP compliance. Use when the user asks to audit, check, review, or analyze the security, vulnerabilities, OWASP compliance, or hardening of a PHP, Laravel, Kirby, Livewire, or Blade application. Also use when the user mentions "securite", "security", "OWASP", "injection SQL", "XSS", "CSRF", "faille", "vulnerabilite", "pentest", "hardening", "authentication", or "authorization". Specialized for PHP, Laravel, Kirby CMS, Livewire, Blade, Vite, Tailwind CSS, and SQL databases.
Teams using php-security-audit should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/php-security-audit/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How php-security-audit Compares
| Feature / Agent | php-security-audit | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Analyze a PHP web application or codebase for security vulnerabilities and OWASP compliance. Use when the user asks to audit, check, review, or analyze the security, vulnerabilities, OWASP compliance, or hardening of a PHP, Laravel, Kirby, Livewire, or Blade application. Also use when the user mentions "securite", "security", "OWASP", "injection SQL", "XSS", "CSRF", "faille", "vulnerabilite", "pentest", "hardening", "authentication", or "authorization". Specialized for PHP, Laravel, Kirby CMS, Livewire, Blade, Vite, Tailwind CSS, and SQL databases.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
SKILL.md Source
# PHP Security Review
Audit a PHP web application's security from the codebase, based on the OWASP Top 10 (2021) and PHP/Laravel-specific security best practices. Focuses on what is verifiable in code.
## How to Conduct the Audit
### 1. Explore the Codebase
Before auditing, understand the project:
- Identify the framework (Laravel, Kirby, vanilla PHP) and version
- Locate entry points: routes, controllers, API endpoints, middleware
- Find authentication and authorization logic (guards, policies, gates)
- Locate database queries (Eloquent, Query Builder, raw SQL)
- Check `.env` handling and configuration
- Find file upload logic
- Identify third-party packages (`composer.json`)
- Locate frontend build config (Vite, Tailwind, Livewire)
- Check for scheduled tasks, queue workers, artisan commands
### 2. Load the Checklist
Read `references/checklist.md` in this skill's directory for the full list of practices to check.
### 3. Analyze Each Category
For each category in the checklist, search the codebase for relevant patterns. Use Grep, Glob, and Read tools to find:
- Raw SQL queries without parameter binding (`DB::raw`, `whereRaw`, string concatenation in queries)
- Unescaped output in Blade templates (`{!! !!}` vs `{{ }}`)
- Missing CSRF protection on forms and state-changing routes
- Mass assignment vulnerabilities (missing `$fillable` or `$guarded`)
- Insecure deserialization (`unserialize()` on user input)
- Dangerous PHP functions (`eval`, `exec`, `system`, `shell_exec`, `passthru`)
- File upload without validation (type, size, extension)
- Hardcoded secrets, API keys, passwords in source code
- `.env` file exposure risks
- Missing rate limiting on authentication endpoints
- Insecure session configuration
- Missing security headers (CSP, X-Frame-Options, HSTS)
- Livewire: exposed properties, missing authorization on actions
- Kirby: panel access, content file permissions, API exposure
- Outdated dependencies with known CVEs
### 4. Generate the Report
Produce a structured report with these sections:
```
## Audit Securite PHP - [Project Name]
### Score global
X / Y pratiques conformes (Z%)
### Resume
[2-3 sentences summarizing the main findings]
### Resultats par categorie
#### [Category Name] (OWASP AXX)
| # | Pratique | Statut | Commentaire |
|---|----------|--------|-------------|
| 1 | ... | OK/KO/NA | ... |
### Vulnerabilites critiques
[List any findings that could be actively exploited]
### Top priorites
[5-10 most impactful fixes, ordered by risk/effort ratio]
### Recommandations detaillees
[For each KO finding, explain the vulnerability, exploitation scenario, fix, and relevant OWASP category]
```
**Status values:**
- **OK** - Practice is followed
- **KO** - Practice is not followed (include fix + OWASP reference)
- **NA** - Not applicable to this project
- **PARTIAL** - Partially followed (explain what's missing)
### 5. Prioritization
When listing recommendations, prioritize by exploitability:
1. **Critical** - Actively exploitable, data breach risk (SQL injection, auth bypass, RCE)
2. **High** - Exploitable with some effort (XSS stored, CSRF, IDOR, mass assignment)
3. **Medium** - Exploitable under specific conditions (information disclosure, missing headers)
4. **Low** - Defense-in-depth improvements (logging, rate limiting, dependency updates)
### 6. Export the Review Report
Once the audit is complete, save the full analysis as a Markdown document at the root of the audited codebase:
```
/docs/YYMMDD_php-security-audit.md
```
Where `YYMMDD` is the current date (e.g., `260206` for February 6, 2026). Create the `/docs/` directory if it does not exist.
The document must include:
1. The complete audit report (as generated in step 4)
2. An **action plan** section at the end, listing all tasks derived from the findings:
- Grouped by priority (Critical, High, Medium, Low)
- Each task broken down into sub-tasks of **2 to 4 hours** (assuming AI-assisted development)
- Time estimate for each sub-task
- Total estimated time per priority level
```
### Plan d'action
#### Critique
- [ ] [Tache] — ~Xh (avec IA)
- [ ] [Sous-tache 1] — ~2h
- [ ] [Sous-tache 2] — ~3h
#### Haute priorite
...
#### Moyenne priorite
...
#### Basse priorite
...
**Total estime : ~Xh**
```
## Important Notes
- This is a **static code audit**, not a penetration test. Recommend DAST/pentest for full coverage.
- Focus on what is verifiable in the codebase. Flag what needs runtime testing.
- Be specific: point to exact files, lines, and code patterns.
- For Laravel: leverage framework security features (Eloquent, Blade escaping, CSRF middleware, policies).
- For Kirby: check panel config, blueprint permissions, content API exposure.
- For Livewire: check exposed public properties, action authorization, file uploads.
- When a practice cannot be verified from code alone (e.g., WAF configuration), mark as "needs verification".Related Skills
security-auditor
Activates when user needs security review, vulnerability scanning, or secure coding guidance. Triggers on "security review", "find vulnerabilities", "is this secure", "check for injection", "security audit", "OWASP", "secure this code", or security-related questions.
security-audit
Comprehensive security auditing workflow covering web application testing, API security, penetration testing, vulnerability scanning, and security hardening.
security-audit-scanner
Automated security scanning for Vigil Guard v2.0.0. Use for OWASP Top 10 checks, TruffleHog secret detection, npm/pip vulnerability scanning, 3-branch service security, heuristics-service audit, and CI/CD security pipelines.
security-audit-example
Example security audit skill demonstrating how to audit code for security vulnerabilities. Use when the user asks to perform security reviews, check for vulnerabilities, or audit code security.
security-audit-agent
Performs comprehensive security audits of codebases, identifying vulnerabilities and security best practices
security-assessment
Execute threat modeling, vulnerability scanning, and security control validation. Use when relevant to the task.
security
Security Engineer and application security expert. Performs threat modeling, security architecture review, penetration testing, vulnerability assessment, and security compliance. Handles OWASP Top 10, authentication security, authorization, encryption, secrets management, HTTPS/TLS, CORS, CSRF, XSS, SQL injection prevention, secure coding practices, security audits, and compliance (GDPR, HIPAA, PCI-DSS, SOC 2). Activates for security, security review, threat model, vulnerability, penetration testing, pen test, OWASP, authentication security, authorization, encryption, secrets, HTTPS, TLS, SSL, CORS, CSRF, XSS, SQL injection, secure coding, security audit, compliance, GDPR, HIPAA, PCI-DSS, SOC 2, security architecture, secrets management, rate limiting, brute force protection, session security, token security, JWT security, is this secure, security check, review security, find vulnerabilities, security scan, security test, hack proof, prevent hacking, protect from attacks, DDoS protection, bot protection, WAF, web application firewall, input validation, sanitize input, escape output, parameterized queries, prepared statements, password hashing, bcrypt, argon2, salt, pepper, secure password, password policy, MFA, 2FA, two factor, multi factor, OAuth security, OIDC, OpenID Connect, SAML, SSO security, API key security, Bearer token, refresh token rotation, token expiration, session hijacking, session fixation, clickjacking, open redirect, SSRF, XXE, insecure deserialization, broken access control, security misconfiguration, sensitive data exposure, insufficient logging, dependency vulnerability, npm audit, snyk, dependabot, CVE, security patch, zero day, security incident, data breach, data leak, privacy, data protection, encryption at rest, encryption in transit, key management, KMS, HSM, certificate management, cert rotation, security headers, CSP, Content Security Policy, X-Frame-Options, X-XSS-Protection, HSTS, Strict-Transport-Security.
security-analysis
Security audit patterns including OWASP Top 10, secret scanning, and language-specific vulnerabilities.
reviewing-security
Executes security design and implementation reviews with threat modeling, OWASP-based checks, and risk-ranked remediation guidance. Activates when reviewing security, threat modeling, checking for vulnerabilities, auditing auth flows, performing OWASP reviews, or assessing security posture. Does not handle code quality or test coverage (code-reviewer), writing production code (backend-developer or frontend-developer), or infrastructure deployment (devops).
redis-security
Master Redis security - authentication, ACL, TLS encryption, network hardening, and production security best practices
QE Security Compliance
Security auditing, vulnerability scanning, and compliance validation for OWASP, SOC2, GDPR, and other standards.
program-security-basics
Baseline security checklist for Solana programs: authority checks, input validation, upgrade keys, unsafe patterns, and attack surfaces. Use for design reviews and pre-deploy audits.