Security context

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

psf/cachecontrol
master @ 4fed517
2
Fixes
0
CVEs
MEDIUM
Peak severity
Highlights
Cache Poisoning: 1 prior fix. Scrutinize any change in this area.
cachecontrol/adapter.py: most-fixed (1 issue). 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.

Cache Poisoning: Incomplete tracking of mutating HTTP methods (such as missing PATCH) leads to a failure to invalidate cached responses. This allows clients to retrieve stale or poisoned data after a resource has been updated on the origin server.
Race Condition: Non-atomic file operations involving a deletion-and-creation sequence (using os.remove and os.open) expose the application to race conditions during concurrent cache writes. This can cause cache corruption or read/write collisions.