Security context

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

xorbitsai/inference
main @ 715bf5a
8
Fixes
50
CVEs
CRITICAL
Peak severity
50.0%
Coverage
Highlights
Arbitrary Code Execution: 2 prior fixes. Scrutinize any change in this area.
.github/workflows/pr_auto_run_gen_docs.yaml: most-fixed (3 issues). Treat as high-risk during review.
6 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.

Remote Code Execution: Unsafe dynamic evaluation of tool outputs via the python eval() function can lead directly to arbitrary command and code execution on the server hosting the model. This was replaced by safe ast.literal_eval and json parsing.
Arbitrary Code Execution: Loading models with trust_remote_code=True implicitly trusts model repositories and allows arbitrary code to run during model loading, creating a critical risk when deploying untrusted models. This was addressed by introducing a default-off configuration switch.
Command Injection: Directly interpolating untrusted branch and repository names from pull requests into inline bash scripts in GitHub Actions allowed workflows to be hijacked via injection vectors during git pushes. This was resolved by migrating to env mapping.