Workspaces

Security

Non-root execution, secret injection lifecycle, setuid removal, cosign signing, and supply chain hardening in workspace images.

Workspace images follow defense-in-depth principles. Every layer adds a security boundary.

Non-Root Execution

Agents run as the agent user (UID 1000), never as root. The container user is switched in the Dockerfile's final stage:

USER agent

All workspace directories (/workspace, /opt/agentic) are owned by the agent user with minimal permissions.

SetUID/SetGID Removal

All setuid and setgid binaries are stripped during the build (excluding /usr/local where toolchain binaries live):

RUN find / -path /usr/local -prune -o -perm /6000 -type f -exec chmod a-s {} \; 2>/dev/null || true

This prevents privilege escalation even if an agent executes a compromised binary.

Secret Injection Lifecycle (ADR-024)

Secrets (API keys, tokens) are never baked into images. The injection lifecycle:

  1. Setup phase: Orchestrator injects secrets as agent environment variables and credential files
  2. Execution phase: Agent runs with access to injected secrets
  3. Cleanup phase: Secrets are revoked/cleared before container destruction

The agent process does see raw credentials. Claude Code validates its credential locally before sending any request, so sidecar substitution of a placeholder (ADR-022) no longer works: the Claude credential is placed directly in the agent environment, and Anthropic traffic is routed through the Envoy sidecar for observability only. GitHub installation tokens are written to ~/.git-credentials and ~/.config/gh/hosts.yml, which the agent can read. Restoring the "agent never sees raw secrets" property is tracked in #724 and #725.

Vendor Telemetry

The images do not disable vendor telemetry. What they set:

VariableWherePurpose
ANTHROPIC_NO_ATTRIBUTION=1Image environmentDisable Claude attribution in commits and PRs
RTK_TELEMETRY_DISABLED=1Prefixed to the entrypoint's rtk init commands onlyDisable RTK analytics during rtk init

DISABLE_TELEMETRY and DISABLE_ERROR_REPORTING are not set by any image.

Supply Chain Security

Image Signing

Every published image is signed with cosign using keyless OIDC (Sigstore), only from agentic-workspace's protected release branch. Verify signatures by digest, never by a mutable tag:

cosign verify ghcr.io/agentparadise/agentic-workspace-claude@sha256:<digest> \
  --certificate-identity-regexp '^https://github.com/AgentParadise/agentic-workspace/\.github/workflows/release-images\.yml@refs/heads/release$' \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com

SLSA Provenance + SBOM

Images include SLSA provenance attestations and Software Bill of Materials (SBOM) generated by BuildKit. These are attached as OCI artifacts alongside the image.

Action SHA Pinning

All GitHub Actions in the build workflow are pinned to commit SHAs, preventing supply chain attacks via mutable tags.

Read-Only Root Filesystem

In production deployments, the root filesystem is mounted read-only. Writable paths are limited to:

  • /workspace: Agent working directory
  • /tmp: Temporary files
  • /home/agent: Agent home (tmpfs mount)

This prevents agents from modifying system binaries or installing persistent backdoors.

On this page