---
title: "Visibility at scale: How Figma detects sensitive data exposure"
description: "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."
url: "https://swe.quest/articles/visibility-at-scale-how-figma-detects-sensitive-data-exposure-a9fbf43af9718cbb"
canonical: "https://www.figma.com/blog/visibility-at-scale-how-figma-detects-sensitive-data-exposure/"
source: "Figma"
published: "2025-10-23"
difficulty: "medium"
kind: "Case study"
reading_minutes: 11
tags: ["appsec","identity-auth","ruby","privacy","observability"]
---

# Visibility at scale: How Figma detects sensitive data exposure

A post on [Figma](https://swe.quest/sources/figma.md), published 2025-10-23, 11 min read, Case study. Original: [https://www.figma.com/blog/visibility-at-scale-how-figma-detects-sensitive-data-exposure/](https://www.figma.com/blog/visibility-at-scale-how-figma-detects-sensitive-data-exposure/)

## Summary

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.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Application security](https://swe.quest/tags/appsec.md) (Security)
- [Identity & auth](https://swe.quest/tags/identity-auth.md) (Security)
- [Ruby](https://swe.quest/tags/ruby.md) (Languages)
- [Privacy](https://swe.quest/tags/privacy.md) (Security)
- [Observability](https://swe.quest/tags/observability.md) (Reliability & operations)

## Prerequisites

- authorization and access control ([easy posts on Identity & auth](https://swe.quest/tags/identity-auth.md?difficulty=easy))
- web middleware
- ORM basics

## Keywords

Response Sampling, Figma, PermissionsV2, FigTag, LiveGraph, ActiveRecord

## Related posts

- [Our approach to security at speed](https://swe.quest/articles/our-approach-to-security-at-speed-2ae96340506b0055.md): Figma · 2022-10-13 · Easy · 5 min read · Security, Application security, Identity & auth, Serverless
  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.
- [How we built a custom permissions DSL at Figma](https://swe.quest/articles/how-we-built-a-custom-permissions-dsl-at-figma-b86982742becc83a.md): Figma · 2024-03-13 · Medium · 24 min read · Identity & auth, Language design, System design, Ruby, TypeScript
  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.
- [Rolling out Santa without freezing productivity: Tips from securing Figma’s fleet](https://swe.quest/articles/rolling-out-santa-without-freezing-productivity-tips-from-securing-figma-s-fleet-77d67b199183f0bd.md): Figma · 2025-07-02 · Medium · 13 min read · Security, Deployment, Identity & auth
  Figma deployed Google's Santa binary authorization tool in lockdown mode across its entire macOS laptop fleet.
- [Designing for security and usability: Figma's modern endpoint strategy](https://swe.quest/articles/designing-for-security-and-usability-figma-s-modern-endpoint-strategy-6114848291c3bb53.md): Figma · 2025-04-04 · Medium · 6 min read · Security, Identity & auth, Threat detection
  Figma's corporate endpoint security puts usability first, on the premise that friction drives employees to risky workarounds.
- [When protections outlive their purpose: A lesson on managing defense systems at scale](https://swe.quest/articles/when-protections-outlive-their-purpose-a-lesson-on-managing-defense-systems-at-7fcb8ad566ecf603.md): GitHub Engineering · 2026-01-15 · Medium · 5 min read · Incidents & postmortems, Resilience, Observability, Threat detection
  Emergency 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.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
