How Figma stays ahead of vulnerabilities with agents
This blog post details how Figma has integrated AI agents across three stages of its software development lifecycle—code generation, pull request (PR) review, and historical code auditing—to proactively find and fix vulnerabilities. The authors emphasize that while pointing agents at code is simple, achieving the required precision (low false positives) and recall (catching real bugs) is a hard engineering challenge. Their approach centers on building a comprehensive, 99-line security policy containing 68 precedents, which acts as the shared threat model for all agents and was iteratively refined by hand-labeling false positives until precision exceeded a 70% threshold. In production, the reviewer runs on every PR using multiple models, costs about $0.50 median per review, and uses an adjudicator pass to improve recall. The system includes robust metrics: recall is measured against a corpus of 66 known past vulnerabilities (with a current union catch rate of 75.8%), precision is monitored via developer feedback on live findings, and fix rates are tracked. Key lessons include prioritizing precision before recall, using agent hooks to inject secure coding guidance during generation, and automating self-improvement loops where agents update the policy to prevent future missed bugs or false positives, ultimately shifting security engineers from manual triage to writing the policies that scale their impact.
https://www.figma.com/blog/how-figma-stays-ahead-of-vulnerabilities-with-agents
Comments
Post a Comment