File: //snap/google-cloud-cli/current/help/man/man1/gcloud_beta_scc_findings_group.1
.TH "GCLOUD_BETA_SCC_FINDINGS_GROUP" 1
.SH "NAME"
.HP
gcloud beta scc findings group \- filter an organization or source's findings and groups them by their specified properties
.SH "SYNOPSIS"
.HP
\f5gcloud beta scc findings group\fR [\fIPARENT\fR] [\fB\-\-compare\-duration\fR=\fICOMPARE_DURATION\fR] [\fB\-\-filter\fR=\fIFILTER\fR] [\fB\-\-group\-by\fR=\fIGROUP_BY\fR] [\fB\-\-location\fR=\fILOCATION\fR;\ default="global"] [\fB\-\-page\-size\fR=\fIPAGE_SIZE\fR] [\fB\-\-page\-token\fR=\fIPAGE_TOKEN\fR] [\fB\-\-read\-time\fR=\fIREAD_TIME\fR] [\fB\-\-source\fR=\fISOURCE\fR;\ default="\-"] [\fIGCLOUD_WIDE_FLAG\ ...\fR]
.SH "DESCRIPTION"
\fB(BETA)\fR To group across all sources provide a '\-' as the source id.
.SH "EXAMPLES"
Group findings under organization \f5123456\fR across all sources by their
category:
.RS 2m
$ gcloud beta scc findings group 123456 \-\-group\-by="category"
.RE
Group findings under project \f5example\-project\fR across all sources by their
category:
.RS 2m
$ gcloud beta scc findings group projects/example\-project \e
\-\-group\-by="category"
.RE
Group findings under folders \f5456\fR across all sources by their category:
.RS 2m
$ gcloud beta scc findings group folders/456 \-\-group\-by="category"
.RE
Group findings under organization \f5123456\fR and source \f55678\fR, by their
category:
.RS 2m
$ gcloud beta scc findings group 123456 \-\-source=5678 \e
\-\-group\-by="category"
.RE
Group ACTIVE findings under organization \f5123456\fR and source \f55678\fR, by
their category:
.RS 2m
$ gcloud beta scc findings group 123456 \-\-source=5678 \e
\-\-group\-by="category" \-\-filter="state=\e"ACTIVE\e""
.RE
Group findings under organization \f5123456\fR and \f5location=eu\fR across all
sources by their category:
.RS 2m
$ gcloud beta scc findings group 123456 \-\-group\-by="category" \e
\-\-location=eu
.RE
.SH "POSITIONAL ARGUMENTS"
.RS 2m
.TP 2m
Parent resource \- parent organization, folder, or project in the Google Cloud
resource hierarchy to be used for the \f5gcloud scc\fR command. Specify the
argument as either [RESOURCE_TYPE/RESOURCE_ID] or [RESOURCE_ID], as shown in the
preceding examples. This represents a Cloud resource.
.RS 2m
.TP 2m
[\fIPARENT\fR]
ID of the parent or fully qualified identifier for the parent.
To set the \f5parent\fR attribute:
.RS 2m
.IP "\(bu" 2m
provide the argument \f5parent\fR on the command line;
.IP "\(bu" 2m
Set the parent property in configuration using \f5gcloud config set
scc/parent\fR if it is not specified in command line.
.RE
.sp
.RE
.RE
.sp
.SH "FLAGS"
.RS 2m
.TP 2m
\fB\-\-compare\-duration\fR=\fICOMPARE_DURATION\fR
(DEPRECATED) When compare_duration is set, the result's "state_change" attribute
is updated to indicate whether the finding had its state changed, the finding's
state remained unchanged, or if the finding was added during the
compare_duration period of time that precedes the read_time. This is the time
between (read_time \- compare_duration) and read_time. The state_change value is
derived based on the presence and state of the finding at the two points in
time. Intermediate state changes between the two times don't affect the result.
For example, the results aren't affected if the finding is made inactive and
then active again. Possible "state_change" values when compare_duration is
specified:
.RS 2m
.IP "\(em" 2m
\'CHANGED': indicates that the finding was present at the start of
compare_duration, but changed its state at read_time.
.RE
.sp
.RS 2m
.IP "\(em" 2m
\'UNCHANGED': indicates that the finding was present at the start of
compare_duration and did not change state at read_time.
.RE
.sp
.RS 2m
.IP "\(em" 2m
\'ADDED': indicates that the finding was not present at the start of
compare_duration, but was present at read_time.
.RE
.sp
.RS 2m
.IP "\(em" 2m
\'REMOVED': indicates that the finding was present at the start of
compare_duration, but was not present at read_time.
.RE
.sp
.RS 2m
If compare_duration is not specified, then the only possible
state_change is 'UNUSED', which will be the state_change set for all
findings present at read_time. If this field is set then 'state_change'
must be a specified field in 'group_by'. See $ gcloud topic datetimes
for information on supported duration formats.
.RE
The \-\-compare\-duration option is deprecated. For more information, see the
deprecation notice
(https://cloud.google.com/security\-command\-center/docs/release\-notes#April_15_2024)
on the SCC release notes page.
.TP 2m
\fB\-\-filter\fR=\fIFILTER\fR
Expression that defines the filter to apply across findings. The expression is a
list of one or more restrictions combined via logical operators 'AND' and 'OR'.
Parentheses are supported, and 'OR' has higher precedence than 'AND'.
Restrictions have the form '<field> <operator> <value>' and may have a '\-'
character in front of them to indicate negation. Examples include: name,
source_properties.a_property, security_marks.marks.marka. The supported
operators are:
.RS 2m
.IP "\(em" 2m
\'=' for all value types.
.IP "\(em" 2m
\'>', '<', '>=', '<=' for integer values.
.IP "\(em" 2m
\':', meaning substring matching, for strings.
.RE
.sp
The supported value types are:string literals in quotes, integer literals
without quotes, boolean literals 'true' and 'false' without quotes. Some example
filters: 'source_properties.size = 100', 'category=\e"XSS\e" AND event_time >
10' etc.
.TP 2m
\fB\-\-group\-by\fR=\fIGROUP_BY\fR
Expression that defines what findings fields to use for grouping (including
\'state'). String value should follow SQL syntax: comma separated list of
fields. For example: "parent,resource_name". The following fields are supported:
.RS 2m
.IP "\(em" 2m
resource_name
.IP "\(em" 2m
category
.IP "\(em" 2m
state
.IP "\(em" 2m
parent
.RE
.sp
.TP 2m
\fB\-\-location\fR=\fILOCATION\fR; default="global"
When data residency controls are enabled, this attribute specifies the location
in which the resource is located and applicable. The \f5location\fR attribute
can be provided as part of the fully specified resource name or with the
\f5\-\-location\fR argument on the command line. The default location is
\f5global\fR.
NOTE: If you override the endpoint to a regional endpoint
(https://cloud.google.com/security\-command\-center/docs/reference/rest/index.html?rep_location=global#regional\-service\-endpoint)
you must specify the correct data location
(https://cloud.google.com/security\-command\-center/docs/data\-residency\-support#locations)
using this flag. The default location on this command is unrelated to the
default location that is specified when data residency controls are enabled for
Security Command Center.
NOTE: If no location is specified, the default location is \f5global\fR AND the
request will be routed to the SCC V1 API. To use the SCC V2 API \- please
explicitly specify the flag.
.TP 2m
\fB\-\-page\-size\fR=\fIPAGE_SIZE\fR
Maximum number of results to return in a single response. Default is 10, minimum
is 1, maximum is 1000.
.TP 2m
\fB\-\-page\-token\fR=\fIPAGE_TOKEN\fR
Response objects will return a non\-null value for page\-token to indicate that
there is at least one additional page of data. User can either directly request
that page by specifying the page\-token explicitly or let gcloud fetch
one\-page\-at\-a\-time.
.TP 2m
\fB\-\-read\-time\fR=\fIREAD_TIME\fR
(DEPRECATED) Time used as a reference point when filtering. Absence of this
field will default to the API's version of NOW. See $ gcloud topic datetimes for
information on supported time formats.
The \-\-read\-time option is deprecated. For more information, see the
deprecation notice
(https://cloud.google.com/security\-command\-center/docs/release\-notes#April_15_2024)
on the SCC release notes page.
.TP 2m
\fB\-\-source\fR=\fISOURCE\fR; default="\-"
Source id. Defaults to all sources.
.RE
.sp
.SH "GCLOUD WIDE FLAGS"
These flags are available to all commands: \-\-access\-token\-file, \-\-account,
\-\-billing\-project, \-\-configuration, \-\-flags\-file, \-\-flatten,
\-\-format, \-\-help, \-\-impersonate\-service\-account, \-\-log\-http,
\-\-project, \-\-quiet, \-\-trace\-token, \-\-user\-output\-enabled,
\-\-verbosity.
Run \fB$ gcloud help\fR for details.
.SH "API REFERENCE"
This command uses the Security Command Center API. For more information, see
Security Command Center API.
(https://cloud.google.com/security\-command\-center/docs/reference/rest)
.SH "NOTES"
This command is currently in beta and might change without notice. These
variants are also available:
.RS 2m
$ gcloud scc findings group
.RE
.RS 2m
$ gcloud alpha scc findings group
.RE