Skip to content

Support GitHub job container options and volumes - #373

Open
lox wants to merge 15 commits into
mainfrom
compat/job-container-options-volumes
Open

Support GitHub job container options and volumes#373
lox wants to merge 15 commits into
mainfrom
compat/job-container-options-volumes

Conversation

@lox

@lox lox commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Why

GitHub Actions workflows can pass Docker create options and mount named, anonymous, or host volumes on job containers. buildkite-gha rejected these fields; in a partial corpus of 68,194 public workflows, container options blocked 377 workflows and container volumes blocked 101.

What

Pass job container options to docker create as parsed arguments without a shell, matching the existing service-container path. Reject --network, --net, and --entrypoint, including --flag=value, so the runner retains its network and entrypoint. Options reject expressions, line breaks, NUL bytes, and values over 65,536 bytes. Registry credentials remain out of scope.

Support GitHub job volumes as DESTINATION for anonymous volumes and SOURCE:DESTINATION[:ro|rw] for named volumes or absolute host bind mounts. Destinations and host sources must be absolute; named sources use Docker volume names. Expressions, duplicate declarations, anonymous volume modes, and lists over 128 entries are rejected. Cleanup snapshots pre-existing volumes, preserves them, and removes only volumes created during the job, including ambiguous create and cancellation paths.

General Docker options and host bind mounts can grant broad host authority. The private network, ownership tracking, masking, and cleanup reduce accidental residue; whole-job queue isolation remains the security boundary.

@buildsworth-bk-app buildsworth-bk-app Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One cleanup hole remains for an accepted volume list; details inline.

Want to dig deeper?

Paste this into your agent to explore the findings from this review's Buildkite build:

Download the buildsworth logs from build 19630, then answer my questions about the findings.

Install the reading-buildsworth-logs skill to run this.

About buildsworth

How to request a review: Comment @buildsworth-bk review on the PR, or request buildsworth-bk as a reviewer.

Risk labels (how buildsworth classifies risk) — buildsworth classifies risk itself from the diff. Unless repository policy already allows L2 approval, grant it by mentioning @buildsworth-bk (see approval ceiling and L2 approval grant):

  • L1 — Low risk (dep bumps, docs/copy, lockfiles, small presentational fixes). buildsworth may approve by default.
  • L2 — Standard risk (new UI, additive API fields, refactors). Approved only when repository policy or a verified grant allows it; otherwise comment-only.
  • L3 — High risk (auth, migrations, payments, secrets, perf-critical paths). Human review always required.

Comment thread internal/containerpolicy/policy.go

lox commented Aug 22, 2026

Copy link
Copy Markdown
Contributor Author

@buildsworth-bk review

@buildsworth-bk-app
buildsworth-bk-app Bot dismissed their stale review August 22, 2026 07:25

Previous concerns have been addressed.

@buildsworth-bk-app buildsworth-bk-app Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The duplicate-target cleanup path is fixed. One related validation gap can still leave an earlier named volume behind; details inline.

Want to dig deeper?

Paste this into your agent to explore the findings from this review's Buildkite build:

Download the buildsworth logs from build 19634, then answer my questions about the findings.

Install the reading-buildsworth-logs skill to run this.

Comment thread internal/containerpolicy/policy.go Outdated

lox commented Aug 22, 2026

Copy link
Copy Markdown
Contributor Author

@buildsworth-bk review

@buildsworth-bk-app
buildsworth-bk-app Bot dismissed their stale review August 22, 2026 07:36

Previous concerns have been addressed.

@buildsworth-bk-app buildsworth-bk-app Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The one-character volume-name gap is fixed. One cancellation-time cleanup path remains; details inline.

Want to dig deeper?

Paste this into your agent to explore the findings from this review's Buildkite build:

Download the buildsworth logs from build 19638, then answer my questions about the findings.

Install the reading-buildsworth-logs skill to run this.

Comment thread internal/runtime/containers.go Outdated
@buildsworth-bk-app
buildsworth-bk-app Bot dismissed their stale review August 22, 2026 07:47

Previous concern has been addressed.

