{"id":15222340,"url":"https://github.com/googlecloudplatform/solutions-terraform-scc-notifications-gchat","last_synced_at":"2025-09-14T13:42:31.442Z","repository":{"id":66041330,"uuid":"566655355","full_name":"GoogleCloudPlatform/solutions-terraform-scc-notifications-gchat","owner":"GoogleCloudPlatform","description":"Send SCC Notifications to Google Chat","archived":false,"fork":false,"pushed_at":"2024-05-02T20:44:15.000Z","size":14,"stargazers_count":8,"open_issues_count":1,"forks_count":2,"subscribers_count":13,"default_branch":"main","last_synced_at":"2024-12-18T08:41:24.454Z","etag":null,"topics":["gcp","gcp-security","googlecloudplatform","scc","securitycommandcenter","terraform"],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GoogleCloudPlatform.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/contributing.md","funding":null,"license":"LICENSE","code_of_conduct":"docs/code-of-conduct.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-16T06:03:42.000Z","updated_at":"2023-05-08T20:09:15.000Z","dependencies_parsed_at":"2024-09-28T15:21:46.558Z","dependency_job_id":null,"html_url":"https://github.com/GoogleCloudPlatform/solutions-terraform-scc-notifications-gchat","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleCloudPlatform%2Fsolutions-terraform-scc-notifications-gchat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleCloudPlatform%2Fsolutions-terraform-scc-notifications-gchat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleCloudPlatform%2Fsolutions-terraform-scc-notifications-gchat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleCloudPlatform%2Fsolutions-terraform-scc-notifications-gchat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GoogleCloudPlatform","download_url":"https://codeload.github.com/GoogleCloudPlatform/solutions-terraform-scc-notifications-gchat/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237243005,"owners_count":19278060,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gcp","gcp-security","googlecloudplatform","scc","securitycommandcenter","terraform"],"created_at":"2024-09-28T15:11:40.516Z","updated_at":"2025-02-05T04:32:01.964Z","avatar_url":"https://github.com/GoogleCloudPlatform.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Google Cloud SCC Notifications to Google Chat\n\nThis repository contains provides example code to create Finding Notifications for Security Command Center, and sends the findings to Google Chat using a Webhook.\n\nThe infrastructure is written in Terraform, which will create the following components:\n\n- [SCC Finding Notifications](https://cloud.google.com/security-command-center/docs/how-to-notifications)\n- [Pub/Sub Topic](https://cloud.google.com/pubsub)\n- [GCS Bucket](https://cloud.google.com/storage/docs/creating-buckets)\n- [GCS Object](https://cloud.google.com/storage/docs/json_api/v1/objects)\n- [Cloud Function](https://cloud.google.com/functions)\n\nThe Cloud Function is written in Node.js which will parse the Pub/Sub event and send the details to a Google Chat Webhook using the a Card message with the Google Chat API.\n\n\n## Prerequisites \n\n1. Tested on Terraform v1.0.11 with Google Cloud Provider v4.5.0\n2. Google Cloud SDK\n3. Enable Cloud Functions API and Cloud Build API\n4. Enable Security Command Center\n5. Node.js runtime \u003e= 16\n6. Create a Google Chat Webhook - info can be found [here](https://developers.google.com/chat/how-tos/webhooks)\n\n\n## Usage\n\n```ruby\nmodule \"scc_notifications\" {\n    source = \"../\"\n\n    bucket_name                     = \"your-scc-function-bucket\"\n    bucket_location                 = \"ASIA-SOUTHEAST1\"\n    function_name                   = \"scc-notification-gchat\"\n    function_description            = \"SCC Notifications to Google Chat\"\n    function_runtime                = \"nodejs16\"\n    topic_name                      = \"scc-notifications-topic\"\n    gchat_webhook_url               = \"https://chat.googleapis.com/v1/[your-web-hook-url]\"\n    topic_iam_role                  = \"roles/pubsub.publisher\"\n    scc_notification_name           = \"all-active-alerts\"\n    org_id                          = \"01234567890\"\n    scc_notification_description    = \"My Custom Cloud Security Command Center Finding Notification Configuration\"\n    notification_filter             = \"state = \\\"ACTIVE\\\"\"\n\n}\n```\n\n\n*Note: This code sample requires you to hardcode the Webhook URL as an environment variable, using the confidential flag for Terraform. For added security, and to safeguard credentials, consider using Secret Manager with Cloud Functions. For instructions, see [Using secrets](https://cloud.google.com/functions/docs/configuring/secrets) in Cloud Functions documentation.*","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgooglecloudplatform%2Fsolutions-terraform-scc-notifications-gchat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgooglecloudplatform%2Fsolutions-terraform-scc-notifications-gchat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgooglecloudplatform%2Fsolutions-terraform-scc-notifications-gchat/lists"}