Repository navigation
feat(taskpack): replace allowDockerSocket with dual-key command.v1 mounts - #39
Merged
Merged
Conversation
…unts Signed-off-by: thxCode <thxcode0824@gmail.com>
|
✅ OpenCodeReview: Review complete: 0 finding(s) across 8 selected item(s). Reviewed |
…alidation Signed-off-by: thxCode <thxcode0824@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
/kind feature
/area taskpack
/area github-action
/area cli
/area docs
Summary
Replaces the vendor-specific
spec.execution.capabilities.allowDockerSocket/allow-docker-sockettoggle (introduced pre-release in #38) with generic, Docker--mount-style host bind mounts oncommand.v1checks:spec.verification.localChecks[].parameters.mounts[]): Declares0..16entries of{ source, target?, mode?: 'ro' | 'rw' }(targetdefaults tosource;modedefaults to'ro') for host files, directories, or Unix domain sockets (for example{ source: /var/run/docker.sock, mode: rw }).allow-host-mounts/--allow-host-mounts/hostPolicy.allowedHostMounts): Requires bothallowPrivileged: true(allow-privileged-execution: 'true'/--allow-privileged) and an explicit allowlist match for every declaredmount.source.MULTI_TENANT_HOST_POLICYsetsallowedHostMounts: []and refuses all host mounts.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$HOMEsecret paths; under/runand/var/run, only Unix domain sockets (st.isSocket()) are permitted. Linuxbwrapemits--ro-bind/--bindwithout polluting LandlockwritablePaths, and symlinked sockets such as/var/run/docker.sock -> /run/docker.sockbind cleanly at both paths.action.yml,docs/configuration/taskpack.md,docs/operations/github-action.md,docs/operations/cli.md,docs/references/bootstrap-interview.md, and unit tests acrosstaskpackandgithub-app.Verification
npm run build && npm run typecheck && npm run lint && npm run lint:docsnode --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