-
Notifications
You must be signed in to change notification settings - Fork 278
Open
Description
Is there any policy to skip the error?
[-] Response validation failed
Traceback (most recent call last):
File "/home/aabc/projects/ttst/vulnhuntr/vulnhuntr/LLMs.py", line 45, in _validate_response
return response_model.model_validate_json(response_text)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/aabc/anaconda3/envs/xxtstenv/lib/python3.12/site-packages/pydantic/main.py", line 597, in model_validate_json
return cls.__pydantic_validator__.validate_json(json_data, strict=strict, context=context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pydantic_core._pydantic_core.ValidationError: 1 validation error for Response
vulnerability_types.2
Input should be 'LFI', 'RCE', 'SSRF', 'AFO', 'SQLI', 'XSS' or 'IDOR' [type=enum, input_value='DoS', input_type=str]
For further information visit https://errors.pydantic.dev/2.8/v/enum
Traceback (most recent call last):
File "/home/aabc/projects/ttst/vulnhuntr/vulnhuntr/LLMs.py", line 45, in _validate_response
return response_model.model_validate_json(response_text)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/aabc/anaconda3/envs/xxtstenv/lib/python3.12/site-packages/pydantic/main.py", line 597, in model_validate_json
return cls.__pydantic_validator__.validate_json(json_data, strict=strict, context=context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pydantic_core._pydantic_core.ValidationError: 1 validation error for Response
vulnerability_types.2
Input should be 'LFI', 'RCE', 'SSRF', 'AFO', 'SQLI', 'XSS' or 'IDOR' [type=enum, input_value='DoS', input_type=str]
For further information visit https://errors.pydantic.dev/2.8/v/enum
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/aabc/projects/ttst/vulnhuntr/vulnhuntr/main.py", line 491, in <module>
run()
File "/home/aabc/projects/ttst/vulnhuntr/vulnhuntr/main.py", line 397, in run
initial_analysis_report: Response = llm.chat(user_prompt, response_model=Response)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/aabc/projects/ttst/vulnhuntr/vulnhuntr/LLMs.py", line 75, in chat
response_text = self._validate_response(response_text, response_model) if response_model else response_text
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/aabc/projects/ttst/vulnhuntr/vulnhuntr/LLMs.py", line 48, in _validate_response
raise LLMError("Validation failed") from e
LLMs.LLMError: Validation failed
RexBelli and grisuno
Metadata
Metadata
Assignees
Labels
No labels