Summary
The exclusions file generated by cloudsplaining create-exclusions-file includes an include-actions key with a comment implying it extends the Data Exfiltration detection list:
Read-only actions to include in the results, such as s3:GetObject. By default, it includes Actions that could lead to Data Exfiltration
In practice, include-actions is never read by the Data Exfiltration finding logic. It only affects the unrelated Infrastructure Modification (Write / Permissions Management / Tagging) finding category.
Where this breaks down
cloudsplaining/shared/constants.py defines READ_ONLY_DATA_EXFILTRATION_ACTIONS as a hardcoded list (currently s3:GetObject, ssm:GetParameter, ssm:GetParameters, ssm:GetParametersByPath, secretsmanager:GetSecretValue).
cloudsplaining/output/policy_finding.py, the data_exfiltration property, calls self.policy_document.allows_specific_actions_without_constraints(READ_ONLY_DATA_EXFILTRATION_ACTIONS) and filters only against self.exclusions.exclude_actions. It never references self.exclusions.include_actions.
exclusions.include_actions is only consumed in cloudsplaining/scan/statement_detail.py, inside missing_resource_constraints_for_modify_actions, which feeds the Infrastructure Modification finding, a completely separate category from Data Exfiltration.
So there is no code path by which adding an action to include-actions can cause it to appear in the Data Exfiltration finding, no matter what the exclusions-file template comment says.
Repro
- Generate an exclusions file:
cloudsplaining create-exclusions-file
- Add
s3:ListBucket to include-actions:
include-actions:
- "s3:ListBucket"
- Scan a policy that grants only
s3:ListBucket (no resource constraint) and does not grant any action already in the hardcoded READ_ONLY_DATA_EXFILTRATION_ACTIONS list, e.g.:
{
"Version": "2012-10-17",
"Statement": [
{ "Effect": "Allow", "Action": "s3:ListBucket", "Resource": "*" }
]
}
- Run
cloudsplaining scan with that exclusions file against the policy.
- Observe: no Data Exfiltration finding is produced for
s3:ListBucket, despite it being explicitly added to include-actions.
Proposed fix (pick one)
Option A - wire up include-actions to Data Exfiltration: update the data_exfiltration property to union exclusions.include_actions into the action list passed to allows_specific_actions_without_constraints, so the property behaves as the generated template comment describes.
Option B - fix the documentation instead: if include-actions is intentionally scoped to Infrastructure Modification only, update the comment generated by create-exclusions-file to say so.
Either direction resolves the mismatch; maintainers should pick based on intended design.
Summary
The exclusions file generated by
cloudsplaining create-exclusions-fileincludes aninclude-actionskey with a comment implying it extends the Data Exfiltration detection list:In practice,
include-actionsis never read by the Data Exfiltration finding logic. It only affects the unrelated Infrastructure Modification (Write / Permissions Management / Tagging) finding category.Where this breaks down
cloudsplaining/shared/constants.pydefinesREAD_ONLY_DATA_EXFILTRATION_ACTIONSas a hardcoded list (currentlys3:GetObject,ssm:GetParameter,ssm:GetParameters,ssm:GetParametersByPath,secretsmanager:GetSecretValue).cloudsplaining/output/policy_finding.py, thedata_exfiltrationproperty, callsself.policy_document.allows_specific_actions_without_constraints(READ_ONLY_DATA_EXFILTRATION_ACTIONS)and filters only againstself.exclusions.exclude_actions. It never referencesself.exclusions.include_actions.exclusions.include_actionsis only consumed incloudsplaining/scan/statement_detail.py, insidemissing_resource_constraints_for_modify_actions, which feeds the Infrastructure Modification finding, a completely separate category from Data Exfiltration.So there is no code path by which adding an action to
include-actionscan cause it to appear in the Data Exfiltration finding, no matter what the exclusions-file template comment says.Repro
cloudsplaining create-exclusions-files3:ListBuckettoinclude-actions:s3:ListBucket(no resource constraint) and does not grant any action already in the hardcodedREAD_ONLY_DATA_EXFILTRATION_ACTIONSlist, e.g.:{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "s3:ListBucket", "Resource": "*" } ] }cloudsplaining scanwith that exclusions file against the policy.s3:ListBucket, despite it being explicitly added toinclude-actions.Proposed fix (pick one)
Option A - wire up
include-actionsto Data Exfiltration: update thedata_exfiltrationproperty to unionexclusions.include_actionsinto the action list passed toallows_specific_actions_without_constraints, so the property behaves as the generated template comment describes.Option B - fix the documentation instead: if
include-actionsis intentionally scoped to Infrastructure Modification only, update the comment generated bycreate-exclusions-fileto say so.Either direction resolves the mismatch; maintainers should pick based on intended design.