Skip to content

Commit 04b00ac

Browse files
authored
fix: update base images and trivy scanner for v1.28.x (#313)
- Bump base-server from 1.15.16 to 1.15.18 - Bump base-admin-tools from 1.12.16 to 1.12.18 - Replace trivy-action@0.28.0 with setup-trivy@v0.2.5 (v0.69.3) using direct CLI invocation and proper DB extraction
1 parent f68d423 commit 04b00ac

File tree

3 files changed

+24
-18
lines changed

3 files changed

+24
-18
lines changed

.github/actions/trivy/action.yml

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ runs:
2323
name=${NAME// /-}
2424
echo "tag=${tag}" >> $GITHUB_OUTPUT
2525
echo "name=${name}" >> $GITHUB_OUTPUT
26-
26+
2727
- name: Install ORAS
2828
id: oras
2929
uses: oras-project/setup-oras@v1
@@ -39,28 +39,34 @@ runs:
3939
id: pull
4040
shell: bash
4141
run: |
42+
mkdir -p $GITHUB_WORKSPACE/.cache/trivy/db
4243
oras pull ghcr.io/temporalio/trivy-db:2
44+
tar -xzf db.tar.gz -C $GITHUB_WORKSPACE/.cache/trivy/db
45+
rm db.tar.gz
46+
47+
mkdir -p $GITHUB_WORKSPACE/.cache/trivy/java-db
4348
oras pull ghcr.io/temporalio/trivy-java-db:1
49+
tar -xzf javadb.tar.gz -C $GITHUB_WORKSPACE/.cache/trivy/java-db
50+
rm javadb.tar.gz
51+
52+
- name: Install Trivy
53+
uses: aquasecurity/setup-trivy@v0.2.5
54+
with:
55+
version: v0.69.3
4456

4557
- name: Scan Container Image
4658
id: scan
47-
uses: aquasecurity/trivy-action@0.28.0
59+
shell: bash
4860
env:
49-
TRIVY_DB_REPOSITORY: ghcr.io/temporalio/private-actions/trivy-db,public.ecr.aws/aquasecurity/trivy-db,ghcr.io/aquasecurity/trivy-db
50-
TRIVY_JAVA_DB_REPOSITORY: ghcr.io/temporalio/private-actions/trivy-java-db,public.ecr.aws/aquasecurity/trivy-java-db,ghcr.io/aquasecurity/trivy-java-db
51-
# Not 100% sure if these are required, but so far no issues.
52-
TRIVY_USERNAME: ${{ github.actor }}
53-
TRIVY_PASSWORD: ${{ github.token }}
54-
with:
55-
cache: true
56-
exit-code: 0
57-
image-ref: ${{ steps.vars.outputs.tag }}
58-
format: 'sarif'
59-
output: 'trivy-${{ steps.vars.outputs.name }}-results.sarif'
61+
TRIVY_SKIP_DB_UPDATE: true
62+
TRIVY_SKIP_JAVA_DB_UPDATE: true
63+
TRIVY_CACHE_DIR: ${{ github.workspace }}/.cache/trivy
64+
run: |
65+
trivy image --severity HIGH,CRITICAL --no-progress ${{ steps.vars.outputs.tag }} --format sarif --output trivy-${{ steps.vars.outputs.name }}-results.sarif
6066
61-
- name: Upload ${{ inputs.image-name }} image Trivy scan results to GitHub Security tab
67+
- name: Upload Trivy scan results
6268
uses: github/codeql-action/upload-sarif@v3
63-
#if: always()
69+
if: always()
6470
with:
65-
sarif_file: 'trivy-${{ steps.vars.outputs.name }}-results.sarif'
71+
sarif_file: trivy-${{ steps.vars.outputs.name }}-results.sarif
6672
category: trivy-${{ steps.vars.outputs.name }}-results

admin-tools.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG BASE_ADMIN_TOOLS_IMAGE=temporalio/base-admin-tools:1.12.16
1+
ARG BASE_ADMIN_TOOLS_IMAGE=temporalio/base-admin-tools:1.12.18
22

33
##### Admin Tools #####
44
# This is injected as a context via the bakefile so we don't take it as an ARG

server.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG BASE_SERVER_IMAGE=temporalio/base-server:1.15.16
1+
ARG BASE_SERVER_IMAGE=temporalio/base-server:1.15.18
22

33
FROM ${BASE_SERVER_IMAGE} as temporal-server
44
ARG TARGETARCH

0 commit comments

Comments
 (0)