Dockers build in automatic platform args in the global scope should be recognized and should not be annotated as missing.
https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope
Example:
FROM alpine:latest as amd64
COPY /appbin/x86_64-unknown-linux-gnu/bin /app
RUN chmod +x /app
FROM alpine:latest as arm
COPY /appbin/armv7-unknown-linux-gnueabihf/bin /app
RUN chmod +x /app
FROM ${TARGETARCH} as build
FROM scratch
COPY --from=build /app /app
ENTRYPOINT ["/app"]
