1
0
mirror of https://github.com/securego/gosec.git synced 2024-12-28 21:08:22 +02:00

Expand the arguments to a list of strings when they are provided as a single string

The GitHub action provide the arguments as a single string to the docker container,
so we need to expand them in order for gosec to properly interpret them.

Signed-off-by: Cosmin Cojocar <cosmin.cojocar@gmx.ch>
This commit is contained in:
Cosmin Cojocar 2020-07-06 11:06:56 +02:00 committed by Cosmin Cojocar
parent 59cbe0071f
commit 37d1af0af3
2 changed files with 10 additions and 2 deletions

View File

@ -8,7 +8,8 @@ RUN go mod download
RUN make build-linux
FROM golang:${GO_VERSION}-alpine
RUN apk add --update --no-cache ca-certificates git gcc libc-dev
RUN apk add --update --no-cache ca-certificates bash git gcc libc-dev
ENV GO111MODULE on
COPY --from=builder /build/gosec /bin/gosec
ENTRYPOINT ["/bin/gosec"]
COPY entrypoint.sh /bin/entrypoint.sh
ENTRYPOINT ["/bin/entrypoint.sh"]

7
entrypoint.sh Executable file
View File

@ -0,0 +1,7 @@
#!/usr/bin/env bash
# Expand the arguments into an array of strings. This is requires because the GitHub action
# provides all arguments concatenated as a single string.
ARGS=("$@")
/bin/gosec ${ARGS[*]}