Repository navigation
v0.7.31 — Guarded WP-CLI execution (#44)
Adds an opt-in (default-OFF) guarded WP-CLI runner, hardened across two adversarial security reviews.
Seven guards, each independently tested via an injectable executor (no test spawns a process): default-off (WPMCP_ALLOW_WP_CLI), production refusal (fails closed on unknown env), deny-by-default subcommand allowlist, no-OS-shell argv via proc_open array, no-PATH binary resolution, execution timeout with process-group kill, and full audit of every allowed/denied attempt.
Security note: the first review found a CRITICAL allowlist bypass (an allowlisted subcommand plus a wp-cli global flag such as --require/--exec/--ssh reached wp-cli and executed arbitrary PHP). Fixed before release with deny-by-default flag validation over the full token stream (only a narrow safe-flag allowlist like --format/--fields is permitted); the re-review confirmed the RCE is closed. option get / user list were removed from the safe defaults. Operators who widen the filterable flag allowlist can re-open this surface by design, so keep it narrow.
+91 tests since prior release (1548 total, 9 skipped). free/pro/lint green, safety core untouched.
Closes #44.