[security] Quote extra-args, redact arg values in log, docker logout on exit #4

Merged
stephen merged 1 commit from fix/3-extra-args-and-secret-leak into main 2026-06-23 22:13:13 +00:00
Owner

Closes #3.

Why: extra-args was expanded unquoted (word-split/glob injection), the assembled command echoed --build-arg/--label values in plaintext, and credentials were left logged-in on shared runners.

  • extra-args parsed with read -r -a (safe argv); doc updated to space-separated.
  • Build-command echo redacts --build-arg/--label/--secret/--ssh values.
  • docker logout on EXIT trap when a login happened.
  • Tests added (stub docker on PATH, assert argv + redaction).

Testing: tests/run.sh.

DO NOT MERGE: security-sensitive; lead/operator review.

Closes #3. Why: extra-args was expanded unquoted (word-split/glob injection), the assembled command echoed --build-arg/--label values in plaintext, and credentials were left logged-in on shared runners. - extra-args parsed with `read -r -a` (safe argv); doc updated to space-separated. - Build-command echo redacts --build-arg/--label/--secret/--ssh values. - `docker logout` on EXIT trap when a login happened. - Tests added (stub docker on PATH, assert argv + redaction). Testing: tests/run.sh. DO NOT MERGE: security-sensitive; lead/operator review.
Harden docker build argument handling
All checks were successful
test / unit (pull_request) Successful in 5s
test / e2e (pull_request) Successful in 3s
9d79a43beb
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
rasterstate/docker-build-action!4
No description provided.