Open 0xdabbad00 opened 4 years ago
Awaiting for this feature :) !! Have a use case internally that would be solved by this. Putting the comment here to show support for this feature.
It would be also good if it could check for condition such as the one in the below policy which could still expose the bucket based on source IP.
{
"Version": "2012-10-17",
"Id": "VPCe and SourceIP",
"Statement": [{
"Sid": "VPCe and SourceIP",
"Effect": "Deny",
"Principal": "*",
"Action": "s3:*",
"Resource": [
"arn:aws:s3:::awsexamplebucket",
"arn:aws:s3:::awsexamplebucket/*"
],
"Condition": {
"IpAddress": {
"aws:SourceIp": [
"0.0.0.0/0"
]
}
}
}]
}
If the policy contains a Principal, we can assume it is a Resource policy. Also, #14 (where we allow the user to specify the type of policy) would inform this.
Once we know it is a resource policy, there are certain checks we can perform. For example, given this policy:
Some things to check for: