google / gcp_scanner

A comprehensive scanner for Google Cloud
Apache License 2.0
311 stars 97 forks source link

Fix: Output Appending Issue for Each Scan on a Single Project #128

Closed Am0stafa closed 1 year ago

Am0stafa commented 1 year ago

Description:

This PR addresses issue #79, where the output of multiple scans on a single project was appended to the same JSON file. The changes introduced in this PR ensure that a unique file is created for each scan, preventing the output of different scans from being appended to the same file.

Key Changes:

By implementing these changes, the output of each scan is now saved in a separate file, eliminating the issue of appending scan results to the same file. This makes it easier for users to analyze the output of individual scans and prevents the unintentional merging of scan results. The generate_unique_filename function plays a crucial role in ensuring that each scan's output is saved in a distinct file, which ultimately enhances the usability and reliability of the GCP resource scanner.

Related Issues

fixes #79

mshudrak commented 1 year ago

we have #84 already addressing this problem.

Am0stafa commented 1 year ago

we have #84 already addressing this problem.

Thank you for pointing this out. I understand that there is already an ongoing PR (#84) that addresses the same issue. My approach offers an alternative solution to the problem, and I'm aware that the existing PR might be outdated and result in conflicts.

Considering the lack of response from the author of the old PR, I would like to propose my solution for your review. If you find it beneficial or more suitable for the project, I am willing to work on integrating the changes. If you think this PR should be closed, that is fine as well.

Please let me know your thoughts and how you would like to proceed with this matter.

mshudrak commented 1 year ago

There is #84 that's almost ready for merge. I'd close this PR.

mshudrak commented 1 year ago

84 has been merged. Closing this one.