create_threat
¶
create_threat(
agent_space_id: str,
threat_job_id: str,
*,
config_overrides: Optional[SecurityAgentClientConfig] = None,
title: Optional[str] = None,
statement: Optional[str] = None,
severity: Optional[ThreatSeverity] = None,
comments: Optional[str] = None,
stride: Optional[StrideCategoryList] = None,
threat_source: Optional[str] = None,
prerequisites: Optional[str] = None,
threat_action: Optional[str] = None,
threat_impact: Optional[str] = None,
impacted_goal: Optional[StringList] = None,
impacted_assets: Optional[StringList] = None,
anchor: Optional[ThreatAnchorShape] = None,
evidence: Optional[ThreatEvidenceList] = None,
recommendation: Optional[str] = None,
) -> CreateThreatOutput
Creates a new threat under a threat model job.
Parameters:
-
agent_space_id(str) –The unique identifier of the agent space.
-
threat_job_id(str) –The unique identifier of the threat model job the threat belongs to.
-
title(Optional[str], default:None) –A short title summarizing the threat.
-
statement(Optional[str], default:None) –The natural-language threat statement.
-
severity(Optional[ThreatSeverity], default:None) –The severity level of the threat.
-
comments(Optional[str], default:None) –Optional customer comment on the threat.
-
stride(Optional[StrideCategoryList], default:None) –The STRIDE categories applicable to this threat.
-
threat_source(Optional[str], default:None) –The actor or origin of the threat.
-
prerequisites(Optional[str], default:None) –The conditions required for the threat to be exploitable.
-
threat_action(Optional[str], default:None) –What the threat source can do.
-
threat_impact(Optional[str], default:None) –The direct consequence of the threat action.
-
impacted_goal(Optional[StringList], default:None) –The security goals affected by the threat.
-
impacted_assets(Optional[StringList], default:None) –The specific assets affected by the threat.
-
anchor(Optional[ThreatAnchorShape], default:None) –The DFD element this threat is anchored to.
-
evidence(Optional[ThreatEvidenceList], default:None) –The source code files supporting the threat.
-
recommendation(Optional[str], default:None) –The recommended mitigation guidance for this threat.
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_securityagent/_services/security_agent.py
1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 | |