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.
Sandbox Images Compared
Section titled “Sandbox Images Compared”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.
Enabling Variants in Helm
Section titled “Enabling Variants in Helm”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:
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=trueEnable both security and IaC variants with gVisor kernel hardening:
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=trueYou 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: ""Binding a Variant from a ToolProfile
Section titled “Binding a Variant from a ToolProfile”Select a variant once on a reusable ToolProfile via spec.sandbox.variant, then reference that profile from any Tier 1 MaintenancePolicy.
Security Scanner ToolProfile
Section titled “Security Scanner ToolProfile”apiVersion: faberops.dev/v1alpha1kind: ToolProfilemetadata: name: security-sandbox-tools namespace: faberspec: sandbox: variant: security kubernetes: - apiGroups: - "" resources: - pods - events verbs: - get - list - apiGroups: - apps resources: - deployments - statefulsets verbs: - get - listSee config/samples/security-sandbox-tool-profile.yaml for the checked-in sample manifest.
IaC Validator ToolProfile
Section titled “IaC Validator ToolProfile”apiVersion: faberops.dev/v1alpha1kind: ToolProfilemetadata: name: iac-sandbox-tools namespace: faberspec: sandbox: variant: iacUsing a Custom SandboxTemplate
Section titled “Using a Custom SandboxTemplate”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/v1alpha1kind: ToolProfilemetadata: name: custom-sandbox-tools namespace: faberspec: sandbox: templateRef: name: custom-org-validatorCross-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/v1alpha1kind: MaintenancePolicymetadata: name: manifest-security-hardening namespace: faberspec: 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"Template Resolution Precedence
Section titled “Template Resolution Precedence”When a Tier 1 MaintenancePolicy has spec.tools.sandbox.enabled: true, Faber selects the SandboxTemplate in this exact order (highest precedence first):
- Explicit
MaintenancePolicy.spec.tools.sandbox.templateRef - Explicit
ToolProfile.spec.sandbox.templateRef(if multipleToolProfileobjects setspec.sandbox, the last referenced profile wins) - Default template name derived from
ToolProfile.spec.sandbox.variant:baseresolves tofaber-validatorsecurityresolves tofaber-validator-securityiacresolves tofaber-validator-iac
- 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.
Related Documentation
Section titled “Related Documentation”- Tier 1 Quickstart: Enabling
agent-sandboxand running your first sandboxed PR - Threat Model: Sandbox isolation, zero-egress NetworkPolicy, and gVisor hardening
- Helm Chart Values Reference: Complete
sandbox.*andsandbox.variants.*reference - CRD API Reference: Full
Repository.spec.validatorschema