Skip to content

aws.codeguru_security.get_findings

Example SQL Queries

SELECT * FROM
aws.codeguru_security.get_findings
WHERE
"scan_name" = 'VALUE';

Description

Returns a list of all findings generated by a particular scan.

Table Definition

Column NameColumn Data Type
scan_name Required Input Column

The name of the scan you want to retrieve findings from.

VARCHAR
status Input Column

The status of the finding. A finding status can be open or closed.

VARCHAR
_aws_profile Input Column

The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role.

STRUCT(
"type" VARCHAR,
"name" VARCHAR,
"account_id" VARCHAR,
"via_profile_name" VARCHAR,
"assumed_role_arn" VARCHAR,
"organization" STRUCT(
"account_name" VARCHAR,
"id" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"master_account" STRUCT(
"id" VARCHAR,
"email" VARCHAR
),
"parents" STRUCT(
"type" VARCHAR,
"id" VARCHAR,
"name" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)[]
)
)
Show child fields
_aws_profile.account_id

The AWS account id

_aws_profile.assumed_role_arn

The ARN of the assumed role

_aws_profile.name

The unique name of the profile.

_aws_profile.organization

Information about this profile's membership in the AWS organization.

Show child fields
_aws_profile.organization.account_name

The name of account speciifed by the organization

_aws_profile.organization.id

The organization id

_aws_profile.organization.master_account
Show child fields
_aws_profile.organization.master_account.email

The organization master account email address

_aws_profile.organization.master_account.id

The organization master account id

_aws_profile.organization.parents[]
Show child fields
_aws_profile.organization.parents[].id

The id of the parent

_aws_profile.organization.parents[].name

The name of the parent

_aws_profile.organization.parents[].tags[]
Show child fields
_aws_profile.organization.parents[].tags[].key
_aws_profile.organization.parents[].tags[].value
_aws_profile.organization.parents[].type

The type of parent can be an organization unit or a root

_aws_profile.organization.tags[]
Show child fields
_aws_profile.organization.tags[].key
_aws_profile.organization.tags[].value
_aws_profile.type

The type of profile, either 'credentials' or 'assumed_role'

_aws_profile.via_profile_name

This IAM role for this profile is assumed by first utilizing another profile with this name to obtain credentials.

created_at

The time when the finding was created.

TIMESTAMP_S
description

A description of the finding.

VARCHAR
detector_id

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.

VARCHAR
detector_name

The name of the detector that identified the security vulnerability in your code.

VARCHAR
detector_tags

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.

VARCHAR[]
Show child fields
detector_tags[]
generator_id

The identifier for the component that generated a finding such as AmazonCodeGuruSecurity.

VARCHAR
id

The identifier for a finding.

VARCHAR
remediation

An object that contains the details about how to remediate a finding.

STRUCT(
"recommendation" STRUCT(
"text" VARCHAR,
"url" VARCHAR
),
"suggested_fixes" STRUCT(
"code" VARCHAR,
"description" VARCHAR
)[]
)
Show child fields
remediation.recommendation

An object that contains information about the recommended course of action to remediate a finding.

Show child fields
remediation.recommendation.text

The recommended course of action to remediate the finding.

remediation.recommendation.url

The URL address to the recommendation for remediating the finding.

remediation.suggested_fixes[]
Show child fields
remediation.suggested_fixes[].code

The suggested code fix. If applicable, includes code patch to replace your source code.

remediation.suggested_fixes[].description

A description of the suggested code fix and why it is being suggested.

resource

The resource where Amazon CodeGuru Security detected a finding.

STRUCT(
"id" VARCHAR,
"sub_resource_id" VARCHAR
)
Show child fields
resource.id

The scanName of the scan that was run on the resource.

resource.sub_resource_id

The identifier for a section of the resource.

rule_id

The identifier for the rule that generated the finding.

VARCHAR
severity

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.

VARCHAR
title

The title of the finding.

VARCHAR
type

The type of finding.

VARCHAR
updated_at

The time when the finding was last updated. Findings are updated when you remediate them or when the finding code location changes.

TIMESTAMP_S
vulnerability

An object that describes the detected security vulnerability.

STRUCT(
"file_path" STRUCT(
"code_snippet" STRUCT(
"content" VARCHAR,
"number" BIGINT
)[],
"end_line" BIGINT,
"name" VARCHAR,
"path" VARCHAR,
"start_line" BIGINT
),
"id" VARCHAR,
"item_count" BIGINT,
"reference_urls" VARCHAR[],
"related_vulnerabilities" VARCHAR[]
)
Show child fields
vulnerability.file_path

An object that describes the location of the detected security vulnerability in your code.

Show child fields
vulnerability.file_path.code_snippet[]
Show child fields
vulnerability.file_path.code_snippet[].content

The code that contains a vulnerability.

vulnerability.file_path.code_snippet[].number

The code line number.

vulnerability.file_path.end_line

The last line number of the code snippet where the security vulnerability appears in your code.

vulnerability.file_path.name

The name of the file.

vulnerability.file_path.path

The path to the resource with the security vulnerability.

vulnerability.file_path.start_line

The first line number of the code snippet where the security vulnerability appears in your code.

vulnerability.id

The identifier for the vulnerability.

vulnerability.item_count

The number of times the vulnerability appears in your code.

vulnerability.reference_urls[]
vulnerability.related_vulnerabilities[]