gcp_scanner icon indicating copy to clipboard operation
gcp_scanner copied to clipboard

Refinement: Improve sending scan config to every crawler.

Open sudiptob2 opened this issue 2 years ago • 2 comments

All crawlers do not need scan_config for their crawling mechanism. Hence it's redundant to pass the scan config into every crawler and needs refinement.

Ref: https://github.com/google/gcp_scanner/blob/27fd173f783f914cbe619aed5e0ea34757fd18e7/src/gcp_scanner/scanner.py#L234

sudiptob2 avatar Jul 09 '23 16:07 sudiptob2

Hi maintainers, I am starting to work on this issue. I plan to make a new staticmethod inside ICrawler base class which is base class of every crawler class.

The method will set if the crawler needs a config or not and then we can call it accordingly to know if we need to send a config or not. Currently, as to what I have seen only StorageBucketsCrawler uses the config file, so only it will return true when asked if cofig needed.

Sounds fair to solve the issue?

aryanagrawal22 avatar Nov 22 '23 17:11 aryanagrawal22

Hi folks, I have raised a PR which i feel will resolve this issue. PR: https://github.com/google/gcp_scanner/pull/304. Please let me know if any changes are required.

aryanagrawal22 avatar Nov 23 '23 12:11 aryanagrawal22