Programmatic notifications for Trust Center findings¶
Trust Center scanners run in customer accounts to surface security violations or detect potential threats as findings. The findings appear automatically in Snowsight. A Trust Center administrator can also configure notifications so that users with verified email addresses receive notifications about findings as email messages.
You can also send notifications through webhooks (PagerDuty, Slack, Microsoft Teams, Jira, ServiceNow) and queues (Amazon SNS, Azure Event Grid, Google Pub/Sub) for Trust Center findings. The notifications are triggered by a specific event, such as generation of a finding. Using notification integrations with the Trust Center provides the option to receive notifications independent from Snowsight, through a customer-configured PagerDuty service, SNS topic, or other endpoint.
For more information, see CREATE NOTIFICATION INTEGRATION.
Configure notification integrations for Trust Center findings¶
To configure notification integrations for the Trust Center, perform the following steps:
- Create a notification integration
- Grant access to the notification integration
- Configure notification settings for scanner packages and scanners
- Send a test notification
- Run the scanner
- Interpret the notification output
- Troubleshoot notification issues
Create a notification integration¶
To enable the Trust Center to send notifications to a third-party system, run the CREATE NOTIFICATION INTEGRATION command.
Note
Only outbound notification integrations are supported.
For more information, see CREATE NOTIFICATION INTEGRATION.
The following examples show how to create notification integrations:
AWS SNS
Note
For webhook notification integrations, Trust Center populates SNOWFLAKE_WEBHOOK_MESSAGE with the notification output in JSON format. Configure your notification integration to handle this appropriately.
PagerDuty webhook
The following example creates a webhook that relies on a secret.
Jira webhook
The following example creates a webhook for a Jira automation rule with an incoming webhook trigger.
Jira generates an automation webhook token when you create the rule. The secret stores this token, and the
X-Automation-Webhook-Token header passes it to Jira. For more information, see
Creating a secret for a Jira webhook and
Creating a notification integration for a Jira webhook.
ServiceNow webhook
The following example creates a webhook for a ServiceNow endpoint that requires HTTP basic authentication. The secret stores
the entire Authorization header value, Basic <base64(username:password)>, where <base64(username:password)> is the
Base64 encoding of your ServiceNow username:password. For more information, see
Creating a secret for a ServiceNow webhook and
Creating a notification integration for a ServiceNow webhook.
In WEBHOOK_BODY_TEMPLATE, use the field names that your ServiceNow endpoint expects.
Note
If you prefer to store only the Base64-encoded credentials in the secret, omit the Basic prefix from SECRET_STRING and
include it in the header instead: 'Authorization'='Basic SNOWFLAKE_WEBHOOK_SECRET'.
Grant access to the integration¶
To enable the Trust Center to use an integration to send notifications, grant the USAGE privilege on the notification integration to the SNOWFLAKE application. For example:
If the integration relies on a secret, such as a PagerDuty webhook integration key, a Jira automation webhook token, or ServiceNow credentials, grant the following additional privileges to the SNOWFLAKE application:
- READ privilege on the secret
- USAGE privilege on the database containing the secret
- USAGE privilege on the schema containing the secret
For example:
If you configure notification settings by using Snowsight, you can grant the required privileges from the Edit notification integrations dialog instead. For more information, see Configure notification settings by using Snowsight.
Configure notification settings for scanner packages and scanners¶
For each scanner package or scanner, define which findings trigger a notification. You can configure notification settings by using Snowsight or SQL.
Configure notification settings by using Snowsight¶
Before you begin, create the notification integration that you want to use.
To configure notification settings for a scanner package or a scanner, complete the following steps:
-
Switch to a role with the
SNOWFLAKE.TRUST_CENTER_ADMINapplication role granted to it.For more information about granting this role, see Required roles.
-
In the navigation menu, select Governance & security » Trust Center.
-
Select the Manage scanners tab.
-
Select a scanner package from the list.
-
Open the Edit notification integrations dialog:
- To configure notification settings for all scanners in the package, select the Settings tab, and then under Notification integrations, select Set up. If notification integrations are already set up for the package, select the edit icon.
- To configure notification settings for a single scanner, select
More for the
scanner, and then select Edit notification integration.
-
Select Add.
-
For Notification integration, select the notification integration to use.
-
If the dialog lists permissions that the Trust Center needs to use the integration, select Grant access.
-
Set the Minimum severity level trigger.
The Trust Center sends notifications for findings at the specified level or higher.
-
Optional: To include entity details, such as user names and IP addresses, in the notification, turn on Include at-risk entities and finding metadata. Turn on this option only if you accept sending sensitive account information outside your Snowflake account.
-
Select Save.
-
To add another notification integration, repeat steps 7 through 12.
-
Select Done.
Configure notification settings by using SQL¶
A NOTIFICATION_INTEGRATION configuration defines the findings that trigger a notification. To set a NOTIFICATION_INTEGRATION configuration for a scanner or a scanner package, use the SET_CONFIGURATION stored procedure.
The configuration value is a string that contains an array of JSON objects. Each object specifies the following:
| Key | Description |
|---|---|
INTEGRATION_NAME | Name of the notification integration to use. |
SEVERITY_THRESHOLD | Minimum severity level of a finding that triggers a notification. Valid values are LOW, MEDIUM, HIGH, and CRITICAL. Notifications are sent only for findings at or above this severity level. |
INCLUDE_AT_RISK_ENTITIES_AND_FINDING_METADATA | Optional. When set to TRUE, the notification includes entity details such as user names and IP addresses. Defaults to FALSE. Enable this parameter only if you accept sending sensitive account information outside your Snowflake account. |
The following example sets a notification configuration for all scanners in the CIS_BENCHMARKS scanner package:
The following example sets a notification configuration for a specific scanner (CIS_BENCHMARKS_CIS1_1) within a scanner package:
You can configure multiple notification integrations for the same scanner or scanner package. The following example
configures the CIS_BENCHMARKS scanner package so that the Azure Event Grid integration receives notifications for CRITICAL
findings, the PagerDuty integration receives notifications for HIGH or CRITICAL findings, and the AWS SNS
integration receives notifications for findings of any severity level:
To remove the notification configuration for a scanner, call the UNSET_CONFIGURATION stored procedure:
Send a test notification¶
After you configure a notification integration for a scanner or scanner package, you can verify that
the integration works by sending a test notification instead of waiting for a scanner to produce a
real finding. To send a test notification, call the SEND_TEST_NOTIFICATION_INTEGRATION stored
procedure. The procedure sends one mock finding to a single configured integration. To test a
package-level configuration, pass the scanner package name. To test a scanner-level configuration,
also pass a scanner name.
The following example sends a test notification to an integration that’s configured at the scanner package level:
The following example sends a test notification to an integration that’s configured for a specific
scanner (CIS_BENCHMARKS_CIS1_1) within a scanner package:
The procedure accepts the following arguments:
| Argument | Description |
|---|---|
scanner_package_id | Required. Name of the scanner package that the integration is configured for, such as CIS_BENCHMARKS. |
scanner_id | Optional. Name of a specific scanner within the package, such as CIS_BENCHMARKS_CIS1_1. Include this argument to test a scanner-level configuration. Omit it to test the package-level configuration. |
integration_name | Required. Name of the configured notification integration to test. The name must match an integration that’s configured at the scope you specify. |
The procedure returns an object with a status field that’s either SUCCESS or FAILURE, along
with a message field and, if the notification fails to send, an error_message field.
For example, a successful call returns:
If the notification fails to send, the status is FAILURE and error_message describes the
problem:
The test notification uses the same payload structure as a real finding, described in
Interpret the notification output. The mock
finding has a finding_identifier value of TEST and a finding_severity value that matches the
SEVERITY_THRESHOLD configured for the integration, so you can distinguish test notifications from
real findings.
Run the scanner¶
Trust Center supports schedule-based scanners and event-driven scanners. After setting the configuration, you can run a scanner on demand or wait for the scanner to either run on its schedule or be triggered by an event.
Note
- An event-driven scanner does not send a notification if it detects no findings.
- Notification integration notifications are sent for a scanner finding only when the severity threshold is met or exceeded.
To manually trigger a scanner, use one of the following methods:
-
Snowsight: Navigate to Trust Center > Manage Scanners, select the three-dot menu for the scanner, and then select Run Scanner.
For more information, see Run a scanner package on demand.
-
SQL: Call the
EXECUTE_SCANNERstored procedure. For example:
Interpret the notification output¶
When a Trust Center scanner runs and produces findings that meet the configured severity threshold, the notification message contains a JSON object similar to the following:
Note
The above is an example. The actual payload differs based on the notification integration configured. The at_risk_entities and metadata fields are included in the notification message only when INCLUDE_AT_RISK_ENTITIES_AND_FINDING_METADATA is enabled.
The JSON object contains the following key-value pairs:
| Key | Description |
|---|---|
scanner_name | Name of the scanner that produced the findings. |
scanner_package_name | Name of the scanner package containing the scanner. |
scanner_package_short_description | Short description of the scanner package. |
scanner_short_description | Short description of the scanner. |
scanner_finish_time_unix_timestamp_ms | Unix timestamp (in milliseconds) when the scanner finished running. |
scanner_finish_time_formatted | Human-readable formatted date and time when the scanner finished running. |
findings | Array of finding objects. Each finding object contains the following fields. |
| Finding field | Description |
|---|---|
event_id | Unique identifier for the event. |
finding_identifier | Identifier for the finding. Can be used for deduplication. |
finding_severity | Severity level of the finding. |
at_risk_entities | Array of at-risk entity objects. Each entity contains entity_detail, entity_id, entity_name, and entity_object_type. This field might be excluded or truncated. |
total_at_risk_count | Total number of at-risk entities. This field might be excluded. |
metadata | Additional metadata. The structure depends on the scanner. This field might be excluded. |
note | A note indicating whether the list of at-risk entities has been truncated. This field is present only when truncation occurs to meet the size limit constraints. If truncated, you can retrieve the full list of at-risk entities by querying the Trust Center findings. |
Troubleshoot notification issues¶
If notifications are not being delivered as expected, you can query the following to examine the notification sending flow.
To check notifications sent through the notification platform:
To check scanner notifications sent through Trust Center:
Test notifications that you send with SEND_TEST_NOTIFICATION_INTEGRATION also
appear in SNOWFLAKE.TRUST_CENTER.NOTIFICATION_HISTORY, recorded with a TEST finding identifier, so you can
confirm that a test was recorded.