Skip to main content

threats

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

Overview

Namethreats
TypeResource
Idaws.securityagent.threats

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
not_foundarrayList of threat IDs.
threatsarrayThe list of threats that were found.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
batch_get_threatsselectregionRetrieves information about one or more threats.
list_threatsselectregionReturns a paginated list of threats for a threat model job.
create_threatinsertregion, agentSpaceId, threatJobIdCreates a new threat under a threat model job.
update_threatupdateregion, threatId, agentSpaceIdUpdates a threat.

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
regionstringAWS region (default: us-east-1)

SELECT examples

Retrieves information about one or more threats.

SELECT
not_found,
threats
FROM aws.securityagent.threats
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a new threat under a threat model job.

INSERT INTO aws.securityagent.threats (
agentSpaceId,
threatJobId,
title,
statement,
severity,
comments,
stride,
threatSource,
prerequisites,
threatAction,
threatImpact,
impactedGoal,
impactedAssets,
anchor,
evidence,
recommendation,
region
)
SELECT
'{{ agentSpaceId }}' /* required */,
'{{ threatJobId }}' /* required */,
'{{ title }}',
'{{ statement }}',
'{{ severity }}',
'{{ comments }}',
'{{ stride }}',
'{{ threatSource }}',
'{{ prerequisites }}',
'{{ threatAction }}',
'{{ threatImpact }}',
'{{ impactedGoal }}',
'{{ impactedAssets }}',
'{{ anchor }}',
'{{ evidence }}',
'{{ recommendation }}',
'{{ region }}'
RETURNING
anchor,
comments,
created_at,
created_by,
evidence,
impacted_assets,
impacted_goal,
prerequisites,
recommendation,
severity,
statement,
status,
stride,
threat_action,
threat_id,
threat_impact,
threat_job_id,
threat_source,
title_,
updated_at,
updated_by
;

UPDATE examples

Updates a threat.

UPDATE aws.securityagent.threats
SET
threatId = '{{ threatId }}',
agentSpaceId = '{{ agentSpaceId }}',
title = '{{ title }}',
status = '{{ status }}',
comments = '{{ comments }}',
statement = '{{ statement }}',
severity = '{{ severity }}',
threatSource = '{{ threatSource }}',
prerequisites = '{{ prerequisites }}',
threatAction = '{{ threatAction }}',
threatImpact = '{{ threatImpact }}',
impactedGoal = '{{ impactedGoal }}',
impactedAssets = '{{ impactedAssets }}',
anchor = '{{ anchor }}',
evidence = '{{ evidence }}',
recommendation = '{{ recommendation }}'
WHERE
region = '{{ region }}' --required
AND threatId = '{{ threatId }}' --required
AND agentSpaceId = '{{ agentSpaceId }}' --required
RETURNING
anchor,
comments,
created_at,
created_by,
evidence,
impacted_assets,
impacted_goal,
prerequisites,
recommendation,
severity,
statement,
status,
stride,
threat_action,
threat_id,
threat_impact,
threat_job_id,
threat_source,
title_,
updated_at,
updated_by;