SecurityAgent / Client / create_threat
create_threatΒΆ
- SecurityAgent.Client.create_threat(**kwargs)ΒΆ
Creates a new threat under a threat model job.
See also: AWS API Documentation
Request Syntax
response = client.create_threat( agentSpaceId='string', threatJobId='string', title='string', statement='string', severity='CRITICAL'|'HIGH'|'MEDIUM'|'LOW'|'INFO', comments='string', stride=[ 'SPOOFING'|'TAMPERING'|'REPUDIATION'|'INFORMATION_DISCLOSURE'|'DENIAL_OF_SERVICE'|'ELEVATION_OF_PRIVILEGE', ], threatSource='string', prerequisites='string', threatAction='string', threatImpact='string', impactedGoal=[ 'string', ], impactedAssets=[ 'string', ], anchor={ 'kind': 'string', 'id': 'string', 'packageId': 'string' }, evidence=[ { 'packageId': 'string', 'path': 'string' }, ], recommendation='string' )
- Parameters:
agentSpaceId (string) β
[REQUIRED]
The unique identifier of the agent space.
threatJobId (string) β
[REQUIRED]
The unique identifier of the threat model job the threat belongs to.
title (string) β A short title summarizing the threat.
statement (string) β The natural-language threat statement.
severity (string) β The severity level of the threat.
comments (string) β Optional customer comment on the threat.
stride (list) β
The STRIDE categories applicable to this threat.
(string) β
STRIDE threat classification category.
threatSource (string) β The actor or origin of the threat.
prerequisites (string) β The conditions required for the threat to be exploitable.
threatAction (string) β What the threat source can do.
threatImpact (string) β The direct consequence of the threat action.
impactedGoal (list) β
The security goals affected by the threat.
(string) β
impactedAssets (list) β
The specific assets affected by the threat.
(string) β
anchor (dict) β
The DFD element this threat is anchored to.
kind (string) β
The kind of DFD element.
id (string) β
The identifier of the DFD element.
packageId (string) β
The package identifier containing the DFD element.
evidence (list) β
The source code files supporting the threat.
(dict) β
Source code file supporting a threat.
packageId (string) β
The package identifier containing the evidence file.
path (string) β
The file path of the evidence.
recommendation (string) β The recommended mitigation guidance for this threat.
- Return type:
dict
- Returns:
Response Syntax
{ 'threatId': 'string', 'threatJobId': 'string', 'title': 'string', 'statement': 'string', 'severity': 'CRITICAL'|'HIGH'|'MEDIUM'|'LOW'|'INFO', 'status': 'OPEN'|'RESOLVED'|'DISMISSED', 'comments': 'string', 'stride': [ 'SPOOFING'|'TAMPERING'|'REPUDIATION'|'INFORMATION_DISCLOSURE'|'DENIAL_OF_SERVICE'|'ELEVATION_OF_PRIVILEGE', ], 'threatSource': 'string', 'prerequisites': 'string', 'threatAction': 'string', 'threatImpact': 'string', 'impactedGoal': [ 'string', ], 'impactedAssets': [ 'string', ], 'anchor': { 'kind': 'string', 'id': 'string', 'packageId': 'string' }, 'evidence': [ { 'packageId': 'string', 'path': 'string' }, ], 'recommendation': 'string', 'createdBy': 'CUSTOMER'|'AGENT', 'updatedBy': 'CUSTOMER'|'AGENT', 'createdAt': datetime(2015, 1, 1), 'updatedAt': datetime(2015, 1, 1) }
Response Structure
(dict) β
Output for the CreateThreat operation.
threatId (string) β
The unique identifier of the created threat.
threatJobId (string) β
The unique identifier of the threat model job the threat belongs to.
title (string) β
A short title summarizing the threat.
statement (string) β
The natural-language threat statement.
severity (string) β
The severity level of the threat.
status (string) β
The current status of the threat.
comments (string) β
Optional customer comment on the threat.
stride (list) β
The STRIDE categories applicable to this threat.
(string) β
STRIDE threat classification category.
threatSource (string) β
The actor or origin of the threat.
prerequisites (string) β
The conditions required for the threat to be exploitable.
threatAction (string) β
What the threat source can do.
threatImpact (string) β
The direct consequence of the threat action.
impactedGoal (list) β
The security goals affected by the threat.
(string) β
impactedAssets (list) β
The specific assets affected by the threat.
(string) β
anchor (dict) β
The DFD element this threat is anchored to.
kind (string) β
The kind of DFD element.
id (string) β
The identifier of the DFD element.
packageId (string) β
The package identifier containing the DFD element.
evidence (list) β
The source code files supporting the threat.
(dict) β
Source code file supporting a threat.
packageId (string) β
The package identifier containing the evidence file.
path (string) β
The file path of the evidence.
recommendation (string) β
The recommended mitigation guidance for this threat.
createdBy (string) β
Who created this threat.
updatedBy (string) β
Who last updated this threat.
createdAt (datetime) β
The date and time the threat was created, in UTC format.
updatedAt (datetime) β
The date and time the threat was last updated, in UTC format.