feat(cloudflare): add Cloudflare provider with 13 security checks #9010
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds complete Cloudflare provider integration to Prowler with 13 comprehensive security checks covering SSL/TLS, DNS, and firewall configurations.
Changes
New Provider
Security Checks (13 total)
SSL/TLS Service (8 checks)
ssl_mode_full_strict- Ensure SSL/TLS mode is Full (strict) for end-to-end encryptionssl_tls_minimum_version- Ensure minimum TLS version is 1.2 or higherssl_tls_1_3_enabled- Ensure TLS 1.3 is enabled for enhanced securityssl_hsts_enabled- Ensure HSTS with recommended max-age (6 months minimum)ssl_hsts_include_subdomains- Ensure HSTS includes subdomains directivessl_always_use_https- Ensure Always Use HTTPS is enabledssl_automatic_https_rewrites_enabled- Ensure Automatic HTTPS Rewrites enabledssl_opportunistic_encryption_enabled- Ensure Opportunistic Encryption enabledFirewall Service (4 checks)
firewall_waf_enabled- Ensure Web Application Firewall (WAF) is enabledfirewall_security_level_medium_or_higher- Ensure Security Level is Medium or higherfirewall_browser_integrity_check_enabled- Ensure Browser Integrity Check is enabledfirewall_challenge_passage_configured- Ensure Challenge Passage is configured (1 hour recommended)DNS Service (1 check)
dns_dnssec_enabled- Ensure DNSSEC is enabled to prevent DNS spoofingCore Integration
CheckReportCloudflaremodel toprowler/lib/check/models.pyprowler/providers/common/provider.pyCloudflareOutputOptionstoprowler/__main__.pyprowler/lib/outputs/finding.pyprowler/lib/outputs/summary_table.pyUsage
Authentication
API Token (Recommended)
API Key + Email
Environment Variables
Scanning Options
Scan all zones
Scan specific zones
Run specific checks
List available checks
Test Results
Successfully tested with live Cloudflare account:
Sample output:
Implementation Details
Files Changed
Architecture
CloudflareServiceclass with API clientCheckbase classSecurity Considerations
Based on Cloudflare's recommended security settings guide:
Checklist
Related Issues
Closes: (if applicable)
Additional Notes
This implementation provides comprehensive CSPM capabilities for Cloudflare, enabling organizations to: