Skip to content

Wl 3202 gcp list buckets#13

Open
assaf-orca wants to merge 3 commits intomainfrom
WL-3202-gcp-list-buckets
Open

Wl 3202 gcp list buckets#13
assaf-orca wants to merge 3 commits intomainfrom
WL-3202-gcp-list-buckets

Conversation

@assaf-orca
Copy link
Copy Markdown

No description provided.

if [[ $container_host_workloads -eq 0 && $total_gke_nodes -gt 0 ]]; then
container_host_workloads=1
fi
total_workloads=$(( vm_workloads + function_workloads + container_workloads + container_image_workloads + vm_image_workloads + container_host_workloads ))
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you please add workload calculations for buckets

for org_id in $ORGS; do
echo "Processing organization: $org_id"

all_resources=$(gcloud asset search-all-resources --scope="organizations/$org_id" --format="json(displayName, assetType, project)" --asset-types="$asset_types")
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we please have some error handling here? i.e. if one org fails it still makes sense to proceed with other




is_public_access_prevention_enabled_from_org_level=$(gcloud resource-manager org-policies describe storage.publicAccessPrevention --organization="$org_id" --effective --format json | jq '.booleanPolicy.enforced == true')
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you please align the logic with what we currently have in the check_public function in GCP client? I think we check only for project-level permissions and we don't want it to be very different from what we have in the scan logic

@assaf-orca assaf-orca force-pushed the WL-3202-gcp-list-buckets branch from 4c9fdcf to 86fde82 Compare December 19, 2024 14:09
@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants