Split CIS GCP 4.0 into individual rules (3.1, 3.6, 3.7, 4.9, 5.2) #2196
+379
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
Description
cartography/rules/data/rules/cis_4_0_gcp.pydefiningGCPCISFindingand five rules with oneFacteach:cis_gcp_3_1_default_network,cis_gcp_3_6_unrestricted_ssh,cis_gcp_3_7_unrestricted_rdp,cis_gcp_4_9_public_ip, andcis_gcp_5_2_bucket_uniform_access.identries to theRULESdictionary incartography/rules/data/rules/__init__.py.docs/root/usage/rules.mdto list the new rule identifiers and show example usage (e.g.,cartography-rules run cis_gcp_3_1_default_network).tests/unit/rules/test_cis_4_0_gcp.py, updating assertions to validate registration,Module/Maturity, fact IDs, and thatparse_resultspreserves extra fields.Testing
python -m pytest tests/unit/rules.13 passedwith warnings only.RULES, fact metadata (Module.GCP,Maturity.EXPERIMENTAL), fact ID naming, andparse_resultsbehavior preserving extra fields.Codex Task