mirror of
https://github.com/ghndrx/prowler.git
synced 2026-02-10 23:05:05 +00:00
chore(secrets): Improve the status_extended with more information (#1937)
Co-authored-by: Sergio Garcia <sergargar1@gmail.com>
This commit is contained in:
@@ -76,7 +76,7 @@ class Test_awslambda_function_no_secrets_in_code:
|
||||
assert result[0].status == "FAIL"
|
||||
assert (
|
||||
result[0].status_extended
|
||||
== f"Potential secret found in Lambda function {function_name} code"
|
||||
== f"Potential secret found in Lambda function {function_name} code -> lambda_function.py: Secret Keyword on line 3"
|
||||
)
|
||||
|
||||
def test_function_code_without_secrets(self):
|
||||
|
||||
@@ -102,7 +102,7 @@ class Test_awslambda_function_no_secrets_in_variables:
|
||||
assert result[0].status == "FAIL"
|
||||
assert (
|
||||
result[0].status_extended
|
||||
== f"Potential secret found in Lambda function {function_name} variables"
|
||||
== f"Potential secret found in Lambda function {function_name} variables -> Secret Keyword in variable db_password"
|
||||
)
|
||||
|
||||
def test_function_no_secrets_in_variables(self):
|
||||
|
||||
@@ -102,7 +102,7 @@ class Test_ecs_task_definitions_no_environment_secrets:
|
||||
assert result[0].status == "FAIL"
|
||||
assert (
|
||||
result[0].status_extended
|
||||
== f"Potential secret found in variables of ECS task definition {task_name} with revision {task_revision}"
|
||||
== f"Potential secret found in variables of ECS task definition {task_name} with revision {task_revision} -> Secret Keyword on line 2"
|
||||
)
|
||||
assert result[0].resource_id == f"{task_name}:1"
|
||||
assert (
|
||||
|
||||
@@ -59,7 +59,7 @@ class Test_ssm_documents_secrets:
|
||||
assert result[0].status == "FAIL"
|
||||
assert (
|
||||
result[0].status_extended
|
||||
== f"Potential secret found in SSM Document {document_name}"
|
||||
== f"Potential secret found in SSM Document {document_name} -> Secret Keyword on line 2"
|
||||
)
|
||||
|
||||
def test_document_no_secrets(self):
|
||||
|
||||
Reference in New Issue
Block a user