Use case
Auditing infrastructure-as-code is exactly the kind of job you want in a sandbox: the input is often untrusted (someone’s checked in config) and the tooling is heavy (hadolint, kubeval, trivy, terraform, kubectl). Thedevops template has the tooling
pre-installed. A TransformationRule keeps real credentials out
of LLM traces even if the manifest accidentally ships one.
Template
devops — git, kubectl, terraform, docker, hadolint, aws-cli,
yq, jq. Heaviest of the built-in templates; first cold-start in
a fresh worker is slower than python.
Run it
Security policy
Dockerfile in
the recipe contains ENV AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE.
Without the rule, that value would travel through the LLM and be
recorded in every trace / audit log / debug output downstream.
With the rule, the edge proxy rewrites it to
***AWS_KEY_REDACTED*** on every outbound request. The auditor
sees the placeholder and can still reason about “there’s a
credential here that needs to move to a secret” — it just doesn’t
get to see the value.
Env isolation
printenv to pick
them up.
What the agent does
printenv CLUSTER_NAME SEVERITY_FLOOR AUDIT_ID.hadolint /workspace/audit/Dockerfile— catches Dockerfile smells (latest tag, missing USER, apt-get update-without-install).- Parse
/workspace/audit/deploy.yaml— flagrunAsUser: 0,privileged: true,:latestimage tag. - Write
/workspace/audit/findings.mdwith sections:## Metadata(from env)## Dockerfile findings## Kubernetes findings## Remediation
- Return
findings.md.
Filesystem isolation
The sample Dockerfile + deploy.yaml are seeded by the Python driver callinginner._sbx.write_file(...) — they never touch
your host. All reports come back through read_file. The next
audit run gets a fresh VM with none of this run’s state.
Full source
Seecookbook/openai_agents_devops_audit.py in the repo.