File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -46,7 +46,8 @@ class FindingSchema(Schema):
4646 vectorCount = fields .Int (allow_none = True )
4747 state = fields .Str (validate = v .OneOf (["open" , "archive" ]))
4848 status = fields .Str (validate = v .OneOf (["in_progress" , "done" ,
49- "to_do" , "in_review" ]))
49+ "to_do" , "in_review" ,
50+ "accepted" ]))
5051 created = fields .Int (allow_none = True )
5152 is_active = fields .Bool (allow_none = True )
5253 has_history = fields .Bool (allow_none = True )
Original file line number Diff line number Diff line change 1- from marshmallow import fields , Schema
1+ from marshmallow import fields , validate as v , Schema
22
33
44class SourceInformationSchema (Schema ):
@@ -42,6 +42,11 @@ class VectorSchema(Schema):
4242 summary = fields .Str (allow_none = True )
4343 first_aes = fields .Raw (allow_none = True )
4444 last_acr = fields .Int (allow_none = True )
45+ path_status = fields .Str (validate = v .OneOf (["to_do" , "in_progress" ,
46+ "in_review" , "done" ,
47+ "chain_prevented" ,
48+ "accepted" ]),
49+ allow_none = True )
4550
4651
4752class VectorsPageSchema (Schema ):
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ class StatusEnum(Enum):
2121 done = "done"
2222 to_do = "to_do"
2323 in_review = "in_review"
24+ accepted = "accepted"
2425
2526
2627class NodeInfoSchema (BaseModel ):
Original file line number Diff line number Diff line change @@ -190,6 +190,17 @@ def top_attack_paths_search(
190190 >>> for attack_path in response.data:
191191 ... print(f"Attack Path: {attack_path.name}, Priority: {attack_path.priority}")
192192
193+ Filter by path_status to get only actionable paths
194+
195+ >>> filter_data = {
196+ ... "property": "path_status",
197+ ... "operator": "in",
198+ ... "value": ["to_do", "in_progress", "in_review"]
199+ ... }
200+ >>> response = t1.attack_path.vectors.top_attack_paths_search(
201+ ... filter=filter_data
202+ ... )
203+
193204 Simple search with default parameters
194205
195206 >>> response = t1.attack_path.vectors.top_attack_paths_search()
Original file line number Diff line number Diff line change 1+ from enum import Enum
2+
13from pydantic import BaseModel , RootModel
24from typing import List , Optional , Any , Union
35
46
7+ class PathStatusEnum (Enum ):
8+ to_do = "to_do"
9+ in_progress = "in_progress"
10+ in_review = "in_review"
11+ done = "done"
12+ chain_prevented = "chain_prevented"
13+ accepted = "accepted"
14+
15+
516class SourceInformationSchema (BaseModel ):
617 provider_detection_id : Optional [str ] = None
718 detection_code : Optional [str ] = None
@@ -79,6 +90,7 @@ class VectorRow(BaseModel):
7990 summary : Optional [str ] = None
8091 first_aes : Optional [float ] = None
8192 last_acr : Optional [int ] = None
93+ path_status : Optional [PathStatusEnum ] = None
8294
8395
8496class DiscoverPageTableResponse (BaseModel ):
You can’t perform that action at this time.
0 commit comments