findings
Creates, updates, deletes, gets or lists a findings resource.
Overview
| Name | findings |
| Type | Resource |
| Id | aws.codeguru_security.findings |
Fields
The following fields are returned by SELECT queries:
- batch_get_findings
- get_findings
| Name | Datatype | Description |
|---|---|---|
failed_findings | array | A list of errors for individual findings which were not fetched. Each BatchGetFindingsError contains the scanName, findingId, errorCode and error message. |
findings | array | A list of all findings which were successfully fetched. |
| Name | Datatype | Description |
|---|---|---|
id | string | The identifier for a finding. |
created_at | string (date-time) | The time when the finding was created. |
description | string | A description of the finding. |
detector_id | string | The identifier for the detector that detected the finding in your code. A detector is a defined rule based on industry standards and AWS best practices. |
detector_name | string | The name of the detector that identified the security vulnerability in your code. |
detector_tags | array | One or more tags or categorizations that are associated with a detector. These tags are defined by type, programming language, or other classification such as maintainability or consistency. |
generator_id | string | The identifier for the component that generated a finding such as AmazonCodeGuruSecurity. |
remediation | object | An object that contains the details about how to remediate a finding. |
resource | object | The resource where Amazon CodeGuru Security detected a finding. |
rule_id | string | The identifier for the rule that generated the finding. |
severity | string | The severity of the finding. Severity can be critical, high, medium, low, or informational. For information on severity levels, see Finding severity in the Amazon CodeGuru Security User Guide. (Critical, High, Medium, Low, Info) |
status | string | The status of the finding. A finding status can be open or closed. (Closed, Open, All) |
title_ | string | The title of the finding. |
type_ | string | The type of finding. |
updated_at | string (date-time) | The time when the finding was last updated. Findings are updated when you remediate them or when the finding code location changes. |
vulnerability | object | An object that describes the detected security vulnerability. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
batch_get_findings | select | region | Returns a list of requested findings from standard scans. | |
get_findings | select | scan_name, region | nextToken, maxResults, status | Returns a list of all findings generated by a particular scan. |
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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
scan_name | string | The name of the scan you want to retrieve findings from. |
maxResults | integer | The maximum number of results to return in the response. Use this parameter when paginating results. If additional results exist beyond the number you specify, the nextToken element is returned in the response. Use nextToken in a subsequent request to retrieve additional results. If not specified, returns 1000 results. |
nextToken | string | A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request. For subsequent calls, use the nextToken value returned from the previous request to continue listing results after the first page. |
status | string | The status of the findings you want to get. Pass either Open, Closed, or All. |
SELECT examples
- batch_get_findings
- get_findings
Returns a list of requested findings from standard scans.
SELECT
failed_findings,
findings
FROM aws.codeguru_security.findings
WHERE region = '{{ region }}' -- required
;
Returns a list of all findings generated by a particular scan.
SELECT
id,
created_at,
description,
detector_id,
detector_name,
detector_tags,
generator_id,
remediation,
resource,
rule_id,
severity,
status,
title_,
type_,
updated_at,
vulnerability
FROM aws.codeguru_security.findings
WHERE scan_name = '{{ scan_name }}' -- required
AND region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
AND status = '{{ status }}'
;