mirror of
https://github.com/prowler-cloud/prowler.git
synced 2025-12-19 05:17:47 +00:00
allow --list-checks without authentication
This commit is contained in:
@@ -1,6 +1,3 @@
|
||||
from os import environ
|
||||
|
||||
|
||||
def init_parser(self):
|
||||
"""Init the Cloudflare provider CLI parser."""
|
||||
cloudflare_parser = self.subparsers.add_parser(
|
||||
@@ -17,18 +14,3 @@ def init_parser(self):
|
||||
metavar="ZONE",
|
||||
help="Filter scan to specific Cloudflare zones (name or ID).",
|
||||
)
|
||||
|
||||
|
||||
def validate_arguments(arguments) -> tuple[bool, str]:
|
||||
"""Validate Cloudflare provider arguments."""
|
||||
token = environ.get("CLOUDFLARE_API_TOKEN", "")
|
||||
api_key = environ.get("CLOUDFLARE_API_KEY", "")
|
||||
api_email = environ.get("CLOUDFLARE_API_EMAIL", "")
|
||||
|
||||
if not token and not (api_key and api_email):
|
||||
return (
|
||||
False,
|
||||
"Cloudflare provider requires CLOUDFLARE_API_TOKEN or the combination of CLOUDFLARE_API_KEY and CLOUDFLARE_API_EMAIL environment variables.",
|
||||
)
|
||||
|
||||
return (True, "")
|
||||
|
||||
Reference in New Issue
Block a user