---
title: "Server-side sandboxing: Containers and seccomp"
description: "Containers and seccomp offer lighter-weight sandboxing than VMs, but both shift much more configuration responsibility onto the user."
url: "https://swe.quest/articles/server-side-sandboxing-containers-and-seccomp-0f7ac1ac690426f8"
canonical: "https://www.figma.com/blog/server-side-sandboxing-containers-and-seccomp/"
source: "Figma"
published: "2023-10-24"
difficulty: "medium"
kind: "Deep dive"
reading_minutes: 15
tags: ["sandboxing","containers","linux","security"]
---

# Server-side sandboxing: Containers and seccomp

A post on [Figma](https://swe.quest/sources/figma.md), published 2023-10-24, 15 min read, Deep dive. Original: [https://www.figma.com/blog/server-side-sandboxing-containers-and-seccomp/](https://www.figma.com/blog/server-side-sandboxing-containers-and-seccomp/)

## Summary

Containers and seccomp offer lighter-weight sandboxing than VMs, but both shift much more configuration responsibility onto the user. Container escape risk depends on the runtime implementation, kernel primitives and configuration, and a sandboxed container still needs network, credential and data isolation to limit damage if compromised. Seccomp-only sandboxes suit pure-compute programs: Figma allows only writing to already-open file descriptors, exiting, memory allocation and fetching the time. Building allowlists with strace, restructuring programs so risky syscalls happen before untrusted input is processed, and maintaining brittle allowlists are the main costs, in exchange for very low overhead.

Written by swe.quest, not by the author.

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

## Topics

- [Sandboxing & isolation](https://swe.quest/tags/sandboxing.md) (Security)
- [Containers](https://swe.quest/tags/containers.md) (Infrastructure)
- [Linux](https://swe.quest/tags/linux.md) (Infrastructure)
- [Security](https://swe.quest/tags/security.md) (Security)

## Prerequisites

- Linux system calls ([easy posts on Linux](https://swe.quest/tags/linux.md?difficulty=easy))
- Linux namespaces and cgroups ([easy posts on Linux](https://swe.quest/tags/linux.md?difficulty=easy))
- Docker basics ([easy posts on Containers](https://swe.quest/tags/containers.md?difficulty=easy))

## Keywords

seccomp, Docker, runC, nsjail, firejail, gVisor, strace, Figma

## Related posts

- [Server-side sandboxing: An introduction](https://swe.quest/articles/server-side-sandboxing-an-introduction-7a8a0dd3442f4e4f.md): Figma · 2023-10-24 · Easy · 9 min read · Sandboxing & isolation, Security, Virtualization, Containers, Linux
  Server-side workloads like image processing, parsing and thumbnailing often depend on memory-unsafe C++ libraries with histories of exploitable bugs (e.g. ImageTragick), so Figma isolates them with sandboxing rather than relying solely on preventing vulnerabilities.
- [Server-side sandboxing: Virtual machines](https://swe.quest/articles/server-side-sandboxing-virtual-machines-66f9fa065fa102cd.md): Figma · 2023-10-24 · Medium · 10 min read · Sandboxing & isolation, Virtualization, Serverless, Application security, Cloud platforms
  VM-based sandboxing rests on two boundaries: the hypervisor, which is usually strong but exposes a large attack surface, and the VM's own permissions, which must be restricted through network limits, minimal service access and short-lived credentials so a compromised job can't do harm without escaping.
- [Defense in Depth: How Replit Secures Every Layer of the Vibe Coding Stack](https://swe.quest/articles/defense-in-depth-how-replit-secures-every-layer-of-the-vibe-coding-stack-0d05cbcd7ee6ec9a.md): Replit · 2026-04-21 · Easy · 7 min read · Security, Sandboxing & isolation, Multi-tenancy, Supply chain security, AI for coding
  Replit layers its security controls so that no single one is the last line of defense, from development sandboxes to production hosting.
- [Docker Sandboxes vs. Containers: Choosing the Right Isolation for AI Agents](https://swe.quest/articles/docker-sandboxes-vs-containers-choosing-the-right-isolation-for-ai-agents-9c74485ae65a1b1c.md): Docker · 2026-11-06 · Medium · 14 min read · Sandboxing & isolation, AI agents, Containers, Virtualization, Security
  Containers are isolated processes sharing the host kernel. Docker Sandboxes are microVMs with their own kernel, filesystem, network and private Docker Engine, designed for autonomous coding agents that accumulate state for hours and act on untrusted instructions.
- [Comparing Different Approaches to Sandboxing](https://swe.quest/articles/comparing-different-approaches-to-sandboxing-650a4a9c7bb4484a.md): Docker · 2026-05-07 · Easy · 7 min read · Sandboxing & isolation, AI agents, Virtualization, Containers, Linux
  AI agents need strong isolation because hallucinations and prompt injection can lead to destructive commands, and the common sandboxing options trade isolation against cost. chroot isolates only the filesystem and can be escaped by root processes. systemd-nspawn adds process and network isolation but is Linux-only.

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)