@buildsworth-bk-app buildsworth-bk-app Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The earlier findings are addressed. I found two remaining edge cases in raw-container adaptation and cancellation cleanup; details inline.

Want to dig deeper?

Paste this into your agent to explore the findings from this review's Buildkite build:

Download the buildsworth logs from build 19642, then answer my questions about the findings.

Install the reading-buildsworth-logs skill to run this.

Comment thread internal/workflow/parse.go
Comment thread internal/runtime/containers.go Outdated

@buildsworth-bk-app buildsworth-bk-app Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both previous blocking concerns remain open on the current revision; I found no new issues.

Want to dig deeper?

Paste this into your agent to explore the findings from this review's Buildkite build:

Download the buildsworth logs from build 19642, then answer my questions about the findings.

Install the reading-buildsworth-logs skill to run this.

@buildsworth-bk-app
buildsworth-bk-app Bot dismissed stale reviews from themself August 22, 2026 07:58

Previous concerns have been addressed.

@buildsworth-bk-app buildsworth-bk-app Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The previous blocking concerns are fixed, and I found no new issues. This changes the job-container security boundary, so I'm leaving final approval to a human.

Want to dig deeper?

Paste this into your agent to explore the findings from this review's Buildkite build:

Download the buildsworth logs from build 19647, then answer my questions about the findings.

Install the reading-buildsworth-logs skill to run this.

@lox lox changed the title Support bounded job container options and volumes Support GitHub job container options and volumes Aug 22, 2026

@buildsworth-bk-app buildsworth-bk-app Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The job-plan schema still rejects values the compiler now accepts; details inline.

Want to dig deeper?

Paste this into your agent to explore the findings from this review's Buildkite build:

Download the buildsworth logs from build 19657, then answer my questions about the findings.

Install the reading-buildsworth-logs skill to run this.

Comment thread schemas/job-plan.schema.json Outdated
@buildsworth-bk-app
buildsworth-bk-app Bot dismissed their stale review August 22, 2026 09:21

Previous concerns have been addressed.

@buildsworth-bk-app buildsworth-bk-app Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The schema contract is aligned now. One new cleanup path can still leave an ambiguously-created container behind; details inline.

Want to dig deeper?

Paste this into your agent to explore the findings from this review's Buildkite build:

Download the buildsworth logs from build 19659, then answer my questions about the findings.

Install the reading-buildsworth-logs skill to run this.

Comment thread internal/runtime/containers.go Outdated
@buildsworth-bk-app
buildsworth-bk-app Bot dismissed their stale review August 22, 2026 09:36

Previous concerns have been addressed.

@buildsworth-bk-app buildsworth-bk-app Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The previous container-reconciliation concern is fixed. A related volume cleanup path is still incomplete; details inline.

Want to dig deeper?

Paste this into your agent to explore the findings from this review's Buildkite build:

Download the buildsworth logs from build 19662, then answer my questions about the findings.

Install the reading-buildsworth-logs skill to run this.

Comment thread internal/runtime/containers.go
@buildsworth-bk-app
buildsworth-bk-app Bot dismissed their stale review August 22, 2026 09:45

Previous concerns have been addressed.

@buildsworth-bk-app buildsworth-bk-app Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The previous ambiguous-create volume reconciliation concern is fixed. One separate successful-create timeout path can still leave a named volume behind; details inline.

Want to dig deeper?

Paste this into your agent to explore the findings from this review's Buildkite build:

Download the buildsworth logs from build 19663, then answer my questions about the findings.

Install the reading-buildsworth-logs skill to run this.

Comment thread internal/runtime/containers.go
@buildsworth-bk-app
buildsworth-bk-app Bot dismissed their stale review August 22, 2026 09:54

Previous concerns have been addressed.

@buildsworth-bk-app buildsworth-bk-app Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The previous volume-tracking concern is fixed. A separate setup-failure path can treat the pre-existing Docker volume set as job-owned and remove it; details inline. I also noted one documented anonymous-volume form that Docker rejects.

Want to dig deeper?

Paste this into your agent to explore the findings from this review's Buildkite build:

Download the buildsworth logs from build 19665, then answer my questions about the findings.

Install the reading-buildsworth-logs skill to run this.

