Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GCP Public access buckets are never flagged #1596

Open
fgimenezm opened this issue Jan 15, 2024 · 1 comment
Open

GCP Public access buckets are never flagged #1596

fgimenezm opened this issue Jan 15, 2024 · 1 comment
Labels
bug Something isn't working potential Unconfirmed issue

Comments

@fgimenezm
Copy link

When scanning a GCP Project with a bucket with public access enabled (AllUsers), the current ScoutSuite logic will never flag it.

The current ScoutSuite logic is as follows:

    "conditions": [
        "and",
        ["or",
            [
                "cloudstorage.projects.id.buckets.id.member_bindings",
                "withKey",
                "_ARG_0_"
            ],
            [
                "cloudstorage.projects.id.buckets.id.acls",
                "containString",
                "_ARG_0_"
            ]
        ],
        [
            "cloudstorage.projects.id.buckets.id.public_access_prevention",
            "notEqual",
            "enforced"
        ],
        [
            "cloudstorage.projects.id.buckets.id.public_access_prevention",
            "notEqual",
            "inherited"
        ]
    ],

but according to Google documentation about public access prevention

the bucket state can only be set to enforced or inherited

so one of these will always be false

        [
            "cloudstorage.projects.id.buckets.id.public_access_prevention",
            "notEqual",
            "enforced"
        ],
        [
            "cloudstorage.projects.id.buckets.id.public_access_prevention",
            "notEqual",
            "inherited"
        ]

making the whole condition always false.

Credits to @martinpestoni who found the issue.

@fgimenezm fgimenezm added bug Something isn't working potential Unconfirmed issue labels Jan 15, 2024
@x4v13r64
Copy link
Collaborator

#1597 fixes this bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working potential Unconfirmed issue
Projects
None yet
Development

No branches or pull requests

2 participants