feat: sandbox-runtime integration with e2e Helm tests#16
feat: sandbox-runtime integration with e2e Helm tests#16
Conversation
Add bubblewrap-based sandbox support via @anthropic-ai/sandbox-runtime for secure template execution. Configurable via --sandbox flag and Helm chart values (sandbox.enabled, sandbox.settingsPath).
Go-based e2e tests using commons-test/helm that build the Docker image, install the chart on Kind, and verify healthz, ConfigMap, render endpoint, and sandbox disable/enable. Updates CI workflow to run Go e2e tests.
.github/workflows/helm-test.yml
Outdated
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 7 hours ago
In general, the problem is fixed by adding an explicit permissions block that scopes the GITHUB_TOKEN to the minimum required access. For this workflow, both jobs only need to read repository contents to check out the code; all other operations (Docker build, Kind cluster setup, Go tests, kubectl calls) happen locally or against the ephemeral cluster and do not require repository write permissions.
The best fix, without changing existing functionality, is to define a root-level permissions block alongside name and on, so it applies to both lint and e2e jobs. Setting it to contents: read is sufficient, as none of the steps need to write to the repo or other GitHub resources. Concretely, in .github/workflows/helm-test.yml, insert:
permissions:
contents: readbetween the name: line and the on: block (or just above jobs:; root-level is conventional and clear). No additional imports, actions, or other definitions are required.
| @@ -1,5 +1,8 @@ | ||
| name: Helm Chart Test | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] |
Summary
@anthropic-ai/sandbox-runtimefor secure template execution--sandboxCLI flag and Helm chart values (sandbox.enabled,sandbox.settingsPath)commons-test/helmthat build Docker image, install chart on Kind, and verify deploymentTest plan