mirror of
https://github.com/ghndrx/prowler.git
synced 2026-02-10 14:55:00 +00:00
feat(azure): add new check related with Public IPs in Shodan.io (#3433)
Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
This commit is contained in:
@@ -122,6 +122,7 @@ class Test_Parser:
|
||||
assert not parsed.sp_env_auth
|
||||
assert not parsed.browser_auth
|
||||
assert not parsed.managed_identity_auth
|
||||
assert not parsed.shodan
|
||||
|
||||
def test_default_parser_no_arguments_gcp(self):
|
||||
provider = "gcp"
|
||||
@@ -1052,6 +1053,20 @@ class Test_Parser:
|
||||
assert parsed.provider == "azure"
|
||||
assert parsed.az_cli_auth
|
||||
|
||||
def test_azure_parser_shodan_short(self):
|
||||
argument = "-N"
|
||||
shodan_api_key = str(uuid.uuid4())
|
||||
command = [prowler_command, "azure", argument, shodan_api_key]
|
||||
parsed = self.parser.parse(command)
|
||||
assert parsed.shodan == shodan_api_key
|
||||
|
||||
def test_azure_parser_shodan_long(self):
|
||||
argument = "--shodan"
|
||||
shodan_api_key = str(uuid.uuid4())
|
||||
command = [prowler_command, "azure", argument, shodan_api_key]
|
||||
parsed = self.parser.parse(command)
|
||||
assert parsed.shodan == shodan_api_key
|
||||
|
||||
def test_parser_azure_auth_managed_identity(self):
|
||||
argument = "--managed-identity-auth"
|
||||
command = [prowler_command, "azure", argument]
|
||||
|
||||
Reference in New Issue
Block a user