PEPR 26 - Surfacing Hidden Privacy Risks in Code: Lessons from LLM and Retrieval Assisted Detection @UsenixOrg
PEPR 26 - Surfacing Hidden Privacy Risks in Code: Lessons from LLM and Retrieval Assisted Detection  @UsenixOrg
Uploaded June 2026 | Updated September 2026, 3 weeks ago
Surfacing Hidden Privacy Risks in Code: Lessons from LLM and Retrieval Assisted Detection

Bushra Aloraini and Jimmy Haslam, Microsoft

Many privacy failures are caused less by obvious code that handles privacy such as encryption, retention, deletion, and more by everyday design and coding choices that unintentionally expose sensitive data. A common example is Default Grant Access (DGA), whereby access is permitted unless a developer explicitly blocks it. DGA is difficult for traditional static analysis because the risk often emerges from context: defaults, conditional logic, and framework behavior.
We report lessons learned from deploying language model-based detection for DGA in pull requests at scale, and from replacing a static prompt approach with retrieval-augmented generation (RAG) to address high false-positive rates. In an evaluation spanning nine production repositories, four languages, and 183,000+ methods, the RAG system identified more than twice as many confirmed privacy-relevant issues as the standalone LLM approach. However, false-positive rates did not improve significantly, and we observed language-specific noise, especially in TypeScript and C++.
We cover practical engineering insights: Curating high-quality examples from known incidents, managing corpus retrieval trade-offs and integrating detections into pull request review workflows without overwhelming reviewers.

View the full PEPR '26 program at usenix.org/conference/pepr26/program
PEPR 26 - Surfacing Hidden Privacy Risks in Code: Lessons from LLM and Retrieval Assisted DetectionNSDI 26 - The GOODPUT System: A Machine Learning-Driven Optimization Framework for Dynamic...NSDI 26 - PrvTel: Lightweight Models for Private and Accurate Telemetry Data RetentionNSDI 26 - Count-Based Abstractions for Performance Verification of Contention PointsNSDI 26 - A Systematic Threat Analysis and Practical Attacks on Automated Frequency CoordinationNSDI 26 - ForestColl: Throughput-Optimal Collective Communications on Heterogeneous Network FabricsNSDI 26 - CacheCatalyst: Enhancing Web Caching for the Latency-Constrained InternetNSDI 26 - BURST: Seeking High-performance, Interoperability and Scalability in Soft-RDMANSDI 26 - MirrorNet: High-fidelity and Scalable Network Emulation for Software-defined WANPEPR 26 - Production Multi-Party Computation via the Distributed Aggregation ProtocolPEPR 26 - Envisioning and Mitigating Privacy Risks for Consumer-Facing AI Product Concepts...NSDI 26 - Agentix: An Efficient Serving Engine for LLM Agents as General Programs
USENIX |

PEPR '26 - Surfacing Hidden Privacy Risks in Code: Lessons from LLM and Retrieval Assisted Detection

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER