Security context

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

starship/starship
main @ 3e516c8
3
Fixes
1
CVEs
HIGH
Peak severity
0.0%
Coverage
Highlights
Code Execution: 1 prior fix. Scrutinize any change in this area.
src/formatter/string_formatter.rs: most-fixed (1 issue). Treat as high-risk during review.
2 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.

Code Execution: Custom modules that execute external commands could lead to arbitrary shell command execution if their outputs are not escaped by default before rendering in the prompt, a vulnerability tracked under CVE-2024-41815. This was addressed by introducing default output escaping and requiring an explicit opt-in for unsafe behavior.
Untrusted Search Path: On Windows platforms, invoking bare command names via standard library process spawning can lead to local code execution if a malicious binary with the same name exists in the current working directory. The application must resolve executable paths safely before invocation.
Injection: Prompt expansion injection can occur if variable values are rendered directly into the shell prompt without shell-specific escaping, allowing unexpected prompt sequences to execute or manipulate the shell state.