-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaudit_response.py
More file actions
29 lines (23 loc) · 881 Bytes
/
Copy pathaudit_response.py
File metadata and controls
29 lines (23 loc) · 881 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
from pydantic import BaseModel
class Result(BaseModel):
"""
Represents a single vulnerability result in the audit.
Attributes:
line_number (str): The line number(s) where the vulnerability is found.
code_snippet (str): The relevant code snippet containing the vulnerability.
severity_level (str): The severity level of the vulnerability.
severity_description (str): A brief description of the vulnerability and its potential impact.
"""
line_number: str
code_snippet: str
severity_level: str
severity_description: str
class AuditResponse(BaseModel):
"""
Represents the overall audit response for a file.
Attributes:
vulnerabilities (list[Result]): A list of vulnerability results found in the file.
file_path (str): The path of the audited file.
"""
vulnerabilities: list[Result]
file_path: str