google / gcp_scanner

A comprehensive scanner for Google Cloud
Apache License 2.0
305 stars 95 forks source link

Scanning with multiple keys from the same project fails #142

Open ZetaTwo opened 1 year ago

ZetaTwo commented 1 year ago

Describe the bug

If you have two different keys for the same project in a scan, only the first scan will be saved since the log files are named [project]_[timestamp].json.

To Reproduce

  1. Put two different keys for the same project in a directory
  2. Run GCP Scanner with these keys

Expected behavior

Perform the scan and create two different log files, one for each key, probably by adding the key id to the filename as well.

Current behavior

The first key works fine but the second will fail with an error since the name of the log files collide.