Pydantic provides strict type-validated models. BaseModel parses / coerces input and raises on mismatch — the parsed model is a sanitizer for the raw input. Still, string fields on the model can remain tainted (not magically escaped).
.BaseModel()Sanitizerpydantic.BaseModel(**data: Any)
Constructs a validated model. Sanitizer for type / shape. String fields remain tainted.
return.parse_obj()SanitizerBaseModel.parse_obj(obj: Any) -> BaseModel
Parses a dict into a model. Sanitizer for shape.
return.parse_raw()SanitizerBaseModel.parse_raw(b: str | bytes, ...) -> BaseModel
Parses JSON / bytes into a model. Sanitizer.
return| FQN | Field | |
|---|---|---|
| pydantic | fqns[0] | |
| pydantic.BaseModel | fqns[1] |
Wrong FQN → 0 findings. Verify with: change fqns to garbage → must produce 0 results.
from codepathfinder.go_rule import PyPydantic