cloudg 0.3.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. cloudg/__init__.py +21 -0
  2. cloudg/api.py +613 -0
  3. cloudg/cli.py +934 -0
  4. cloudg/collectors/__init__.py +5 -0
  5. cloudg/collectors/aws.py +830 -0
  6. cloudg/collectors/azure.py +362 -0
  7. cloudg/collectors/base.py +44 -0
  8. cloudg/collectors/gcp.py +170 -0
  9. cloudg/collectors/multi.py +329 -0
  10. cloudg/config.py +261 -0
  11. cloudg/coverage.py +93 -0
  12. cloudg/credentials.py +451 -0
  13. cloudg/graph/__init__.py +6 -0
  14. cloudg/graph/builder.py +336 -0
  15. cloudg/graph/ontology.py +914 -0
  16. cloudg/graph/rag_export.py +533 -0
  17. cloudg/graph/reachability.py +237 -0
  18. cloudg/normaliser.py +390 -0
  19. cloudg/policies/custodian-aws-security.yml +139 -0
  20. cloudg/policies/custodian-azure.yml +95 -0
  21. cloudg/policies/custodian-gcp.yml +87 -0
  22. cloudg/policies/custodian.yml +131 -0
  23. cloudg/region_discovery.py +330 -0
  24. cloudg/registry.py +142 -0
  25. cloudg/renderers/__init__.py +1 -0
  26. cloudg/renderers/html_report.py +430 -0
  27. cloudg/renderers/json_export.py +65 -0
  28. cloudg/renderers/svg.py +689 -0
  29. cloudg/renderers/terraform_export.py +666 -0
  30. cloudg/retry.py +103 -0
  31. cloudg/rules/cis_aws_v3.yaml +148 -0
  32. cloudg/rules/cis_azure_v2.yaml +142 -0
  33. cloudg/rules/cis_gcp_v3.yaml +133 -0
  34. cloudg/rules/frameworks/aws_foundational_security_best_practices_aws.yaml +1286 -0
  35. cloudg/rules/frameworks/cis_5.0_aws.yaml +280 -0
  36. cloudg/rules/frameworks/cis_5.0_azure.yaml +475 -0
  37. cloudg/rules/frameworks/cis_5.0_gcp.yaml +327 -0
  38. cloudg/rules/frameworks/gdpr_aws.yaml +95 -0
  39. cloudg/rules/frameworks/hipaa_aws.yaml +461 -0
  40. cloudg/rules/frameworks/hipaa_azure.yaml +504 -0
  41. cloudg/rules/frameworks/hipaa_gcp.yaml +211 -0
  42. cloudg/rules/frameworks/iso27001_2022_aws.yaml +789 -0
  43. cloudg/rules/frameworks/iso27001_2022_azure.yaml +477 -0
  44. cloudg/rules/frameworks/iso27001_2022_gcp.yaml +240 -0
  45. cloudg/rules/frameworks/mitre_attack_aws.yaml +596 -0
  46. cloudg/rules/frameworks/mitre_attack_azure.yaml +418 -0
  47. cloudg/rules/frameworks/mitre_attack_gcp.yaml +300 -0
  48. cloudg/rules/frameworks/nist_800_53_revision_5_aws.yaml +3234 -0
  49. cloudg/rules/frameworks/nist_csf_2.0_aws.yaml +828 -0
  50. cloudg/rules/frameworks/pci_4.0_aws.yaml +7108 -0
  51. cloudg/rules/frameworks/pci_4.0_azure.yaml +4696 -0
  52. cloudg/rules/frameworks/pci_4.0_gcp.yaml +5405 -0
  53. cloudg/rules/frameworks/soc2_aws.yaml +421 -0
  54. cloudg/rules/frameworks/soc2_azure.yaml +477 -0
  55. cloudg/rules/frameworks/soc2_gcp.yaml +342 -0
  56. cloudg/rules/gdpr.yaml +56 -0
  57. cloudg/rules/hipaa_security_rule.yaml +83 -0
  58. cloudg/rules/iso_27001_2022.yaml +88 -0
  59. cloudg/rules/nist_800_53.yaml +134 -0
  60. cloudg/rules/pci_dss_v4.yaml +108 -0
  61. cloudg/rules/soc2_tsc.yaml +93 -0
  62. cloudg/scanners/__init__.py +1 -0
  63. cloudg/scanners/checkov.py +174 -0
  64. cloudg/scanners/iam_linter.py +200 -0
  65. cloudg/scanners/prowler.py +237 -0
  66. cloudg/scanners/scoutsuite.py +163 -0
  67. cloudg/scanners/trivy.py +339 -0
  68. cloudg/schema/__init__.py +25 -0
  69. cloudg/schema/models.py +260 -0
  70. cloudg/templates/report.html.j2 +828 -0
  71. cloudg-0.3.0.dist-info/METADATA +330 -0
  72. cloudg-0.3.0.dist-info/RECORD +75 -0
  73. cloudg-0.3.0.dist-info/WHEEL +4 -0
  74. cloudg-0.3.0.dist-info/entry_points.txt +14 -0
  75. cloudg-0.3.0.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1,280 @@
