Skip to content

Commit 2c89825

Browse files
msukkariclaude
andcommitted
fix: default Trivy scan to main image tag instead of latest
The `main` tag is built on every push to main (release-dev.yml), while `latest` is only set on production releases. Scanning `main` ensures we're triaging the current codebase. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 42c8224 commit 2c89825

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/trivy-vulnerability-triage.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ on:
77
workflow_dispatch:
88
inputs:
99
image_tag:
10-
description: 'Image tag to scan (default: latest)'
10+
description: 'Image tag to scan (default: main)'
1111
required: false
12-
default: 'latest'
12+
default: 'main'
1313
dry_run:
1414
description: 'Dry run (analyze but do not create Linear issues)'
1515
required: false
@@ -50,7 +50,7 @@ jobs:
5050
- name: Run Trivy vulnerability scan
5151
uses: aquasecurity/trivy-action@master
5252
with:
53-
image-ref: "${{ env.IMAGE }}:${{ inputs.image_tag || 'latest' }}"
53+
image-ref: "${{ env.IMAGE }}:${{ inputs.image_tag || 'main' }}"
5454
format: "json"
5555
output: "trivy-results.json"
5656
trivy-config: trivy.yaml
@@ -77,7 +77,7 @@ jobs:
7777
run: |
7878
echo "## Trivy Scan" >> "$GITHUB_STEP_SUMMARY"
7979
echo "" >> "$GITHUB_STEP_SUMMARY"
80-
echo "**Image:** \`${{ env.IMAGE }}:${{ inputs.image_tag || 'latest' }}\`" >> "$GITHUB_STEP_SUMMARY"
80+
echo "**Image:** \`${{ env.IMAGE }}:${{ inputs.image_tag || 'main' }}\`" >> "$GITHUB_STEP_SUMMARY"
8181
echo "" >> "$GITHUB_STEP_SUMMARY"
8282
if [ "${{ steps.check.outputs.has_vulnerabilities }}" = "true" ]; then
8383
VULN_COUNT=$(jq '[.Results[]? | .Vulnerabilities[]?] | length' trivy-results.json)

0 commit comments

Comments
 (0)