Panther high experimental python

AWS S3 Bucket Public Read

Ensures that the S3 bucket is not publicly readable.

View Source

Detection Logic

from panther_base_helpers import deep_get

GRANTEES = {
    "http://acs.amazonaws.com/groups/global/AuthenticatedUsers",
    "http://acs.amazonaws.com/groups/global/AllUsers",
}
PERMISSIONS = {"READ"}


def policy(resource):
    for grant in resource["Grants"] or []:
        if deep_get(grant, "Grantee", "URI") in GRANTEES and grant.get("Permission") in PERMISSIONS:
            return False

    return True

Field Validations

Loading…

Comments (0)

Loading comments...