Repository navigation
Closed
Description
Problem
When a project builds from its own Dockerfile, alios start asks for the value of every ARG that has no default (promptForBuildArgs). It then stores the answers on the container as the alios.project.build_args label (project.Manager.createContainer, serializeBuildArgs), so later rebuilds don't have to ask again.
Dockerfiles commonly use exactly these no-default ARGs for credentials, e.g. ARG GITHUB_TOKEN for pulling private Composer packages. That means:
- Labels: the secret sits in plain text in the container's labels. Anyone or anything that can run
docker inspectcan read it, and so can anything with Docker socket access (the newalios_idleservice in Scale to zero: stop idle projects, start them on the next visit #3, Portainer, and so on). It also ends up in anydocker inspectoutput pasted into a bug report. - Build arguments:
docker.Client.BuildImagepasses each value as--build-arg KEY=value, so it shows inpswhile a build runs.
Found on a real project. A GitHub OAuth token (gho_…) is in the label of one local project container. It isn't in that image's docker history.
Proposed fix
- Stop persisting secret values. For keys that look like credentials (
*TOKEN*,*SECRET*,*PASSWORD*,*_KEY,*AUTH*), store only the key name in the label. At build time, read the value from the same-named environment variable, and prompt only if it isn't set. Non-secret build args keep working as they do now. - Pass secrets as BuildKit secrets. Pass them as
--secret id=KEY,env=KEYinstead of--build-arg, so they never reach argv or the image. Dockerfiles opt in withRUN --mount=type=secret,id=GITHUB_TOKEN …. For Dockerfiles that still useARG, keep--build-arg, but take the value from the environment (--build-arg KEYwith no value) so it stays out of argv. - Migrate. On the next
alios startoralios rebuild, drop secret values from existing labels. That needs a container recreate, the same pathalios envuses. - Doctor.
alios doctorwarns when a container label holds a credential-looking build arg value. - Docs. Recommend BuildKit secrets in the README's image-selection section.
For whoever is affected now
Rotate any token that was entered at the build-arg prompt. It's readable from docker inspect on that project's container.
Metadata
Metadata
Assignees
Labels
No labels
Activity
linear-code commentedon Oct 14, 2026
ALI-837
michaelaguiar commentedon Oct 14, 2026
Tracked in Linear as ALI-837, along with rotating the glowhouse token.
michaelaguiar commentedon Oct 28, 2026
Fixed in #14, released in v2.2.0. Build args whose names look like credentials are now saved by name only. Their values reach
docker buildthrough its environment rather than its command line, and come fromINGOT_BUILD_ARG_<NAME>or a prompt.ingot doctorwarns when a container still holds a value saved by an older version.If you used a token build arg on an older version, revoke that token (it was readable from
docker inspect), then runingot rebuildin the project.