What problem does it solve?
This Skill prevents common security vulnerabilities in WordPress/Sage/Acorn projects by enforcing consistent input sanitization, output escaping, permission checks, and safe database and secret handling.
Core Features & Use Cases
- Input sanitization: Apply the appropriate sanitizers for text, emails, URLs, integers, filenames, and safe HTML before storing or processing data.
- Output escaping: Escape dynamic values in Blade templates by using the safe rendering patterns and contextual escaping helpers to reduce XSS risk.
- Request and authorization hardening: Verify nonces (where applicable) and enforce
current_user_can() capability checks for privileged actions.
- SQL injection prevention: Require
$wpdb->prepare() for raw $wpdb queries and avoid unsafe patterns like raw user input in DB::raw() or whereRaw() without bindings.
- CSRF and upload safety: Ensure Acorn/WordPress CSRF protections are active and validate uploaded files server-side using MIME checks.
- Secrets management: Keep secrets out of the codebase by storing them in
.env and accessing via env()/config().
Quick Start
Ask your AI assistant to review a feature’s controller/service and Blade output using the superpowers-sage:wp-security checklist, and to point out any missing nonce verification, capability checks, escaping gaps, unsafe $wpdb usage, insecure uploads, or hardcoded secrets.