Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: bump Go and GoKart versions #5

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
FROM golang:1.16-alpine
FROM golang:1.19-alpine

LABEL com.github.actions.color="green"
LABEL com.github.actions.description="Scan your code with GoKart to finds vulnerabilities using the SSA (single static assignment) form of Go source code."
LABEL com.github.actions.icon="check"
LABEL com.github.actions.name="GoKart Scanner"
LABEL description="Integrate GoKart security static analysis to GitHub Actions"
LABEL maintainer="dwisiswant0"
LABEL repository="https://github.com/kitabisa/gokart-action"
LABEL repository="https://github.com/selesy/gokart-action"

ARG version="v0.2.0"
ENV CGO_ENABLED=0
RUN \
go install github.com/praetorian-inc/gokart@${version} && \
apk add --no-cache bash findutils
WORKDIR /
RUN mkdir junk
WORKDIR /junk
RUN go mod init example.com/junk
RUN go mod tidy
RUN go get github.com/selesy/gokart-pre@v0.5.2-rc1
RUN go install github.com/selesy/gokart-pre
RUN apk add --no-cache bash findutils
COPY entrypoint.sh /bin/entrypoint
RUN chmod +x /bin/entrypoint

ENTRYPOINT ["/bin/entrypoint"]
ENTRYPOINT ["/bin/entrypoint"]
4 changes: 2 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -e

Expand All @@ -7,7 +7,7 @@ if [[ ! -f "${INPUT_DIRECTORY}/go.mod" ]] || [[ $(find "${INPUT_DIRECTORY}" -nam
exit 1
fi

CMD="/go/bin/gokart scan ${INPUT_DIRECTORY}"
CMD="/go/bin/gokart-pre scan ${INPUT_DIRECTORY}"
CMD+=" -s -o ${INPUT_OUTPUT}"
[[ ! -z ${INPUT_INPUT} ]] && CMD+=" -i ${INPUT_INPUT}"
[[ ! -z ${INPUT_GLOBALSTAINTED} ]] && CMD+=" -g"
Expand Down