Created
November 24, 2021 21:00
-
-
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.
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
#!/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