Skip to main content

security_findings

Creates, updates, deletes, gets or lists a security_findings resource.

Overview

Namesecurity_findings
TypeResource
Iddatadog.security.security_findings

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe unique ID of the security finding. (example: ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==)
attributesobjectThe JSON object containing all attributes of the security finding.
typestringThe type of the security finding resource. (finding) (default: finding, example: finding)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_security_findingsselectfilter[query], page[cursor], page[limit], sortGet a list of security findings that match a search query. [See the schema for security findings](https:​//docs.datadoghq.com/security/guide/findings-schema/).<br /><br />### Query Syntax<br /><br />This endpoint uses the logs query syntax. Findings attributes (living in the attributes.attributes. namespace) are prefixed by @ when queried. Tags are queried without a prefix.<br /><br />Example: @severity:(critical OR high) @status:open team:platform
update_findings_assigneeexecdataAssign or unassign security findings.<br />You can assign up to 100 security findings per request. Set assignee_id to the unique identifier of the Datadog user you want to assign the findings to. Omit assignee_id (or set it to null) to unassign the findings. Per-finding warnings and failures are returned in the response meta object.
search_security_findingsexecGet a list of security findings that match a search query. [See the schema for security findings](https:​//docs.datadoghq.com/security/guide/findings-schema/).<br /><br />### Query Syntax<br /><br />The API uses the logs query syntax. Findings attributes (living in the attributes.attributes. namespace) are prefixed by @ when queried. Tags are queried without a prefix.<br /><br />Example: @severity:(critical OR high) @status:open team:platform

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
sitestringThe Datadog site (region) for your organization, for example datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, ap1.datadoghq.com, ap2.datadoghq.com, datadoghq.eu, ddog-gov.com. Resolved from the DD_SITE environment variable when set. Optional: defaults to datadoghq.com, or the value of the DD_SITE environment variable when set; a WHERE value overrides both.
filter[query]stringThe search query following log search syntax. (example: @severity:(critical OR high) @status:open team:platform)
page[cursor]stringGet the next page of results with a cursor provided in the previous query. (example: eyJhZnRlciI6IkF3QUFBWnPcm1pd0FBQUJbVlBQUKBa1pqRTVdZUzSTBNemN0YWiIsLTE3Mjk0MzYwMjFdfQ==)
page[limit]integer (int64)The maximum number of findings in the response. (example: 25)
sortstringSorts by @detection_changed_at.

SELECT examples

Get a list of security findings that match a search query. [See the schema for security findings](https:​//docs.datadoghq.com/security/guide/findings-schema/).<br /><br />### Query Syntax<br /><br />This endpoint uses the logs query syntax. Findings attributes (living in the attributes.attributes. namespace) are prefixed by @ when queried. Tags are queried without a prefix.<br /><br />Example: @severity:(critical OR high) @status:open team:platform

SELECT
id,
attributes,
type
FROM datadog.security.security_findings
WHERE filter[query] = '{{ filter[query] }}'
AND page[cursor] = '{{ page[cursor] }}'
AND page[limit] = '{{ page[limit] }}'
AND sort = '{{ sort }}'
;

Lifecycle Methods

EXEC variables use wire (API) names.

Assign or unassign security findings.<br />You can assign up to 100 security findings per request. Set assignee_id to the unique identifier of the Datadog user you want to assign the findings to. Omit assignee_id (or set it to null) to unassign the findings. Per-finding warnings and failures are returned in the response meta object.

EXEC datadog.security.security_findings.update_findings_assignee
@@json=
'{
"data": "{{ data }}"
}'
;