Security context

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

szczyglis-dev/py-gpt
master @ 75bc06e
3
Fixes
0
CVEs
HIGH
Peak severity
Highlights
Command Injection: 1 prior fix. Scrutinize any change in this area.
src/pygpt_net/controller/interpreter.py: most-fixed (1 issue). Treat as high-risk during review.
1 high-severity fix in this history; regressions here are high-impact.
Recurring patterns

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

Command Injection: Unsafe string construction when executing the system python interpreter allows model-generated or user-controlled inputs to escape the intended process boundaries. Future changes must strictly use safe command formatting templates rather than concatenating arguments inside execution wrappers.
Path Traversal: The Python code interpreter handles file inputs and outputs that, if not restricted to a dedicated data directory, allow arbitrary file read and write operations on the host. Implementations must robustly resolve and validate paths against the scoped data directory.
Reflected XSS: Rendering model-generated markdown or HTML chunks without proper sanitization into a web view using insertAdjacentHTML allows arbitrary script execution within the context of the application GUI. Output encoding or strict HTML sanitization is required on all web rendering paths.