Lists an organization or source's findings. To list across all sources provide a -
as the source id. Example: /v1/organizations/{organization_id}/sources/-/findings
Scopes
You will need authorization for the https://www.googleapis.com/auth/cloud-platform scope to make a valid call.
If unset, the scope for this method defaults to https://www.googleapis.com/auth/cloud-platform.
You can set the scope for this method like this: securitycenter1 --scope <scope> folders sources-findings-list ...
Required Scalar Argument
- <parent> (string)
- Required. Name of the source the findings belong to. Its format is "organizations/[organization_id]/sources/[source_id], folders/[folder_id]/sources/[source_id], or projects/[project_id]/sources/[source_id]". To list across all sources provide a source_id of
-
. For example: organizations/{organization_id}/sources/-, folders/{folder_id}/sources/- or projects/{projects_id}/sources/-
- Required. Name of the source the findings belong to. Its format is "organizations/[organization_id]/sources/[source_id], folders/[folder_id]/sources/[source_id], or projects/[project_id]/sources/[source_id]". To list across all sources provide a source_id of
Optional Output Flags
The method's return value a JSON encoded structure, which will be written to standard output by default.
- -o out
- out specifies the destination to which to write the server's result to.
It will be a JSON-encoded structure.
The destination may be
-
to indicate standard output, or a filepath that is to contain the received bytes. If unset, it defaults to standard output.
- out specifies the destination to which to write the server's result to.
It will be a JSON-encoded structure.
The destination may be
Optional Method Properties
You may set the following properties to further configure the call. Please note that -p
is followed by one
or more key-value-pairs, and is called like this -p k1=v1 k2=v2
even though the listing below repeats the
-p
for completeness.
-
-p compare-duration=string
- When compare_duration is set, the ListFindingsResult'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 in any state 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: * "CHANGED": indicates that the finding was present and matched the given filter at the start of compare_duration, but changed its state at read_time. * "UNCHANGED": indicates that the finding was present and matched the given filter at the start of compare_duration and did not change state at read_time. * "ADDED": indicates that the finding did not match the given filter or was not present at the start of compare_duration, but was present at read_time. * "REMOVED": indicates that the finding was present and matched the filter at the start of compare_duration, but did not match the filter at read_time. 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.
-
-p field-mask=string
- A field mask to specify the Finding fields to be listed in the response. An empty field mask will list all fields.
-
-p filter=string
- Expression that defines the filter to apply across findings. The expression is a list of one or more restrictions combined via logical operators
AND
andOR
. Parentheses are supported, andOR
has higher precedence thanAND
. Restrictions have the formand 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: *=
for all value types. *>
,<
,>=
,<=
for integer values. *:
, meaning substring matching, for strings. The supported value types are: * string literals in quotes. * integer literals without quotes. * boolean literalstrue
andfalse
without quotes. The following field and operator combinations are supported: * name:=
* parent:=
,:
* resource_name:=
,:
* state:=
,:
* category:=
,:
* external_uri:=
,:
* event_time:=
,>
,<
,>=
,<=
Usage: This should be milliseconds since epoch or an RFC3339 string. Examples:event_time = "2019-06-10T16:07:18-07:00"
event_time = 1560208038000
* severity:=
,:
* workflow_state:=
,:
* security_marks.marks:=
,:
* source_properties:=
,:
,>
,<
,>=
,<=
For example,source_properties.size = 100
is a valid filter string. Use a partial match on the empty string to filter based on a property existing:source_properties.my_property : ""
Use a negated partial match on the empty string to filter based on a property not existing:-source_properties.my_property : ""
* resource: * resource.name:=
,:
* resource.parent_name:=
,:
* resource.parent_display_name:=
,:
* resource.project_name:=
,:
* resource.project_display_name:=
,:
* resource.type:=
,:
* resource.folders.resource_folder:=
,:
* resource.display_name:=
,:
- Expression that defines the filter to apply across findings. The expression is a list of one or more restrictions combined via logical operators
-
-p order-by=string
- Expression that defines what fields and order to use for sorting. The string value should follow SQL syntax: comma separated list of fields. For example: "name,resource_properties.a_property". The default sorting order is ascending. To specify descending order for a field, a suffix " desc" should be appended to the field name. For example: "name desc,source_properties.a_property". Redundant space characters in the syntax are insignificant. "name desc,source_properties.a_property" and " name desc , source_properties.a_property " are equivalent. The following fields are supported: name parent state category resource_name event_time source_properties security_marks.marks
-
-p page-size=integer
- The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.
-
-p page-token=string
- The value returned by the last
ListFindingsResponse
; indicates that this is a continuation of a priorListFindings
call, and that the system should return the next page of data.
- The value returned by the last
-
-p read-time=string
- Time used as a reference point when filtering findings. The filter is limited to findings existing at the supplied time and their values are those at that specific time. Absence of this field will default to the API's version of NOW.
Optional General Properties
The following properties can configure any call, and are not specific to this method.
-
-p $-xgafv=string
- V1 error format.
-
-p access-token=string
- OAuth access token.
-
-p alt=string
- Data format for response.
-
-p callback=string
- JSONP
-
-p fields=string
- Selector specifying which fields to include in a partial response.
-
-p key=string
- API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
-
-p oauth-token=string
- OAuth 2.0 token for the current user.
-
-p pretty-print=boolean
- Returns response with indentations and line breaks.
-
-p quota-user=string
- Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
-
-p upload-type=string
- Legacy upload protocol for media (e.g. "media", "multipart").
-
-p upload-protocol=string
- Upload protocol for media (e.g. "raw", "multipart").