Documentation → Developer Resources
Security Considerations
How Developer Sitemap protects your site and data.
Security Principles
Developer Sitemap follows WordPress security best practices:
- Principle of Least Privilege — Only administrators can access settings
- Defense in Depth — Multiple layers of input validation
- Fail Secure — Errors default to safe behavior
- Data Minimization — Only stores essential configuration
Access Control
Capability Requirements
| Action | Required Capability |
|---|---|
| View admin pages | manage_options |
| Modify settings | manage_options |
| Regenerate sitemap | manage_options |
| View sitemap publicly | None (public access) |
Nonce Verification
All form submissions verify WordPress nonces to prevent CSRF attacks:
// Nonces are verified on every form submission
if (!wp_verify_nonce($_POST['_wpnonce'], 'developer_sitemap_settings')) {
wp_die('Security check failed');
}
Input Validation
All user input is validated and sanitized:
| Input Type | Validation Method |
|---|---|
| Checkbox values | sanitize_text_field(), cast to boolean |
| Priority values | Float validation, clamped to 0.0-1.0 |
| Cache duration | Integer validation, min/max bounds |
| Post IDs | absint(), existence verification |
| Arrays | array_map() with appropriate sanitizer |
Output Escaping
All output is escaped to prevent XSS attacks:
| Context | Escaping Function |
|---|---|
| HTML output | esc_html() |
| HTML attributes | esc_attr() |
| URLs | esc_url() |
| JavaScript | esc_js(), wp_json_encode() |
| XML content | Custom XML escaping for sitemap protocol |
Data Storage
What Is Stored
| Data | Location | Purpose |
|---|---|---|
| Settings | wp_options | Configuration storage |
| Cache | Transients | Performance optimization |
What Is NOT Stored
- User credentials
- Personal information
- External service tokens
- Tracking or analytics data
Sitemap Security
Public vs. Private Content
The sitemap only includes publicly accessible content:
| Content Type | Included? |
|---|---|
| Published posts/pages | Yes |
| Draft content | No |
| Private posts | No |
| Password-protected posts | No |
| Hidden products | No |
XML Injection Prevention
All sitemap content is escaped to prevent XML injection:
- URLs are validated and encoded
- Special characters are escaped
- Invalid XML characters are removed
Uninstall Cleanup
When uninstalled, the plugin removes all data:
- All plugin options from
wp_options - All cached transients
- No orphaned data remains
Reporting Vulnerabilities
If you discover a security vulnerability, please report it responsibly:
- Do not disclose publicly until fixed
- Email security concerns to the plugin author
- Include detailed reproduction steps
- Allow reasonable time for response
