google / google/gcp_scanner

Epic: add support for additional GCP resources.

Open
#247 4 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
370
Forks
114
PR merge metrics
No merged PRs in 30d

Description

📝 **List of resources:**

I've compiled the following resources that we need to add support for. Feel free to suggest any other resources that should be prioritized. Additionally, let me know if there's anything else we should include in the list.

- [x] #250
- [x] #255
- [x] #260
- [ ] cloudshell
- [ ] cloudasset
- [ ] cloudidentity
- [ ] cloudbilling
- [ ] cloudtrace
- [ ] Compute/securitypolicies
- [ ] Cloud Monitoring dashboard
- [ ] Compute/sslCertificates

🛠️ **Implementation Steps:**

Here's a brief description of how to implement new resource crawling:

**Step 1:**

Browse through the [google-api-python-client](https://googleapis.github.io/google-api-python-client/docs/dyn/) library to find the suitable client and determine the data to crawl.

**Step 2:**

If the client isn't already implemented in the [client package](https://github.com/google/gcp_scanner/tree/main/src/gcp_scanner/client), create a client factory.

**Step 3:**

For your crawler, establish a new crawler factory in the [crawler package](https://github.com/google/gcp_scanner/tree/main/src/gcp_scanner/crawler).

**Step 4:**

In the `scanner.py` file, include the crawler in the crawl loop and update the `crawl_client_map`. Don't forget to modify the `example.config` to account for the new crawler.

**Step 5:**

Ensure proper unit tests are in place. If applicable, add acceptance tests (If you are a team member who has access to the `test_gcp_project` in the Google Cloud Platform)

📝 **Note:** Please bear in mind that the code is undergoing significant refactoring, so the above-mentioned process might change.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.