google / gcp_scanner

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

Refinement: Improve sending scan config to every crawler. #241

Open sudiptob2 opened 1 year ago

sudiptob2 commented 1 year ago

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

aryanagrawal22 commented 9 months ago

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 commented 9 months ago

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.