1
+ # Generated by scripts/import_prowler_compliance.py — do not edit by hand.
2
+ # Framework: CIS 5.0 (AWS)
3
+ # Data source: Prowler (https://github.com/prowler-cloud/prowler), Apache-2.0.
4
+ framework: CIS-AWS
5
+ version: '5.0'
6
+ source: Prowler compliance data (cis_5.0_aws.json), Apache-2.0, https://github.com/prowler-cloud/prowler
7
+ provider: aws
8
+ controls:
9
+ - id: '1.1'
10
+ title: Maintain current contact details
11
+ checks:
12
+ - account_maintain_current_contact_details
13
+ - id: '1.2'
14
+ title: Ensure security contact information is registered
15
+ checks:
16
+ - account_security_contact_information_is_registered
17
+ - id: '1.3'
18
+ title: Ensure no 'root' user account access key exists
19
+ checks:
20
+ - iam_no_root_access_key
21
+ - id: '1.4'
22
+ title: Ensure MFA is enabled for the 'root' user account
23
+ checks:
24
+ - iam_root_mfa_enabled
25
+ - id: '1.5'
26
+ title: Ensure hardware MFA is enabled for the 'root' user account
27
+ checks:
28
+ - iam_root_hardware_mfa_enabled
29
+ - id: '1.6'
30
+ title: Eliminate use of the 'root' user for administrative and daily tasks
31
+ checks:
32
+ - iam_avoid_root_usage
33
+ - id: '1.7'
34
+ title: Ensure IAM password policy requires minimum length of 14 or greater
35
+ checks:
36
+ - iam_password_policy_minimum_length_14
37
+ - id: '1.8'
38
+ title: Ensure IAM password policy prevents password reuse
39
+ checks:
40
+ - iam_password_policy_reuse_24
41
+ - id: '1.9'
42
+ title: Ensure multi-factor authentication (MFA) is enabled for all IAM users that
43
+ have a console password
44
+ checks:
45
+ - iam_user_mfa_enabled_console_access
46
+ - id: '1.10'
47
+ title: Do not create access keys during initial setup for IAM users with a console
48
+ password
49
+ checks:
50
+ - iam_user_no_setup_initial_access_key
51
+ - id: '1.11'
52
+ title: Ensure credentials unused for 45 days or more are disabled
53
+ checks:
54
+ - iam_user_accesskey_unused
55
+ - iam_user_console_access_unused
56
+ - id: '1.12'
57
+ title: Ensure there is only one active access key for any single IAM user
58
+ checks:
59
+ - iam_user_two_active_access_key
60
+ - id: '1.13'
61
+ title: Ensure access keys are rotated every 90 days or less
62
+ checks:
63
+ - iam_rotate_access_key_90_days
64
+ - id: '1.14'
65
+ title: Ensure IAM users receive permissions only through groups
66
+ checks:
67
+ - iam_policy_attached_only_to_group_or_roles
68
+ - id: '1.15'
69
+ title: Ensure IAM policies that allow full *:* administrative privileges are not
70
+ attached
71
+ checks:
72
+ - iam_aws_attached_policy_no_administrative_privileges
73
+ - iam_customer_attached_policy_no_administrative_privileges
74
+ - id: '1.16'
75
+ title: Ensure a support role has been created to manage incidents with AWS Support
76
+ checks:
77
+ - iam_support_role_created
78
+ - id: '1.17'
79
+ title: Ensure IAM instance roles are used for AWS resource access from instances
80
+ checks:
81
+ - ec2_instance_profile_attached
82
+ - id: '1.18'
83
+ title: Ensure that all expired SSL/TLS certificates stored in AWS IAM are removed
84
+ checks:
85
+ - iam_no_expired_server_certificates_stored
86
+ - id: '1.19'
87
+ title: Ensure that IAM External Access Analyzer is enabled for all regions
88
+ checks:
89
+ - accessanalyzer_enabled
90
+ - id: '1.20'
91
+ title: Ensure IAM users are managed centrally via identity federation or AWS Organizations
92
+ for multi-account environments
93
+ checks:
94
+ - iam_check_saml_providers_sts
95
+ - id: '1.21'
96
+ title: Ensure access to AWSCloudShellFullAccess is restricted
97
+ checks:
98
+ - iam_policy_cloudshell_admin_not_attached
99
+ - id: 2.1.1
100
+ title: Ensure S3 Bucket Policy is set to deny HTTP requests
101
+ checks:
102
+ - s3_bucket_secure_transport_policy
103
+ - id: 2.1.2
104
+ title: Ensure MFA Delete is enabled on S3 buckets
105
+ checks:
106
+ - s3_bucket_no_mfa_delete
107
+ - id: 2.1.3
108
+ title: Ensure all data in Amazon S3 has been discovered, classified, and secured
109
+ when necessary
110
+ checks:
111
+ - macie_is_enabled
112
+ - id: 2.1.4
113
+ title: Ensure that S3 is configured with 'Block Public Access' enabled
114
+ checks:
115
+ - s3_account_level_public_access_blocks
116
+ - s3_bucket_level_public_access_block
117
+ - id: 2.2.1
118
+ title: Ensure that encryption-at-rest is enabled for RDS instances
119
+ checks:
120
+ - rds_instance_storage_encrypted
121
+ - id: 2.2.2
122
+ title: Ensure the Auto Minor Version Upgrade feature is enabled for RDS instances
123
+ checks:
124
+ - rds_instance_minor_version_upgrade_enabled
125
+ - id: 2.2.3
126
+ title: Ensure that RDS instances are not publicly accessible
127
+ checks:
128
+ - rds_instance_no_public_access
129
+ - id: 2.2.4
130
+ title: Ensure Multi-AZ deployments are used for enhanced availability in Amazon
131
+ RDS
132
+ checks:
133
+ - rds_cluster_multi_az
134
+ - rds_instance_multi_az
135
+ - id: 2.3.1
136
+ title: Ensure that encryption is enabled for EFS file systems
137
+ checks:
138
+ - efs_encryption_at_rest_enabled
139
+ - id: '3.1'
140
+ title: Ensure CloudTrail is enabled in all regions
141
+ checks:
142
+ - cloudtrail_multi_region_enabled
143
+ - id: '3.2'
144
+ title: Ensure CloudTrail log file validation is enabled
145
+ checks:
146
+ - cloudtrail_log_file_validation_enabled
147
+ - id: '3.3'
148
+ title: Ensure AWS Config is enabled in all regions
149
+ checks:
150
+ - config_recorder_all_regions_enabled
151
+ - id: '3.4'
152
+ title: Ensure that server access logging is enabled on the CloudTrail S3 bucket
153
+ checks:
154
+ - cloudtrail_logs_s3_bucket_access_logging_enabled
155
+ - id: '3.5'
156
+ title: Ensure CloudTrail logs are encrypted at rest using KMS CMKs
157
+ checks:
158
+ - cloudtrail_kms_encryption_enabled
159
+ - id: '3.6'
160
+ title: Ensure rotation for customer-created symmetric CMKs is enabled
161
+ checks:
162
+ - kms_cmk_rotation_enabled
163
+ - id: '3.7'
164
+ title: Ensure VPC flow logging is enabled in all VPCs
165
+ checks:
166
+ - vpc_flow_logs_enabled
167
+ - id: '3.8'
168
+ title: Ensure that object-level logging for write events is enabled for S3 buckets
169
+ checks:
170
+ - cloudtrail_s3_dataevents_write_enabled
171
+ - id: '3.9'
172
+ title: Ensure that object-level logging for read events is enabled for S3 buckets
173
+ checks:
174
+ - cloudtrail_s3_dataevents_read_enabled
175
+ - id: '4.1'
176
+ title: Ensure unauthorized API calls are monitored
177
+ checks:
178
+ - cloudwatch_log_metric_filter_unauthorized_api_calls
179
+ - id: '4.2'
180
+ title: Ensure management console sign-in without MFA is monitored
181
+ checks:
182
+ - cloudwatch_log_metric_filter_sign_in_without_mfa
183
+ - id: '4.3'
184
+ title: Ensure usage of the 'root' account is monitored
185
+ checks:
186
+ - cloudwatch_log_metric_filter_root_usage
187
+ - id: '4.4'
188
+ title: Ensure IAM policy changes are monitored
189
+ checks:
190
+ - cloudwatch_log_metric_filter_policy_changes
191
+ - id: '4.5'
192
+ title: Ensure CloudTrail configuration changes are monitored
193
+ checks:
194
+ - cloudwatch_log_metric_filter_and_alarm_for_cloudtrail_configuration_changes_enabled
195
+ - id: '4.6'
196
+ title: Ensure AWS Management Console authentication failures are monitored
197
+ checks:
198
+ - cloudwatch_log_metric_filter_authentication_failures
199
+ - id: '4.7'
200
+ title: Ensure disabling or scheduled deletion of customer created CMKs is monitored
201
+ checks:
202
+ - cloudwatch_log_metric_filter_disable_or_scheduled_deletion_of_kms_cmk
203
+ - id: '4.8'
204
+ title: Ensure S3 bucket policy changes are monitored
205
+ checks:
206
+ - cloudwatch_log_metric_filter_for_s3_bucket_policy_changes
207
+ - id: '4.9'
208
+ title: Ensure AWS Config configuration changes are monitored
209
+ checks:
210
+ - cloudwatch_log_metric_filter_and_alarm_for_aws_config_configuration_changes_enabled
211
+ - id: '4.10'
212
+ title: Ensure security group changes are monitored
213
+ checks:
214
+ - cloudwatch_log_metric_filter_security_group_changes
215
+ - id: '4.11'
216
+ title: Ensure Network Access Control List (NACL) changes are monitored
217
+ checks:
218
+ - cloudwatch_changes_to_network_acls_alarm_configured
219
+ - id: '4.12'
220
+ title: Ensure changes to network gateways are monitored
221
+ checks:
222
+ - cloudwatch_changes_to_network_gateways_alarm_configured
223
+ - id: '4.13'
224
+ title: Ensure route table changes are monitored
225
+ checks:
226
+ - cloudwatch_changes_to_network_route_tables_alarm_configured
227
+ - id: '4.14'
228
+ title: Ensure VPC changes are monitored
229
+ checks:
230
+ - cloudwatch_changes_to_vpcs_alarm_configured
231
+ - id: '4.15'
232
+ title: Ensure AWS Organizations changes are monitored
233
+ checks:
234
+ - cloudwatch_log_metric_filter_aws_organizations_changes
235
+ - id: '4.16'
236
+ title: Ensure AWS Security Hub is enabled
237
+ checks:
238
+ - securityhub_enabled
239
+ - id: '5.2'
240
+ title: Ensure no Network ACLs allow ingress from 0.0.0.0/0 to remote server administration
241
+ ports
242
+ checks:
243
+ - ec2_networkacl_allow_ingress_any_port
244
+ - ec2_networkacl_allow_ingress_tcp_port_22
245
+ - ec2_networkacl_allow_ingress_tcp_port_3389
246
+ - id: '5.3'
247
+ title: Ensure no security groups allow ingress from 0.0.0.0/0 to remote server administration
248
+ ports
249
+ checks:
250
+ - ec2_securitygroup_allow_ingress_from_internet_to_all_ports
251
+ - ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_22
252
+ - ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_3389
253
+ - id: '5.4'
254
+ title: Ensure no security groups allow ingress from ::/0 to remote server administration
255
+ ports
256
+ checks:
257
+ - ec2_securitygroup_allow_ingress_from_internet_to_all_ports
258
+ - ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_22
259
+ - ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_3389
260
+ - id: '5.5'
261
+ title: Ensure the default security group of every VPC restricts all traffic
262
+ checks:
263
+ - ec2_securitygroup_default_restrict_traffic
264
+ - id: '5.6'
265
+ title: Ensure routing tables for VPC peering are least access
266
+ checks:
267
+ - vpc_peering_routing_tables_with_least_privilege
268
+ - id: '5.7'
269
+ title: Ensure that the EC2 Metadata Service only allows IMDSv2
270
+ checks:
271
+ - ec2_instance_imdsv2_enabled
272
+ - id: 5.1.1
273
+ title: Ensure EBS volume encryption is enabled in all regions
274
+ checks:
275
+ - ec2_ebs_volume_encryption
276
+ - id: 5.1.2
277
+ title: Ensure CIFS access is restricted to trusted networks to prevent unauthorized
278
+ access
279
+ checks:
280
+ - ec2_instance_port_cifs_exposed_to_internet