Comment thread internal/runtime/containers.go
Comment thread internal/containerpolicy/policy.go Outdated
@buildsworth-bk-app
buildsworth-bk-app Bot dismissed their stale review August 22, 2026 10:03

Previous concerns have been addressed.

@buildsworth-bk-app buildsworth-bk-app Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The previous concerns are fixed, and I found no new issues. This expands the job-container security boundary through broad Docker create options and host bind mounts, so I’m leaving final approval to a human.

Want to dig deeper?

Paste this into your agent to explore the findings from this review's Buildkite build:

Download the buildsworth logs from build 19666, then answer my questions about the findings.

Install the reading-buildsworth-logs skill to run this.

@wolfeidau wolfeidau left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of small observations.

Comment thread internal/containerpolicy/policy.go
Comment thread internal/runtime/containers.go
@lox
lox force-pushed the compat/job-container-options-volumes branch from 3c3e7f5 to 2b2f8e6 Compare August 24, 2026 02:32

@buildsworth-bk-app buildsworth-bk-app Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found no new issues. Broad Docker create options and host bind mounts expand job-container host authority, so I’m leaving final approval to a human.

Want to dig deeper?

Paste this into your agent to explore the findings from this review's Buildkite build:

Download the buildsworth logs from build 19917, then answer my questions about the findings.

Install the reading-buildsworth-logs skill to run this.

@lox
lox requested a review from wolfeidau August 24, 2026 02:39
ampagent and others added 13 commits August 24, 2026 05:24
Amp-Thread-ID: https://ampcode.com/threads/T-01a02836-fd56-769a-b44a-a7412431fd1d
Co-authored-by: Lachlan Donald <lachlan@buildkite.com>
Amp-Thread-ID: https://ampcode.com/threads/T-01a02836-fd56-769a-b44a-a7412431fd1d
Co-authored-by: Lachlan Donald <lachlan@buildkite.com>
Amp-Thread-ID: https://ampcode.com/threads/T-01a02836-fd56-769a-b44a-a7412431fd1d
Co-authored-by: Lachlan Donald <lachlan@buildkite.com>
Amp-Thread-ID: https://ampcode.com/threads/T-01a02836-fd56-769a-b44a-a7412431fd1d
Co-authored-by: Lachlan Donald <lachlan@buildkite.com>
Amp-Thread-ID: https://ampcode.com/threads/T-01a02836-fd56-769a-b44a-a7412431fd1d
Co-authored-by: Lachlan Donald <lachlan@buildkite.com>
Amp-Thread-ID: https://ampcode.com/threads/T-01a02836-fd56-769a-b44a-a7412431fd1d
Co-authored-by: Lachlan Donald <lachlan@buildkite.com>
Amp-Thread-ID: https://ampcode.com/threads/T-01a02836-fd56-769a-b44a-a7412431fd1d
Co-authored-by: Lachlan Donald <lachlan@buildkite.com>
@lox
lox force-pushed the compat/job-container-options-volumes branch from 2b2f8e6 to 79a8dff Compare August 24, 2026 05:30

@buildsworth-bk-app buildsworth-bk-app Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Broad Docker create options and host bind mounts expand job-container host authority, so I’m leaving final approval to a human. I found one non-blocking workflow-program completeness gap inline.

Want to dig deeper?

Paste this into your agent to explore the findings from this review's Buildkite build:

Download the buildsworth logs from build 20113, then answer my questions about the findings.

Install the reading-buildsworth-logs skill to run this.

Comment thread internal/program/program.go
Amp-Thread-ID: https://ampcode.com/threads/T-01a02836-fd56-769a-b44a-a7412431fd1d
Co-authored-by: Lachlan Donald <lachlan@buildkite.com>

@buildsworth-bk-app buildsworth-bk-app Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow-program inventory gap is fixed. Broad Docker create options and host bind mounts expand job-container host authority, so final approval still needs a human.

Want to dig deeper?

Paste this into your agent to explore the findings from this review's Buildkite build:

Download the buildsworth logs from build 20126, then answer my questions about the findings.

Install the reading-buildsworth-logs skill to run this.

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.

3 participants