Helpers
psengine.stix2.helpers
¶
SIMPLE_ENTITY_MAP
module-attribute
¶
SIMPLE_ENTITY_MAP = {
'MitreAttackIdentifier': TTP,
'Company': Identity,
'Person': Identity,
'Organization': Identity,
'Malware': Malware,
'CyberVulnerability': Vulnerability,
}
convert_entity
¶
convert_entity(
name: str,
entity_type: str,
create_indicator: bool = True,
create_obs: bool = False,
**kwargs,
) -> Union[
IndicatorEntity, Identity, Malware, Vulnerability, TTP
]
Convert an RF entity to STIX2.
PARAMETER | DESCRIPTION |
---|---|
name
|
The name of the entity.
TYPE:
|
entity_type
|
The Recorded Future type of entity.
TYPE:
|
create_indicator
|
A flag to determine if an indicator should be created.
TYPE:
|
create_obs
|
A flag to determine if an observable should be created.
TYPE:
|
RAISES | DESCRIPTION |
---|---|
STIX2TransformError
|
If an invalid keyword argument is passed in |
UnsupportedConversionTypeError
|
If the provided entity type is unsupported for conversion. |
RETURNS | DESCRIPTION |
---|---|
Union[IndicatorEntity, Identity, Malware, Vulnerability, TTP]
|
An instance of a corresponding STIX2 entity based on the provided entity type. |