Skip to content

Commit

Permalink
dont error on scan
Browse files Browse the repository at this point in the history
  • Loading branch information
kuritz committed Jun 14, 2024
1 parent 5977ddf commit 990f9f5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
run: make images
scan:
needs: [ "build" ]
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -44,17 +44,14 @@ jobs:
uses: aquasecurity/trivy-action@master
with:
image-ref: 'k8s-wait-for:latest'
exit-code: 1
format: 'sarif'
output: 'trivy-results-root.sarif'
skip-files: /usr/local/bin/kubectl
- name: Run Trivy Vulnerability Scanner for Non-Root Image
uses: aquasecurity/trivy-action@master
with:
image-ref: 'k8s-wait-for:no-root-latest'
exit-code: 1
format: 'sarif'
output: 'trivy-results-non-root.sarif'
format: 'table'
skip-files: /usr/local/bin/kubectl
# just upload root scan results
- name: Upload Trivy Scan Results to GitHub Security Tab
Expand All @@ -65,7 +62,7 @@ jobs:

deploy:
needs: [ "scan" ]
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'created'
steps:
- name: Login to Docker Hub
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM alpine:3.20.0
FROM alpine:3.20

ENV KUBE_LATEST_VERSION="v1.28.0"
ENV TARGETARCH="amd64"

RUN apk add --update --no-cache curl jq \
&& curl -L https://storage.googleapis.com/kubernetes-release/release/${KUBE_LATEST_VERSION}/bin/linux/$TARGETARCH/kubectl -o /usr/local/bin/kubectl \
&& curl -L "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" -o /usr/local/bin/kubectl \
&& chmod +x /usr/local/bin/kubectl

# Replace for non-root version
Expand Down

0 comments on commit 990f9f5

Please sign in to comment.