agentleFS
SnoozleStudioSnoozleStudio/opencode-wp-settings/skills/wp-security-audit/SKILL.md

wp-security-audit

Skill4 starsChanged 3 days agoMITView on GitHub

WordPress attack-surface security audit of a plugin, theme, or code change. Use when auditing for XSS, SQL injection, CSRF, privilege escalation, REST exposure, secret leaks, or before shipping security-sensitive changes. Produces proven findings with file:line, severity, and fixes - never fabricated. Not for general standards review (use review) or logic correctness proof (use verify).

  • Reads credentials

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before committing anything that touches input, output, or authorization

    line 13
  2. Distinctive:

    When a bug report smells like a security issue

    line 15
  3. Distinctive:

    After any REST endpoint or AJAX handler is written

    line 16
  4. Very specific:

    Run the canonical 4-step chain — build → format:all:check → phpcs → phpstan, in order, stopping at the first red (see …

    line 51

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

WordPress Security Audit

Delegates to the security-auditor agent. Load docs/wordpress-security.md first — it is the doctrine; this skill is the procedure.

When to run

  • Before committing anything that touches input, output, or authorization
  • As a full audit pass before releases
  • When a bug report smells like a security issue
  • After any REST endpoint or AJAX handler is written

Procedure

  1. Load docs/wordpress-security.md
  2. Spawn security-auditor with scope: files (diff list or paths) + the threat model (public-facing? admin? logged-in users? what data?)
  3. Triage findings: every finding must be CONFIRMED (data flow traced, file:line named, missing control identified) or explicitly PLAUSIBLE — no vibes
  4. For each confirmed finding, fix with the implementer under the escaping/sanitization matrix — never "fix" by weakening the finding
  5. Re-run the verification chain after fixes
  6. Report: findings table, what was fixed, what remains, and any secrets found

Severity guide

SeverityExample
CriticalSQLi with $wpdb interpolation; unauthenticated data exposure
HighStored XSS via unescaped output; CSRF on state change; missing capability on admin AJAX
MediumEscaped-at-store pattern; autoload bloat; missing wp_unslash
LowNonces without IDs in action strings; debug code left in

Anti-patterns to check (always)

  • esc_attr( $url ) instead of esc_url()
  • echo $_GET[...] without sanitize+escape chain
  • $wpdb->query( "SELECT ... $var ..." )
  • is_admin() used as an auth check
  • REST route with no permission_callback
  • update_option on every request instead of autoload:false + transients
  • API keys hardcoded or in options/i18n strings

Verification chain

Run the canonical 4-step chain — build → format:all:check → phpcs → phpstan, in order, stopping at the first red (see docs/verification-chain.md).

Secrets additionally: git log -p --all grep for key material, .env* in repo.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.