threat_models
Creates, updates, deletes, gets or lists a threat_models resource.
Overview
| Name | threat_models |
| Type | Resource |
| Id | aws.securityagent.threat_models |
Fields
The following fields are returned by SELECT queries:
- batch_get_threat_models
- list_threat_models
| Name | Datatype | Description |
|---|---|---|
not_found | array | List of threat model IDs. |
threat_models | array | The list of threat models that were found. |
| Name | Datatype | Description |
|---|---|---|
agent_space_id | string | The unique identifier of the agent space that contains the threat model. |
created_at | string (date-time) | The date and time the threat model was created, in UTC format. |
threat_model_id | string | The unique identifier of the threat model. |
title_ | string | The title of the threat model. |
updated_at | string (date-time) | The date and time the threat model was last updated, in UTC format. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
batch_get_threat_models | select | region | Retrieves information about one or more threat models in an agent space. | |
list_threat_models | select | region | Returns a paginated list of threat model summaries for the specified agent space. | |
create_threat_model | insert | region, title, agentSpaceId, serviceRole | Creates a new threat model configuration in an agent space. A threat model defines the parameters for automated threat analysis. | |
update_threat_model | update | region, threatModelId, agentSpaceId | Updates an existing threat model configuration. | |
batch_delete_threat_models | exec | region, threatModelIds, agentSpaceId | Deletes one or more threat models from an agent space. | |
start_threat_model_job | exec | region, agentSpaceId, threatModelId | Starts a new threat model job for a threat model configuration. | |
stop_threat_model_job | exec | region, agentSpaceId, threatModelJobId | Stops a running threat model job. |
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) |
SELECT examples
- batch_get_threat_models
- list_threat_models
Retrieves information about one or more threat models in an agent space.
SELECT
not_found,
threat_models
FROM aws.securityagent.threat_models
WHERE region = '{{ region }}' -- required
;
Returns a paginated list of threat model summaries for the specified agent space.
SELECT
agent_space_id,
created_at,
threat_model_id,
title_,
updated_at
FROM aws.securityagent.threat_models
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_threat_model
- Manifest
Creates a new threat model configuration in an agent space. A threat model defines the parameters for automated threat analysis.
INSERT INTO aws.securityagent.threat_models (
title,
agentSpaceId,
description,
assets,
scopeDocs,
serviceRole,
logConfig,
reportDestination,
region
)
SELECT
'{{ title }}' /* required */,
'{{ agentSpaceId }}' /* required */,
'{{ description }}',
'{{ assets }}',
'{{ scopeDocs }}',
'{{ serviceRole }}' /* required */,
'{{ logConfig }}',
'{{ reportDestination }}',
'{{ region }}'
RETURNING
agent_space_id,
assets,
created_at,
description,
log_config,
scope_docs,
service_role,
threat_model_id,
title_,
updated_at
;
# Description fields are for documentation purposes
- name: threat_models
props:
- name: region
value: "{{ region }}"
description: Required parameter for the threat_models resource.
- name: title
value: "{{ title }}"
- name: agentSpaceId
value: "{{ agentSpaceId }}"
- name: description
value: "{{ description }}"
- name: assets
description: |
The collection of assets used in a pentest configuration, including endpoints, actors, documents, source code repositories, and integrated repositories.
value:
endpoints:
- uri: "{{ uri }}"
actors:
- identifier: "{{ identifier }}"
uris: "{{ uris }}"
authentication:
providerType: "{{ providerType }}"
value: "{{ value }}"
description: "{{ description }}"
enableEmailMfa: {{ enableEmailMfa }}
mfaForwardingAddress: "{{ mfaForwardingAddress }}"
documents:
- s3Location: "{{ s3Location }}"
artifactId: "{{ artifactId }}"
integratedDocument:
integrationId: "{{ integrationId }}"
resourceId: "{{ resourceId }}"
sourceCode:
- s3Location: "{{ s3Location }}"
integratedRepositories:
- integrationId: "{{ integrationId }}"
providerResourceId: "{{ providerResourceId }}"
branch: "{{ branch }}"
- name: scopeDocs
value:
- s3Location: "{{ s3Location }}"
artifactId: "{{ artifactId }}"
integratedDocument:
integrationId: "{{ integrationId }}"
resourceId: "{{ resourceId }}"
- name: serviceRole
value: "{{ serviceRole }}"
description: |
ARN of an IAM role that the service can assume to access customer resources.
- name: logConfig
description: |
The Amazon CloudWatch Logs configuration for pentest job logging.
value:
logGroup: "{{ logGroup }}"
logStream: "{{ logStream }}"
- name: reportDestination
description: |
Destination for publishing scan reports to an integrated document provider.
value:
integrationId: "{{ integrationId }}"
containerId: "{{ containerId }}"
parentId: "{{ parentId }}"
documentId: "{{ documentId }}"
UPDATE examples
- update_threat_model
Updates an existing threat model configuration.
UPDATE aws.securityagent.threat_models
SET
threatModelId = '{{ threatModelId }}',
agentSpaceId = '{{ agentSpaceId }}',
title = '{{ title }}',
description = '{{ description }}',
assets = '{{ assets }}',
scopeDocs = '{{ scopeDocs }}',
serviceRole = '{{ serviceRole }}',
logConfig = '{{ logConfig }}'
WHERE
region = '{{ region }}' --required
AND threatModelId = '{{ threatModelId }}' --required
AND agentSpaceId = '{{ agentSpaceId }}' --required
RETURNING
agent_space_id,
assets,
created_at,
description,
log_config,
scope_docs,
service_role,
threat_model_id,
title_,
updated_at;
Lifecycle Methods
- batch_delete_threat_models
- start_threat_model_job
- stop_threat_model_job
Deletes one or more threat models from an agent space.
EXEC aws.securityagent.threat_models.batch_delete_threat_models
@region='{{ region }}' --required
@@json=
'{
"threatModelIds": "{{ threatModelIds }}",
"agentSpaceId": "{{ agentSpaceId }}"
}'
;
Starts a new threat model job for a threat model configuration.
EXEC aws.securityagent.threat_models.start_threat_model_job
@region='{{ region }}' --required
@@json=
'{
"agentSpaceId": "{{ agentSpaceId }}",
"threatModelId": "{{ threatModelId }}"
}'
;
Stops a running threat model job.
EXEC aws.securityagent.threat_models.stop_threat_model_job
@region='{{ region }}' --required
@@json=
'{
"agentSpaceId": "{{ agentSpaceId }}",
"threatModelJobId": "{{ threatModelJobId }}"
}'
;