Security context

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

google/nearby
main @ f84f996
52
Fixes
2
CVEs
HIGH
Peak severity
42.5%
Coverage
Highlights
Memory Corruption: 9 prior fixes. Scrutinize any change in this area.
sharing: most-fixed (5 issues). Treat as high-risk during review.
28 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.

Use After Free: Asynchronous tasks frequently capture temporary string views or references by reference, leading to lifetime issues and use-after-free conditions once the calling scope terminates. Copying parameters to std::string in lambda captures is required to mitigate this risk.
Path Traversal: Inadequate sanitization of incoming payload filenames and parent directory strings allows directory traversal attacks. Relying on partial character blocklists or superficial pattern matching is bypassable; strict canonicalization and prefix checks must be enforced.
Memory Corruption: Legacy C-style string manipulation, unvalidated registry queries, and static buffer allocations in the Windows-specific platform implementation have historically led to buffer overflows and memory safety issues. Dynamic allocation and bounds-checked APIs must be used.