Skip to content

Commit fa27f8e

Browse files
committed
feat(add perform_multi_step_scan):
1 parent 03dcf8c commit fa27f8e

File tree

2 files changed

+281
-117
lines changed

2 files changed

+281
-117
lines changed

agentic_security/models/schemas.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,23 @@ class Scan(BaseModel):
2323

2424
class ScanResult(BaseModel):
2525
module: str
26-
tokens: int
26+
tokens: float | int
2727
cost: float
2828
progress: float
29+
status: bool = False
2930
failureRate: float = 0.0
3031

32+
@classmethod
33+
def status_msg(cls, msg: str) -> str:
34+
return cls(
35+
module=msg,
36+
tokens=0,
37+
cost=0,
38+
progress=0,
39+
failureRate=0,
40+
status=True,
41+
).model_dump_json()
42+
3143

3244
class Probe(BaseModel):
3345
prompt: str

0 commit comments

Comments
 (0)