Skip to content

feat(taskpack): replace allowDockerSocket with dual-key command.v1 mounts - #39

Merged
thxCode merged 2 commits into
mainfrom
feat/command-v1-host-mounts
Nov 22, 2026
Merged

thxCode merged 2 commits into
mainfrom
feat/command-v1-host-mounts

Conversation

@thxCode

@thxCode thxCode commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

/kind feature
/area taskpack
/area github-action
/area cli
/area docs

Summary

Replaces the vendor-specific spec.execution.capabilities.allowDockerSocket / allow-docker-socket toggle (introduced pre-release in #38) with generic, Docker --mount-style host bind mounts on command.v1 checks:

  • Manifest (spec.verification.localChecks[].parameters.mounts[]): Declares 0..16 entries of { source, target?, mode?: 'ro' | 'rw' } (target defaults to source; mode defaults to 'ro') for host files, directories, or Unix domain sockets (for example { source: /var/run/docker.sock, mode: rw }).
  • Dual-key operator allowlist (allow-host-mounts / --allow-host-mounts / hostPolicy.allowedHostMounts): Requires both allowPrivileged: true (allow-privileged-execution: 'true' / --allow-privileged) and an explicit allowlist match for every declared mount.source. MULTI_TENANT_HOST_POLICY sets allowedHostMounts: [] and refuses all host mounts.
  • Defense-in-depth containment: Both schema validation (validateExecutionAuthority / validateTaskpackV2Manifest) and execution-time enforcement (startLocalCommandGateServer / buildCommandScriptInvocation) refuse broad host roots, /etc, /proc, /sys, /dev, /var/lib, control-plane directories (repoRoot, runRoot, scratchBase), and $HOME secret paths; under /run and /var/run, only Unix domain sockets (st.isSocket()) are permitted. Linux bwrap emits --ro-bind / --bind without polluting Landlock writablePaths, and symlinked sockets such as /var/run/docker.sock -> /run/docker.sock bind cleanly at both paths.
  • Docs & tests: Updated action.yml, docs/configuration/taskpack.md, docs/operations/github-action.md, docs/operations/cli.md, docs/references/bootstrap-interview.md, and unit tests across taskpack and github-app.

Verification

  • npm run build && npm run typecheck && npm run lint && npm run lint:docs
  • node --test .test-build/packages/taskpack/test/turnkey.test.js .test-build/packages/github-app/test/schema-v2.test.js .test-build/packages/github-app/test/taskpack-v2-runtime.test.js .test-build/packages/cli/test/cli.test.js

…unts

Signed-off-by: thxCode <thxcode0824@gmail.com>
@gpustack-code-review

gpustack-code-review Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

✅ OpenCodeReview: Review complete: 0 finding(s) across 8 selected item(s).

Reviewed 3150167..49c16bd only; earlier commits in this PR were reviewed in a previous run.

Comment thread packages/taskpack/src/turnkey.ts Resolved
Comment thread packages/taskpack/src/turnkey.ts Resolved
…alidation

Signed-off-by: thxCode <thxcode0824@gmail.com>
@thxCode
thxCode merged commit cc0b76b into main Nov 22, 2026
16 checks passed
@thxCode
thxCode deleted the feat/command-v1-host-mounts branch November 22, 2026 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant