Visibility at scale: How Figma detects sensitive data exposure
Figma built Response Sampling, a detection layer that randomly samples outbound API responses and checks them for sensitive data the requesting user shouldn't see. The first version ran as an `after` filter in Figma's Ruby application server. It extracted high-entropy file identifiers from JSON bodies and verified access asynchronously against PermissionsV2, and LiveGraph fed in its own samples through an internal endpoint. The expanded version uses FigTag column annotations (`banned_from_clients`) and ActiveRecord callbacks to record the sensitive values loaded during a request, then flags any of them that appear in the serialized response. Sampling, async checks, rate limiting, dynamic allowlists and running in both staging and production kept latency and false positives under control while surfacing real authorization gaps.
Related posts
- Our approach to security at speed
Figma easyNovice
Figma's small security team scales by favoring transparency, reusable patterns and trust over mandated process: thrice-weekly office hours backed by a three-question "ThreatJam" survey surface risks early. For FigJam rich link previews, it identified SSRF, DoS and malicious-HTML risks and recommended isolating scraping in a cloud function on a separate network, with rate limiting, HTTP/HTTPS-only ports, short-lived caching and restricted tag parsing; other teams later reused the pattern. Internally, phishing is countered with passwordless FIDO2/WebAuthn hardware and biometric authenticators, and a Slack bot automatically flags documents made public.
- How we built a custom permissions DSL at Figma
Figma mediumAdept
Figma replaced a sprawling Ruby `has_access?` permissions function with a custom, JSON-serializable permissions DSL and a cross-platform policy engine, inspired by AWS IAM policies. Each policy declares a resource type, an allow/deny effect, granular permissions and boolean conditions written as ExpressionDef triples that reference data fields such as `file.deleted_at`. Because policies are pure data, the same rules run in both the Ruby/Sinatra backend and the TypeScript LiveGraph realtime layer, and data dependencies can be extracted statically. That separation decouples policy logic from data loading, letting rules be written and debugged independently and reducing database load from permission checks, which had been about 20% of total load.
- Rolling out Santa without freezing productivity: Tips from securing Figma’s fleet
Figma mediumAdept
Figma deployed Google's Santa binary authorization tool in lockdown mode across its entire macOS laptop fleet. It started with file access authorization for browser cookies, then used monitoring mode data to build an allowlist. Rules default to SigningID and reserve TeamID for highly trusted developers, compiler rules cover locally built binaries, and a custom Package Rule workflow regenerates SHA-256 rules for Homebrew and GitHub packages every 30 minutes. Blocked users self-approve through a Slack app backed by malware checks, and MDM-triggered syncs make approvals take effect in about three seconds. A three-month phased rollout by unknown-binary count, with group-scoped rules for engineers and a temporary escape hatch, reached 100% coverage with roughly 150 global allow rules and 80,000 generated binary rules.
- Designing for security and usability: Figma's modern endpoint strategy
Figma mediumAdept
Figma's corporate endpoint security puts usability first, on the premise that friction drives employees to risky workarounds. An Endpoint Security Baseline uses osquery to detect risks such as kernel extensions, quarantines the device from AWS, GitHub and GSuite, auto-remediates where possible, and otherwise sends Slack-based self-service fixes before restoring access. The Santa binary allowlist was rolled out from Monitor Mode data, which showed 90% of devices would see no blocks, with auto-allowlisting for engineer-compiled binaries and a Slack approval flow for the long tail. Opal provides just-in-time, role-based, auto-expiring access defined as config-as-code.
- When protections outlive their purpose: A lesson on managing defense systems at scale
GitHub Engineering mediumAdeptEmergency protection rules added during past GitHub abuse incidents were left in place and began rate-limiting legitimate logged-out users with "Too many requests" errors. The rules combined fingerprinting with business-logic signals. Only 0.5–0.9% of fingerprint matches were blocked, but false positives still reached about 3–4 per 100,000 requests. Finding the cause meant correlating logs across edge, application and service layers with different schemas. GitHub removed the stale rules and now treats incident mitigations as temporary by default, with expiration, post-incident review and cross-layer visibility into which layer blocked a request.