Security context

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

huggingface/tokenizers
main @ 3ba8ad0
12
Fixes
0
CVEs
HIGH
Peak severity
41.7%
Coverage
Highlights
Memory Safety: 6 prior fixes. Scrutinize any change in this area.
.github/workflows/benchmark-trigger.yml: most-fixed (1 issue). Treat as high-risk during review.
9 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.

Memory Safety: Unsound custom wrapper types ('Container') used in the Python bindings introduced potential undefined behavior and memory safety violations across multiple core binding structs. Replacing these with standard Arc wrappers was necessary to ensure safe thread-safety and lifetime management.
Memory Corruption: String manipulation logic using character-based boundaries instead of byte indices caused out-of-bounds indexing and panics when splitting normalized strings. Ensuring character offsets are mapped strictly to UTF-8 byte boundaries is critical.
Command Injection: Direct interpolation of untrusted GitHub context parameters inside shell scripts ran the risk of arbitrary command execution within CI containers. Transitioning to explicit environment variables mitigates this vector.