seccomp-profile-default.json


Overview

seccomp-profile-default.json is a security profile file that defines a default seccomp (secure computing mode) filter for Linux-based containerized applications or sandboxed environments. It specifies which system calls (syscalls) are allowed or denied when the application runs, thereby restricting the environment to a minimal set of permitted syscalls to reduce the attack surface.

This profile is typically used in container runtimes (like Docker, containerd, or Kubernetes) or sandboxing frameworks to enforce syscall filtering at runtime, enhancing the security posture by preventing unauthorized or potentially harmful syscalls.


File Structure and Functionality

The JSON file configures the seccomp filter through three main sections:

1. defaultAction

2. archMap

3. syscalls


Important Implementation Details


Usage Example

This JSON file is loaded by a container runtime or sandboxing tool as part of the seccomp profile configuration. For example:

docker run --security-opt seccomp=seccomp-profile-default.json alpine echo "Hello, Seccomp"

This command runs an Alpine Linux container with the specified seccomp profile, limiting syscalls to those allowed in the JSON file.


Interaction with Other System Components


Summary

This file is a security-critical configuration that enforces a whitelist of allowed syscalls for processes, primarily in containerized environments. Its conservative default-deny approach helps harden container security by allowing only essential syscalls.


Visual Diagram

The diagram below illustrates the structure of the seccomp-profile-default.json file and the relationships between its main components.

flowchart TD
    A[seccomp-profile-default.json] --> B[defaultAction: SCMP_ACT_ERRNO]
    A --> C[archMap]
    C --> C1[architecture: SCMP_ARCH_X86_64]
    C --> C2[subArchitectures: SCMP_ARCH_X86, SCMP_ARCH_X32]
    A --> D[syscalls]
    D --> D1[names: read, write, exit, ...]
    D --> D2[action: SCMP_ACT_ALLOW]

Summary of Key Fields

Field

Description

Example Value

defaultAction

Default seccomp action for unmatched syscalls

"SCMP_ACT_ERRNO"

archMap

Architecture and sub-architecture mapping

"SCMP_ARCH_X86_64" + sub-archs

syscalls

List of allowed syscalls and their action (ALLOW)

["read", "write", ...]


If you need further details on seccomp profiles or integration with specific runtimes, please refer to the official Linux seccomp documentation or the container runtime security guides.