Repository navigation
Description
Related: #215. Audited main: deff5f611308aa538cd3981c3e66ca8dd22cced7; PR #541: 8c6a3873f5b5a9c5c995e24529a8a7eba1061ae6.
Problem and conditions
A repository configuration can supply build.args.BUILDKIT_SYNTAX. The API and agent accept this as an ordinary build argument, but BuildKit interprets it as a frontend selector. In the Nixpacks path, explicit arguments bypass the function that deliberately removes BUILDKIT_* names to prevent changing the Dockerfile frontend.
The actor must be able to change the Git configuration that Shipkeep accepts and have a build deployed. This is not an unauthenticated API issue. Main already accepts the argument for Dockerfile builds; PR #541 makes the Nixpacks path reachable through normal Git application deployments. These are one frontend-policy issue, not two independent vulnerabilities.
Evidence
- The configuration schema permits the reserved name. The agent validator does not exclude it either.
- PR feat(api): Git applications build with Railpack or Nixpacks (part of #215) #541's planner and action adapter preserve it.
- Nixpacks merges explicit arguments after filtering the generated script, bypassing its documented restriction. The Dockerfile path also forwards these arguments.
- BuildKit's frontend implementation interprets the selector before building the Dockerfile.
A pure local test passed through the real applicationConfig → plan → agentAction implementations and confirmed propagation with BuildType.NIXPACKS. It used an inert .invalid marker and fake credentials. The relevant API and agent files remain identical at PR #541 head 23dbfe5ef49b209e0bef36fbe8ad1a3e487c3fe7, rechecked before publication.
Impact and limits
The supplied argument can select a frontend outside the intended Nixpacks-generated build path. That crosses the boundary between application build parameters and the component interpreting the build and its session inputs. The current SPEC does not explicitly reserve these names globally; a Dockerfile frontend directive may be intentional functionality, so its policy must be decided explicitly.
No external frontend, secret-access payload, or exfiltration was executed. This evidence establishes acceptance and a reachable selector, not credential theft or a container escape.
Proposed correction and acceptance
Apply one reserved-argument policy to explicit and generated arguments, with agent-side enforcement and an API validation error. Define separately whether user-selected Dockerfile frontends are permitted; if permitted, document and constrain their session capabilities rather than treating them as trusted.
- Explicit arguments cannot restore a name removed by the Nixpacks filter.
- Tests cover reserved arguments through configuration, planning and agent validation, plus ordinary arguments.
- Tests and documentation specify the policy for both
BUILDKIT_SYNTAXand Dockerfile frontend directives. - The fix does not depend on hiding a secret identifier from an otherwise untrusted frontend.
Publication check (2026-11-27): main advanced to 817f6ac3b00fdb0e81331e519abc5668a1560aee through #539. The affected production paths cited above are unchanged; the source links retain the audited revision.
Activity
test(agent): the refused frontend is named as BuildKit names it (part…
docs: a Dockerfile may name only the official Dockerfile frontend (pa…