Security context

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

nvbn/thefuck
master @ c7e7e1d
3
Fixes
1
CVEs
CRITICAL
Peak severity
66.7%
Coverage
Highlights
Command Injection: 2 prior fixes. Scrutinize any change in this area.
thefuck/rules/dirty_untar.py: most-fixed (2 issues). Treat as high-risk during review.
0 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.

Path Traversal: Insecure handling of archive contents during cleanup operations allowed arbitrary file deletion (CVE-2021-34363). Attackers controlling archive paths could traverse outside the target directory if path canonicalization checks are bypassed or missing during cleanup.
Command Injection: Failing to shell-escape directory names extracted from ZIP archives allowed arbitrary commands to execute when 'thefuck' recommended and ran corrective commands involving the unzipped folder name.
Command Injection: Failing to shell-escape directory names extracted from TAR archives allowed arbitrary command execution when generating corrective shell commands involving the extracted folder.