Security context

What an agent needs to avoid regressing past fixes and find the next vuln in this repo.

koxudaxi/datamodel-code-generator
main @ 2f97420
10
Fixes
0
CVEs
HIGH
Peak severity
87.5%
Coverage
Highlights
Code Injection: 3 prior fixes. Scrutinize any change in this area.
src/datamodel_code_generator/http.py: most-fixed (2 issues). Treat as high-risk during review.
4 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns

The bug types that recur here, drawn from past fixes, not open vulnerabilities.

SSRF: Attackers can bypass remote schema fetch constraints via DNS rebinding or mapped IPv4-in-IPv6 addresses to target internal networks. This requires rigorous pinning of resolved IPs and strict address normalization.
Code Injection: Attackers can introduce carriage returns and raw newlines inside schema descriptions or validator fields to break out of templated comments or string literals, injecting arbitrary Python statements directly into the generated output files.
Path Traversal: Remote and local JSON Schema reference URI resolution can traverse outside the boundary of the base directory unless paths are canonicalized and strictly validated against a directory prefix.