Skip to content

Specialized Zero-Egress Sandbox Variants

Faber keeps its default Tier 1 sandbox image lean so day-one manifest validation stays fast and light. When your policies also validate security posture, policy-as-code, deprecated Kubernetes APIs, or OpenTofu infrastructure code, you can enable specialized zero-egress sandbox variants per ToolProfile without bloating the base image.

Every sandbox image runs sandboxd (kubernetes-sigs/agent-sandbox) as non-root UID/GID 65532 on a read-only root filesystem with automountServiceAccountToken: false, networkPolicy.egress: [], and zero secrets mounted. All variants inherit sandbox.runtimeClassName (set to gvisor on clusters with gVisor) and sandbox.warmPoolReplicas (default 0 for zero idle RAM).

Variant (spec.sandbox.variant) Image Default SandboxTemplate Bundled Offline Tools Best For
base (default) ghcr.io/faberops/faber-sandbox faber-validator Offline kubeconform (K8s v1.34.12 + 8 GitOps CRD schemas), helm, kustomize, flate, yq, git Flux, Argo CD, Helm, and Kustomize manifest fixes
security ghcr.io/faberops/faber-sandbox-security faber-validator-security Offline trivy (config misconfiguration scanner), kyverno CLI, pluto, offline kubeconform, yq, git Misconfiguration hardening, Kyverno policy checks, deprecated API upgrades
iac ghcr.io/faberops/faber-sandbox-iac faber-validator-iac OpenTofu (tofu), tflint, git Terraform and OpenTofu formatting, syntax validation, and linting

In faber-sandbox-security, the container environment sets HOME=/tmp, TRIVY_CACHE_DIR=/tmp/trivy-cache, TRIVY_SKIP_CHECK_UPDATE=true, TRIVY_SKIP_VERSION_CHECK=true, and TRIVY_DISABLE_TELEMETRY=true so trivy config runs cleanly with a read-only root filesystem and zero internet access.

In faber-sandbox-iac, tofu and tflint run completely offline inside /workspace. Commands that require downloading remote provider binaries (tofu init against a public registry) will fail as expected because egress is blocked. Use local formatting, static checks, or pre-vendored module layouts.

Both variants are opt-in and disabled by default. Variant SandboxTemplate and zero-replica SandboxWarmPool resources render only when both sandbox.enabled=true and sandbox.variants.<name>.enabled=true are set.

Enable the security variant alongside the base sandbox:

Terminal window
helm upgrade --install faber oci://ghcr.io/faberops/charts/faber \
--version 2.0.0 \
--namespace faber \
--set sandbox.enabled=true \
--set sandbox.variants.security.enabled=true

Enable both security and IaC variants with gVisor kernel hardening:

Terminal window
helm upgrade --install faber oci://ghcr.io/faberops/charts/faber \
--version 2.0.0 \
--namespace faber \
--set sandbox.enabled=true \
--set sandbox.runtimeClassName=gvisor \
--set sandbox.variants.security.enabled=true \
--set sandbox.variants.iac.enabled=true

You can override the generated template name or pin an immutable digest for either variant in values.yaml (see the Helm Chart Values Reference):

sandbox:
enabled: true
runtimeClassName: gvisor
variants:
security:
enabled: true
templateName: faber-validator-security
image:
repository: ghcr.io/faberops/faber-sandbox-security
digest: ""
iac:
enabled: true
templateName: faber-validator-iac
image:
repository: ghcr.io/faberops/faber-sandbox-iac
digest: ""

Select a variant once on a reusable ToolProfile via spec.sandbox.variant, then reference that profile from any Tier 1 MaintenancePolicy.

apiVersion: faberops.dev/v1alpha1
kind: ToolProfile
metadata:
name: security-sandbox-tools
namespace: faber
spec:
sandbox:
variant: security
kubernetes:
- apiGroups:
- ""
resources:
- pods
- events
verbs:
- get
- list
- apiGroups:
- apps
resources:
- deployments
- statefulsets
verbs:
- get
- list

See config/samples/security-sandbox-tool-profile.yaml for the checked-in sample manifest.

apiVersion: faberops.dev/v1alpha1
kind: ToolProfile
metadata:
name: iac-sandbox-tools
namespace: faber
spec:
sandbox:
variant: iac

If you build your own zero-egress SandboxTemplate (for example with custom corporate schemas or internal CLI tools), point directly to it with spec.sandbox.templateRef:

apiVersion: faberops.dev/v1alpha1
kind: ToolProfile
metadata:
name: custom-sandbox-tools
namespace: faber
spec:
sandbox:
templateRef:
name: custom-org-validator

Cross-namespace templateRef references are denied by default unless --allow-cross-namespace-refs=true is set on the controller.

Referencing the ToolProfile in a Tier 1 Policy

Section titled “Referencing the ToolProfile in a Tier 1 Policy”

Attach the ToolProfile to spec.tools.profileRefs, enable the sandbox, and configure the offline validation commands you want the operator to run before extracting the diff:

apiVersion: faberops.dev/v1alpha1
kind: MaintenancePolicy
metadata:
name: manifest-security-hardening
namespace: faber
spec:
repositoryRef:
name: home-ops
tools:
profileRefs:
- name: security-sandbox-tools
sandbox:
enabled: true
validationCommands:
- "trivy config --severity HIGH,CRITICAL --exit-code 1 kubernetes/apps"
- "pluto detect-files -d kubernetes/apps"
- "kubeconform -strict -summary kubernetes/apps"

For IaC repositories bound to iac-sandbox-tools, typical offline validation commands are:

validationCommands:
- "tofu fmt -check -recursive"
- "tflint --recursive"

When a Tier 1 MaintenancePolicy has spec.tools.sandbox.enabled: true, Faber selects the SandboxTemplate in this exact order (highest precedence first):

  1. Explicit MaintenancePolicy.spec.tools.sandbox.templateRef
  2. Explicit ToolProfile.spec.sandbox.templateRef (if multiple ToolProfile objects set spec.sandbox, the last referenced profile wins)
  3. Default template name derived from ToolProfile.spec.sandbox.variant:
    • base resolves to faber-validator
    • security resolves to faber-validator-security
    • iac resolves to faber-validator-iac
  4. Fallback GitOpsRepository.spec.validation.sandboxTemplateRef

If you rename a variant template via sandbox.variants.security.templateName in Helm, set ToolProfile.spec.sandbox.templateRef.name to match that custom name.