Skip to content

Security model

Trust boundaries

Component Trusted? Notes
Runner, environments, metrics, judges (this package and plugins you install) yes Plugins run with your privileges: install only plugins you trust.
Agent code (gymnasium-policy file/package) no Local backend: imported in-process, so it has your privileges. Use the docker backend for untrusted agents.
HTTP agents, LLM APIs no Responses are size-capped, parsed as JSON and checked; redirects are refused.
LLM judge output no Must match a strict JSON Schema; can only make outcomes stricter.
Suite YAML data Parsed with yaml.safe_load and schema-validated.
Scorecard JSON in pg report / pg verify data Validated; all content is HTML-escaped in reports.

Docker backend

pg run SUITE --agent agent.py --backend docker --docker-image IMAGE

  • The container runs only the agent (python -m provingground.worker). The runner, environment, metrics, judge and Scorecard stay on the host, so agent code cannot alter results. The channel is JSON lines on stdin/stdout: observations in, actions out; every message is size-capped (1 MB default) and schema-checked; each call has a timeout (30 s default) and the whole run a wall-clock limit (--docker-timeout, 900 s default). Inside the worker, stdout is redirected to stderr so agent prints cannot inject protocol messages.
  • Container flags: --network none, --read-only, --tmpfs /tmp (noexec, 64 MB), --cap-drop ALL, --security-opt no-new-privileges, --user 65534:65534, --cpus 1, --memory 1g (no swap), --pids-limit 256.
  • Only a private copy of the agent file (or package directory) is mounted, read-only.
  • The manifest records backend: docker and the image's repo digest when available.
  • Build an image with docker build -f docker/Dockerfile -t provingground:local .. Pin images by digest for reproducible runs.

Secrets

API keys are read from an environment variable you name (--api-key-env, default OPENAI_API_KEY). They are sent only as an Authorization header, only over HTTPS (or plain HTTP to localhost/127.0.0.1/::1), never follow redirects, and are never logged or written to Scorecards or reports.

HTML reports

Self-contained: no scripts, no external assets, a default-src 'none' Content Security Policy, and every value escaped.

Signatures

pg verify checks a hosted-service signature over the RFC 8785 canonical JSON of the Scorecard (without signature). This package cannot issue "Verified" Scorecards: local runs are always unsigned.

Reporting a vulnerability

See SECURITY.md.