Open
Conversation
alexn-orca
reviewed
Dec 16, 2024
gcp_org_resource_count.sh
Outdated
| 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 )) |
There was a problem hiding this comment.
can you please add workload calculations for buckets
gcp_org_resource_count.sh
Outdated
| 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") |
There was a problem hiding this comment.
can we please have some error handling here? i.e. if one org fails it still makes sense to proceed with other
gcp_org_resource_count.sh
Outdated
|
|
||
|
|
||
|
|
||
| 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') |
There was a problem hiding this comment.
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
4c9fdcf to
86fde82
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



No description provided.