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,240 @@
1
+ # Generated by scripts/import_prowler_compliance.py — do not edit by hand.
2
+ # Framework: ISO27001 2022 (GCP)
3
+ # Data source: Prowler (https://github.com/prowler-cloud/prowler), Apache-2.0.
4
+ framework: ISO27001-GCP
5
+ version: '2022'
6
+ source: Prowler compliance data (iso27001_2022_gcp.json), Apache-2.0, https://github.com/prowler-cloud/prowler
7
+ provider: gcp
8
+ controls:
9
+ - id: A.5.1
10
+ title: Information security policy and topic-specific policies should be defined,
11
+ approved by management, published, communicated to and acknowledged by relevant
12
+ personnel and relevant interested parties, and reviewed at planned intervals and
13
+ if significant changes occur.
14
+ checks:
15
+ - iam_cloud_asset_inventory_enabled
16
+ - id: A.5.3
17
+ title: Conflicting duties and conflicting areas of responsibility should be segregated.
18
+ checks:
19
+ - iam_no_service_roles_at_project_level
20
+ - iam_role_kms_enforce_separation_of_duties
21
+ - iam_role_sa_enforce_separation_of_duties
22
+ - id: A.5.5
23
+ title: The organisation should establish and maintain contact with relevant authorities.
24
+ checks:
25
+ - iam_organization_essential_contacts_configured
26
+ - id: A.5.6
27
+ title: The organisation should establish and maintain contact with special interest
28
+ groups or other specialist security forums and professional associations.
29
+ checks:
30
+ - iam_organization_essential_contacts_configured
31
+ - id: A.5.15
32
+ title: Rules to control physical and logical access to information and other associated
33
+ assets should be established
34
+ checks:
35
+ - iam_account_access_approval_enabled
36
+ - iam_no_service_roles_at_project_level
37
+ - iam_role_kms_enforce_separation_of_duties
38
+ - iam_role_sa_enforce_separation_of_duties
39
+ - iam_sa_no_administrative_privileges
40
+ - iam_sa_no_user_managed_keys
41
+ - id: A.5.16
42
+ title: The full lifecycle of identities should be managed.
43
+ checks:
44
+ - apikeys_key_rotated_in_90_days
45
+ - iam_sa_user_managed_key_rotate_90_days
46
+ - kms_key_rotation_enabled
47
+ - id: A.5.18
48
+ title: Access rights to information and other associated assets should be provisioned,
49
+ reviewed, modified and removed in accordance with the organisation’s topic-specific
50
+ policy on and rules for access control.
51
+ checks:
52
+ - iam_role_sa_enforce_separation_of_duties
53
+ - iam_sa_no_administrative_privileges
54
+ - id: A.5.19
55
+ title: Processes and procedures should be defined and implemented to manage the
56
+ information security risks associated with the use of supplier’s products or services.
57
+ checks:
58
+ - gemini_api_disabled
59
+ - iam_cloud_asset_inventory_enabled
60
+ - id: A.5.21
61
+ title: Processes and procedures should be defined and implemented to manage the
62
+ information security risks associated with the ICT products and services supply
63
+ chain.
64
+ checks:
65
+ - gemini_api_disabled
66
+ - iam_cloud_asset_inventory_enabled
67
+ - id: A.5.22
68
+ title: The organisation should regularly monitor, review, evaluate and manage change
69
+ in supplier information security practices and service delivery.
70
+ checks:
71
+ - gemini_api_disabled
72
+ - id: A.5.23
73
+ title: Processes for acquisition, use, management and exit from cloud services should
74
+ be established in accordance with the organisation’s information security requirements.
75
+ checks:
76
+ - gemini_api_disabled
77
+ - id: A.5.25
78
+ title: The organisation should assess information security events and decide if
79
+ they are to be categorised as information security incidents.
80
+ checks:
81
+ - iam_cloud_asset_inventory_enabled
82
+ - id: A.5.28
83
+ title: The organisation should establish and implement procedures for the identification,
84
+ collection, acquisition and preservation of evidence related to information security
85
+ events.
86
+ checks:
87
+ - iam_cloud_asset_inventory_enabled
88
+ - id: A.5.29
89
+ title: The organisation should plan how to maintain information security at an appropriate
90
+ level during disruption.
91
+ checks:
92
+ - iam_cloud_asset_inventory_enabled
93
+ - id: A.8.1
94
+ title: Information stored on, processed by or accessible via user endpoint devices
95
+ should be protected.
96
+ checks:
97
+ - bigquery_dataset_public_access
98
+ - cloudsql_instance_public_access
99
+ - cloudsql_instance_public_ip
100
+ - cloudstorage_bucket_public_access
101
+ - compute_instance_public_ip
102
+ - compute_public_address_shodan
103
+ - kms_key_not_publicly_accessible
104
+ - id: A.8.2
105
+ title: The allocation and use of privileged access rights should be restricted and
106
+ managed.
107
+ checks:
108
+ - iam_account_access_approval_enabled
109
+ - iam_no_service_roles_at_project_level
110
+ - iam_role_kms_enforce_separation_of_duties
111
+ - iam_role_sa_enforce_separation_of_duties
112
+ - iam_sa_no_administrative_privileges
113
+ - iam_sa_no_user_managed_keys
114
+ - id: A.8.3
115
+ title: Access to information and other associated assets should be restricted in
116
+ accordance with the established topic-specific policy on access control.
117
+ checks:
118
+ - compute_instance_default_service_account_in_use_with_full_api_access
119
+ - iam_account_access_approval_enabled
120
+ - iam_sa_no_administrative_privileges
121
+ - id: A.8.7
122
+ title: Protection against malware should be implemented and supported by appropriate
123
+ user awareness.
124
+ checks:
125
+ - iam_cloud_asset_inventory_enabled
126
+ - id: A.8.9
127
+ title: Configurations, including security configurations, of hardware, software,
128
+ services and networks should be established, documented, implemented, monitored
129
+ and reviewed.
130
+ checks:
131
+ - iam_cloud_asset_inventory_enabled
132
+ - id: A.8.10
133
+ title: Information stored in information systems, devices or in any other storage
134
+ media should be deleted when no longer required.
135
+ checks:
136
+ - cloudstorage_bucket_log_retention_policy_lock
137
+ - id: A.8.11
138
+ title: Data masking should be used in accordance with the organisation’s topic-specific
139
+ policy on access control and other related topic-specific policies, and business
140
+ requirements, taking applicable legislation into consideration.
141
+ checks:
142
+ - bigquery_dataset_cmk_encryption
143
+ - bigquery_table_cmk_encryption
144
+ - compute_instance_encryption_with_csek_enabled
145
+ - dataproc_encrypted_with_cmks_disabled
146
+ - id: A.8.12
147
+ title: Data leakage prevention measures should be applied to systems, networks and
148
+ any other devices that process, store or transmit sensitive information.
149
+ checks:
150
+ - apikeys_api_restrictions_configured
151
+ - apikeys_key_rotated_in_90_days
152
+ - cloudsql_instance_ssl_connections
153
+ - cloudstorage_bucket_public_access
154
+ - compute_instance_encryption_with_csek_enabled
155
+ - kms_key_not_publicly_accessible
156
+ - kms_key_rotation_enabled
157
+ - id: A.8.13
158
+ title: Backup copies of information, software and systems should be maintained and
159
+ regularly tested in accordance with the agreed topic-specific policy on backup.
160
+ checks:
161
+ - cloudsql_instance_automated_backups
162
+ - id: A.8.14
163
+ title: Information processing facilities should be implemented with redundancy sufficient
164
+ to meet availability
165
+ checks:
166
+ - compute_instance_encryption_with_csek_enabled
167
+ - compute_instance_shielded_vm_enabled
168
+ - id: A.8.15
169
+ title: Logs that record activities, exceptions, faults and other relevant events
170
+ should be produced, stored, protected and analysed.
171
+ checks:
172
+ - logging_log_metric_filter_and_alert_for_audit_configuration_changes_enabled
173
+ - logging_log_metric_filter_and_alert_for_bucket_permission_changes_enabled
174
+ - logging_log_metric_filter_and_alert_for_custom_role_changes_enabled
175
+ - logging_log_metric_filter_and_alert_for_project_ownership_changes_enabled
176
+ - logging_log_metric_filter_and_alert_for_sql_instance_configuration_changes_enabled
177
+ - logging_log_metric_filter_and_alert_for_vpc_firewall_rule_changes_enabled
178
+ - logging_log_metric_filter_and_alert_for_vpc_network_changes_enabled
179
+ - logging_log_metric_filter_and_alert_for_vpc_network_route_changes_enabled
180
+ - logging_sink_created
181
+ - id: A.8.16
182
+ title: Networks, systems and applications should be monitored for anomalous behaviour
183
+ and appropriate actions taken to evaluate potential information security incidents.
184
+ checks:
185
+ - cloudsql_instance_postgres_log_connections_flag
186
+ - cloudsql_instance_postgres_log_disconnections_flag
187
+ - cloudsql_instance_postgres_log_error_verbosity_flag
188
+ - cloudsql_instance_postgres_log_min_duration_statement_flag
189
+ - cloudsql_instance_postgres_log_min_error_statement_flag
190
+ - cloudsql_instance_postgres_log_min_messages_flag
191
+ - cloudsql_instance_postgres_log_statement_flag
192
+ - cloudstorage_bucket_log_retention_policy_lock
193
+ - compute_loadbalancer_logging_enabled
194
+ - compute_network_dns_logging_enabled
195
+ - compute_project_os_login_enabled
196
+ - compute_subnet_flow_logs_enabled
197
+ - iam_audit_logs_enabled
198
+ - logging_log_metric_filter_and_alert_for_audit_configuration_changes_enabled
199
+ - logging_log_metric_filter_and_alert_for_bucket_permission_changes_enabled
200
+ - logging_log_metric_filter_and_alert_for_custom_role_changes_enabled
201
+ - logging_log_metric_filter_and_alert_for_project_ownership_changes_enabled
202
+ - logging_log_metric_filter_and_alert_for_sql_instance_configuration_changes_enabled
203
+ - logging_log_metric_filter_and_alert_for_vpc_firewall_rule_changes_enabled
204
+ - logging_log_metric_filter_and_alert_for_vpc_network_changes_enabled
205
+ - logging_log_metric_filter_and_alert_for_vpc_network_route_changes_enabled
206
+ - logging_sink_created
207
+ - id: A.8.20
208
+ title: Networks and network devices should be secured, managed and controlled to
209
+ protect information in systems and applications.
210
+ checks:
211
+ - compute_firewall_rdp_access_from_the_internet_allowed
212
+ - compute_firewall_ssh_access_from_the_internet_allowed
213
+ - compute_network_default_in_use
214
+ - compute_network_dns_logging_enabled
215
+ - compute_network_not_legacy
216
+ - compute_subnet_flow_logs_enabled
217
+ - logging_log_metric_filter_and_alert_for_vpc_network_changes_enabled
218
+ - logging_log_metric_filter_and_alert_for_vpc_network_route_changes_enabled
219
+ - id: A.8.21
220
+ title: Security mechanisms, service levels and service requirements of network services
221
+ should be identified, implemented and monitored.
222
+ checks:
223
+ - compute_network_dns_logging_enabled
224
+ - compute_subnet_flow_logs_enabled
225
+ - logging_log_metric_filter_and_alert_for_vpc_network_changes_enabled
226
+ - logging_log_metric_filter_and_alert_for_vpc_network_route_changes_enabled
227
+ - id: A.8.22
228
+ title: Security mechanisms, service levels and service requirements of network services
229
+ should be identified, implemented and monitored.
230
+ checks:
231
+ - compute_network_dns_logging_enabled
232
+ - compute_subnet_flow_logs_enabled
233
+ - logging_log_metric_filter_and_alert_for_vpc_network_changes_enabled
234
+ - logging_log_metric_filter_and_alert_for_vpc_network_route_changes_enabled
235
+ - id: A.8.24
236
+ title: Rules for the effective use of cryptography, including cryptographic key
237
+ management, should be defined and implemented.
238
+ checks:
239
+ - kms_key_not_publicly_accessible
240
+ - kms_key_rotation_enabled