feat(gcp): Add Cloud Functions ingestion
feat(gcp): Add Cloud Functions Ingestion and Documentation
Summary
This Pull Request adds support for ingesting Google Cloud Functions (GCF) data into Cartography. It introduces a new ingestion module that discovers Cloud Functions, maps their key properties, and establishes relationships to their parent GCP Projects.
Desired Behavior
Upon running a GCP sync, Cloud Functions will be discovered, and new GCPCloudFunction nodes will be created in the graph, linked to their respective GCPProject nodes via a [:RESOURCE] relationship. Key properties such as name, runtime, status, creation/update times, and trigger details (HTTPS URL, event type/resource) will be stored.
Scenario Enabled
This enables Cartography users to gain comprehensive visibility into their serverless compute resources on Google Cloud. It facilitates asset inventory, aids in security posture assessment (e.g., identifying publicly exposed HTTP functions), and helps understand function dependencies within the overall GCP infrastructure.
Checklist (Proof of Work)
- [x] Update/add unit or integration tests.
- [x] Include a screenshot showing what the graph looked like before and after your changes.
- [x] Include console log trace showing what happened before and after your changes.
If you are changing a node or relationship:
- [x] Update the schema and readme.
(Schema documentation added directly to
docs/root/modules/gcp/schema.mdand linked fromdocs/root/usage/schema.md.)
If you are implementing a new intel module:
- [x] Use the NodeSchema data model.
(Defined
GCPCloudFunctionNodeschema incartography/models/gcp/gcf.py.)
Proof of Work:
Console Log Trace:
Hi @d-aggarwal and @achantavy,
This is the new, clean pull request for the GCP Cloud Functions feature.
I've closed the old PR (#1744) to resolve the messy git history and start fresh from a dedicated feature branch. This new version contains the final, correct code and incorporates all the feedback you both provided.
It should be ready for a final review when you have a moment. Thank you for your patience and guidance!