diff --git a/.github/workflows/grype.yml b/.github/workflows/grype.yml index cbd97e8e46..7340b4f0e2 100644 --- a/.github/workflows/grype.yml +++ b/.github/workflows/grype.yml @@ -19,21 +19,26 @@ jobs: linux: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - name: Harden Runner + uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1 + with: + egress-policy: audit + + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: fetch-depth: 0 - name: Set up Go - uses: actions/setup-go@v4 + uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 with: go-version: '1.21' - - uses: actions/cache@v3 + - uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: | ${{ runner.os }}-go- - name: Scan current project - uses: anchore/scan-action@v3 + uses: anchore/scan-action@24fd7c9060f3c96848dd1929fac8d796fb5ae4b4 # v3.3.6 with: path: "." fail-build: true diff --git a/Dockerfile b/Dockerfile index 7508791e3b..eed3ba382c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.21-alpine AS build-env +FROM golang:1.21-alpine@sha256:110b07af87238fbdc5f1df52b00927cf58ce3de358eeeb1854f10a8b5e5e1411 AS build-env ENV CGO_ENABLED 0 @@ -59,7 +59,7 @@ RUN go mod download RUN make clean RUN make git-credential-gopass -FROM alpine:3.18 +FROM alpine@sha256:eece025e432126ce23f223450a0326fbebde39cdf496a85d8c016293fc851978 RUN apk add --no-cache ca-certificates git gnupg COPY --from=build-env /home/runner/work/gopass/gopass/gopass /usr/local/bin/ COPY --from=build-env /home/runner/work/gopass/gopass-jsonapi/gopass-jsonapi /usr/local/bin/