Skip to content

Commit fbda66c

Browse files
pedroootjfagoagas
andauthored
feat(compliance): add name for each compliance (#7920)
Co-authored-by: Pepe Fagoaga <pepe@prowler.com>
1 parent 2200e65 commit fbda66c

131 files changed

Lines changed: 404 additions & 68 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

api/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ All notable changes to the **Prowler API** are documented in this file.
66

77
### Added
88
- Default JWT keys are generated and stored if they are missing from configuration [(#8655)](https://github.com/prowler-cloud/prowler/pull/8655)
9+
- `compliance_name` for each compliance [(#7920)](https://github.com/prowler-cloud/prowler/pull/7920)
910

1011
### Changed
1112
- Now the MANAGE_ACCOUNT permission is required to modify or read user permissions instead of MANAGE_USERS [(#8281)](https://github.com/prowler-cloud/prowler/pull/8281)

api/src/backend/api/compliance.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ def generate_compliance_overview_template(prowler_compliance: dict):
225225
# Build compliance dictionary
226226
compliance_dict = {
227227
"framework": compliance_data.Framework,
228+
"name": compliance_data.Name,
228229
"version": compliance_data.Version,
229230
"provider": provider_type,
230231
"description": compliance_data.Description,

api/src/backend/api/specs/v1.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ paths:
182182
type: string
183183
enum:
184184
- id
185+
- compliance_name
185186
- framework_description
186187
- name
187188
- framework
@@ -8739,6 +8740,8 @@ components:
87398740
properties:
87408741
id:
87418742
type: string
8743+
compliance_name:
8744+
type: string
87428745
framework_description:
87438746
type: string
87448747
name:
@@ -8752,6 +8755,7 @@ components:
87528755
attributes: {}
87538756
required:
87548757
- id
8758+
- compliance_name
87558759
- framework_description
87568760
- name
87578761
- framework

api/src/backend/api/tests/test_compliance.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ def test_generate_compliance_overview_template(self, mock_provider_choices):
239239
Framework="Framework 1",
240240
Version="1.0",
241241
Description="Description of compliance1",
242+
Name="Compliance 1",
242243
)
243244
prowler_compliance = {"aws": {"compliance1": compliance1}}
244245

@@ -248,6 +249,7 @@ def test_generate_compliance_overview_template(self, mock_provider_choices):
248249
"aws": {
249250
"compliance1": {
250251
"framework": "Framework 1",
252+
"name": "Compliance 1",
251253
"version": "1.0",
252254
"provider": "aws",
253255
"description": "Description of compliance1",

api/src/backend/api/v1/serializers.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1959,6 +1959,7 @@ class JSONAPIMeta:
19591959

19601960
class ComplianceOverviewAttributesSerializer(serializers.Serializer):
19611961
id = serializers.CharField()
1962+
compliance_name = serializers.CharField()
19621963
framework_description = serializers.CharField()
19631964
name = serializers.CharField()
19641965
framework = serializers.CharField()

api/src/backend/api/v1/views.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3545,6 +3545,7 @@ def attributes(self, request):
35453545
),
35463546
"name": requirement.get("name", ""),
35473547
"framework": compliance_framework.get("framework", ""),
3548+
"compliance_name": compliance_framework.get("name", ""),
35483549
"version": compliance_framework.get("version", ""),
35493550
"description": requirement.get("description", ""),
35503551
"attributes": base_attributes,

prowler/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ All notable changes to the **Prowler SDK** are documented in this file.
77
### Added
88
- Support for AdditionalURLs in outputs [(#8651)](https://github.com/prowler-cloud/prowler/pull/8651)
99
- Support for markdown metadata fields in Dashboard [(#8667)](https://github.com/prowler-cloud/prowler/pull/8667)
10+
- Add explicit "name" field for each compliance framework and include "FRAMEWORK" and "NAME" in CSV output [(#7920)](https://github.com/prowler-cloud/prowler/pull/7920)
1011

1112
### Changed
1213
- Update AWS Neptune service metadata to new format [(#8494)](https://github.com/prowler-cloud/prowler/pull/8494)

prowler/compliance/aws/aws_account_security_onboarding_aws.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"Framework": "AWS-Account-Security-Onboarding",
3+
"Name": "AWS Account Security Onboarding",
34
"Version": "",
45
"Provider": "AWS",
56
"Description": "Checklist when onboarding new AWS Accounts to existing AWS Organization.",

prowler/compliance/aws/aws_audit_manager_control_tower_guardrails_aws.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"Framework": "AWS-Audit-Manager-Control-Tower-Guardrails",
3+
"Name": "AWS Audit Manager Control Tower Guardrails",
34
"Version": "",
45
"Provider": "AWS",
56
"Description": "AWS Control Tower is a management and governance service that you can use to navigate through the setup process and governance requirements that are involved in creating a multi-account AWS environment.",

prowler/compliance/aws/aws_foundational_security_best_practices_aws.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"Framework": "AWS-Foundational-Security-Best-Practices",
3+
"Name": "AWS Foundational Security Best Practices",
34
"Version": "",
45
"Provider": "AWS",
56
"Description": "The AWS Foundational Security Best Practices standard is a set of controls that detect when your deployed accounts and resources deviate from security best practices.",
@@ -4730,4 +4731,4 @@
47304731
]
47314732
}
47324733
]
4733-
}
4734+
}

0 commit comments

Comments
 (0)