Copilot commented on code in PR #3719:
URL: 
https://github.com/apache/incubator-kie-tools/pull/3719#discussion_r3818929224


##########
packages/image-builder/src/bin.ts:
##########
@@ -118,6 +118,7 @@ function buildArchImage(args: ArgsType & { arch: string[] | 
undefined }, imageFu
     ${args.push ? "--push" : ""}
     ${imageFullNames.map((fullName) => `-t ${fullName}`).join(" ")}
     ${args.buildArg.map((arg) => `--build-arg ${arg}`).join(" ")}
+    ${args.secret.map((s) => `--secret ${s}`).join(" ")}

Review Comment:
   Each secret specification is interpolated unquoted into a command executed 
through a shell. A valid source path containing spaces is split into multiple 
arguments, and shell metacharacters in an id/path/environment-variable name are 
interpreted as commands. Preserve each `--secret` value as one argument by 
invoking Docker with an argument array (for example via `spawnSync`) instead of 
constructing a shell command string.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to