Security context

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

wolph/portalocker
develop @ c86f80c
4
Fixes
0
CVEs
HIGH
Peak severity
75.0%
Coverage
Highlights
Race Condition: 3 prior fixes. Scrutinize any change in this area.
portalocker/utils.py: most-fixed (2 issues). Treat as high-risk during review.
3 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.

Race Condition: Silent resubscription after lock revocation can mask lock loss and cause split-brain; zero-retry plus lifecycle state machine is required.
Race Condition: Unlink without samestat check deletes a competitor's lock file after external replacement, causing lock loss.
Race Condition: open_atomic publication via os.link/os.rename races on filesystems without hard links, allowing unauthorized file replacement.