Skip to content

Commit

Permalink
fix(compliance): Add new fields to csv output for ENS compliance (#3718)
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrooot committed Apr 9, 2024
1 parent ffadb80 commit 19b4142
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion prowler/compliance/aws/ens_rd2022_aws.json
Original file line number Diff line number Diff line change
Expand Up @@ -1365,7 +1365,7 @@
"Checks": [
"iam_policy_allows_privilege_escalation",
"iam_customer_attached_policy_no_administrative_privileges",
"iam_customer_unattached_policy_no_administrative_privilege",
"iam_customer_unattached_policy_no_administrative_privileges",
"iam_no_custom_policy_permissive_role_assumption",
"iam_policy_attached_only_to_group_or_roles",
"iam_role_cross_service_confused_deputy_prevention",
Expand Down
2 changes: 2 additions & 0 deletions prowler/lib/check/compliance_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ class ENS_Requirement_Attribute(BaseModel):
Tipo: ENS_Requirement_Attribute_Tipos
Nivel: ENS_Requirement_Attribute_Nivel
Dimensiones: list[ENS_Requirement_Attribute_Dimensiones]
ModoEjecucion: str
Dependencias: list[str]


# Generic Compliance Requirement Attribute
Expand Down
4 changes: 4 additions & 0 deletions prowler/lib/outputs/compliance.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ def fill_compliance(output_options, finding, audit_info, file_descriptors):
Requirements_Attributes_Dimensiones=",".join(
attribute.Dimensiones
),
Requirements_Attributes_ModoEjecucion=attribute.ModoEjecucion,
Requirements_Attributes_Dependencias=",".join(
attribute.Dependencias
),
Status=finding.status,
StatusExtended=finding.status_extended,
ResourceId=finding.resource_id,
Expand Down
2 changes: 2 additions & 0 deletions prowler/lib/outputs/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,8 @@ class Check_Output_CSV_ENS_RD2022(BaseModel):
Requirements_Attributes_Nivel: str
Requirements_Attributes_Tipo: str
Requirements_Attributes_Dimensiones: str
Requirements_Attributes_ModoEjecucion: str
Requirements_Attributes_Dependencias: Optional[str]
Status: str
StatusExtended: str
ResourceId: str
Expand Down

0 comments on commit 19b4142

Please sign in to comment.