This document explains how to create and manage mute rules to automatically mute findings in Security Command Center.
Required roles
To get the permissions that you need to manage mute rules, ask your administrator to grant you the following IAM roles on the organization, folder, or project:
-
View mute rules:
- Security Center Admin Viewer (
roles/securitycenter.adminViewer) - Security Center Settings Viewer (
roles/securitycenter.settingsViewer) - Security Center Mute Configurations Viewer (
roles/securitycenter.muteConfigsViewer)
- Security Center Admin Viewer (
-
View, create, update, and delete mute rules:
- Security Center Admin (
roles/securitycenter.admin) - Security Center Admin Editor (
roles/securitycenter.adminEditor) - Security Center Settings Editor (
roles/securitycenter.settingsEditor) - Security Center Mute Configurations Editor (
roles/securitycenter.muteConfigsEditor)
- Security Center Admin (
For more information about granting roles, see Manage access to projects, folders, and organizations.
You might also be able to get the required permissions through custom roles or other predefined roles.
Create a mute rule
Your organization can create a maximum of 1,000 mute rules.
We recommend using dynamic mute rules exclusively in your mute rule configurations, because they're more flexible than static mute rules. For a comparison of mute rule types, see Types of mute rules.
To create a mute rule, click the tab for the procedure that you want to use:
Console
Define the mute rule
In the Google Cloud console, go to the Findings page.
Select an organization or project.
Click Mute options, and then select Manage mute rules.
Click Create mute rule.
Enter a Mute rule ID.
Recommended: Enter a Description that provides context for why findings are muted.
To confirm the scope of the mute rule, check the Parent resource value.
Optional: Add an expiration date
You can add an expiration date to dynamic mute rules.
- Select Mute matching findings temporarily.
To configure the expiration date for the dynamic mute rule, select the calendar and choose a date and time at least 24 hours in the future.
After the expiration date, the mute rule has no effect.
Optional: Limit the mute rule with a query
If you add a query, then the mute rule applies only to findings that match the query.
To limit the mute rule with a query, in the Findings query section, click Add filter.
The Add filter menu lets you choose supported finding attributes and values.
- In the Select filter menu, select a finding attribute or type its name in the Search finding attributes box. A list of the available sub-attributes displays.
- Select a sub-attribute. A selection field displays where you can build the query statement using the sub-attribute you selected, a query operator, and one or more values for the sub-attribute.
-
Select the operator and one or more values for the sub-attribute from the panel. For more information about query operators and functions that they use, see Query operators in the Add filters menu.
If you want to start over, click Reset.
-
Click Apply.
The menu closes and your query is updated.
- Repeat until the findings query contains all the attributes you want.
If the query doesn't match the correct findings, then revise the query as needed and preview the findings again. Repeat this step until you're satisfied with the results.
Save the mute rule
Click Save. The Google Cloud console shows a list of your mute rules.
gcloud
-
In the Google Cloud console, activate Cloud Shell.
At the bottom of the Google Cloud console, a Cloud Shell session starts and displays a command-line prompt. Cloud Shell is a shell environment with the Google Cloud CLI already installed and with values already set for your current project. It can take a few seconds for the session to initialize.
To create mute rules, run the
gcloud scc muteconfigs createcommand:gcloud scc muteconfigs create CONFIG_ID \ --PARENT=PARENT_ID \ --location=LOCATION \ --description="RULE_DESCRIPTION" \ --filter="FILTER" \ --type=MUTE_TYPE \ --expiry-time=TIMESTAMP
Replace the following:
CONFIG_ID: the name of the mute rule. The ID must use alphanumeric characters and hyphens and be between 1 and 63 characters.PARENT: the scope in the resource hierarchy to which the mute rule applies,organization,folder, orproject.PARENT_ID: the numeric ID of the parent organization, folder, or project, or the alphanumeric ID of the parent project.LOCATION: the Security Command Center location in which to manage mute rules; if data residency is enabled, useeu,sa, orus; otherwise, use the valueglobal.RULE_DESCRIPTION: a description of the mute rule of no more than 1,024 characters.FILTER: the expression you define to filter findings. For example, to muteOPEN_FIREWALLfindings, your filter can beFILTER="category=\"OPEN_FIREWALL\"".MUTE_TYPE: the type of mute rule you want to create. Valid mute rule types areDYNAMICandSTATIC. The mute rule type is set toSTATICby default. You can't change the type of a mute rule after you've created it.TIMESTAMP: only applies if you are creating a dynamic mute rule. The date and time string that indicates when the dynamic mute rule expires. The value must be set to at least one day in the future or the request will be rejected. For information about time formats, seegcloud topic datetimes. When a dynamic mute rule expires, it is removed from all matched findings. To have the dynamic mute rule act indefinitely on matching findings, omit this field.
The response includes the mute rule ID, which you can use to view, update, and delete mute rules, as described in Manage mute rules.
Terraform
Create a mute rule for an organization:
Create a mute rule for a folder:
Create a mute rule for a project: