| S01 |
All external input must be validated and sanitized according to its expected data type and context. All dynamic output must be escaped according to its output context. |
P0 |
Prevent injection attacks and XSS through proper input validation/sanitization and output escaping |
Security audit, penetration testing |
| S02 |
State-changing authenticated requests must use appropriate WordPress CSRF protection, including nonce verification where applicable. |
P0 |
Prevent Cross-Site Request Forgery on admin forms, AJAX, and REST endpoints |
Code review, security scan |
| S03 |
All API keys and other sensitive credentials shall be protected before persistent storage and must never be exposed to unauthorized users. |
P0 |
Credentials must be stored using an approved secure storage mechanism. Encryption at rest shall use an authenticated encryption method with encryption keys kept separately from the encrypted data. |
Code review, database inspection, security audit |
| S04 |
All custom database queries must use $wpdb->prepare() to prevent SQL injection attacks. Prefer WordPress data APIs where practical; use direct $wpdb queries only where necessary. |
P0 |
100% of custom queries use prepared statements |
Code review, static analysis |
| S05 |
Sensitive information (e.g., API keys, user credentials) must not be exposed to the frontend. No sensitive data in HTML, JavaScript, CSS, browser storage, logs, URLs, REST responses, or client-visible configuration. |
P0 |
No sensitive data exposed to clients |
Code review, security audit |
| S06 |
The plugin must implement capability checks for all admin functions using current_user_can(). |
P0 |
All admin actions verify user capabilities |
Code review, access testing |
| S07 |
The system must enforce HTTPS for all external API communications. |
P0 |
100% of API calls use HTTPS protocol |
Network traffic analysis |
| S08 |
CMD Pro REST endpoints shall implement appropriate rate limiting to prevent abuse. The system shall also implement outbound API usage controls to prevent excessive external commodity-data provider calls. |
P1 |
API endpoints have rate limits per IP/user; outbound API calls respect provider limits |
Load testing, security testing |
| S09 |
The system must log all security-relevant events (login attempts, permission changes, API key changes). Security logs must never contain plaintext API keys, passwords, authentication tokens, full session identifiers, or other secrets. |
P1 |
Security events logged to wp_cmdp_logs table with appropriate retention policy |
Audit log review, security audit |
| S10 |
The system must implement secure session management using WordPress native session handling. |
P0 |
No custom session handling |
Code review |
| S11 |
The system shall use WordPress core security, authentication, authorization, nonce, HTTP, database, and escaping APIs wherever applicable rather than implementing custom equivalents. |
P0 |
WordPress security functions used throughout |
Code review |
| S12 |
The system must not disclose sensitive system information in error messages. |
P0 |
Error messages sanitized; no stack traces displayed |
Error handling review |
| S13 |
All CMD Pro file operations must respect WordPress filesystem APIs, configured filesystem permissions, and authorization controls. |
P1 |
File operations verify permissions and use WordPress filesystem APIs |
Code review, security audit |
| S14 |
The system must use WordPress’ built-in user authentication and not implement custom authentication mechanisms. |
P0 |
Uses WordPress user system exclusively |
Code review |
| S15 |
CMD Pro shall be compatible with recommended security headers and shall not weaken existing site security policies. Plugin-controlled responses shall apply appropriate headers where applicable. |
P2 |
Security headers compatible; no weakening of site security policies |
Security header scan, compatibility testing |
| S16 |
CMD Pro shall remain compatible with WordPress 2FA/MFA solutions and must not bypass or weaken site-level MFA controls. |
P2 |
Compatibility with existing site authentication controls |
Compatibility testing, security review |
| S17 |
The system must conduct a security audit before each major release. |
P0 |
Security audit completed before release |
Audit report |
| S18 |
Exported data must be validated, safely encoded for the target format, and protected against spreadsheet formula injection where applicable. |
P1 |
Sanitization and safe encoding applied to all exports |
Code review, data validation, security testing |
| S19 |
CMD Pro endpoints shall implement appropriate abuse protection and must remain compatible with site-level login brute-force protection. |
P1 |
API abuse protection implemented; site-level login protection respected |
Security testing, compatibility testing |
| S20 |
CMD Pro shall respect WordPress authentication/session expiration and shall not implement insecure parallel session mechanisms. |
P1 |
Sessions expire according to WordPress configuration |
User session testing, code review |