Skip to content

Instantly share code, notes, and snippets.

@ronoaldo
Created November 24, 2021 21:00
Show Gist options
  • Save ronoaldo/392915c03cb9d463fb067fdc5ba84b29 to your computer and use it in GitHub Desktop.
Save ronoaldo/392915c03cb9d463fb067fdc5ba84b29 to your computer and use it in GitHub Desktop.
Export all Google Cloud Security Command Center findings into a CSV file for easy management.
#!/usr/bin/env bash
# This script exports to the standard output all the security command center findings
# that you may have in your all your Google cloud organizations, in a CSV format.
gcloud organizations list --format='value(name)' | while read ORGANIZATION_ID ; do
gcloud scc findings list $ORGANIZATION_ID \
--format='csv(finding.category, finding.severity, finding.state, finding.eventTime, finding.externalUri)'
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment