diff --git a/.github/workflows/reusable_workflow_trivy-scan.yaml b/.github/workflows/reusable_workflow_trivy-scan.yaml index 173842f14..159a490e8 100644 --- a/.github/workflows/reusable_workflow_trivy-scan.yaml +++ b/.github/workflows/reusable_workflow_trivy-scan.yaml @@ -27,6 +27,10 @@ jobs: with: ref: ${{ inputs.ref }} + - name: Get checked-out SHA + id: get-sha + run: echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT" + - name: Set up JDK uses: actions/setup-java@v5.2.0 with: @@ -115,6 +119,8 @@ jobs: if: ${{ inputs.upload }} uses: github/codeql-action/upload-sarif@v4.35.1 with: + ref: refs/heads/${{ inputs.ref }} + sha: ${{ steps.get-sha.outputs.sha }} sarif_file: 'scans/hawkbit-ddi-server.sarif' category: "Container Images (hawkbit-ddi-server) [${{ inputs.ref }}]" ref: refs/heads/${{ inputs.ref }} @@ -122,6 +128,8 @@ jobs: if: ${{ inputs.upload }} uses: github/codeql-action/upload-sarif@v4.35.1 with: + ref: refs/heads/${{ inputs.ref }} + sha: ${{ steps.get-sha.outputs.sha }} sarif_file: 'scans/hawkbit-dmf-server.sarif' category: "Container Images (hawkbit-dmf-server) [${{ inputs.ref }}]" ref: refs/heads/${{ inputs.ref }} @@ -129,6 +137,8 @@ jobs: if: ${{ inputs.upload }} uses: github/codeql-action/upload-sarif@v4.35.1 with: + ref: refs/heads/${{ inputs.ref }} + sha: ${{ steps.get-sha.outputs.sha }} sarif_file: 'scans/hawkbit-mgmt-server.sarif' category: "Container Images (hawkbit-mgmt-server) [${{ inputs.ref }}]" ref: refs/heads/${{ inputs.ref }} @@ -136,6 +146,8 @@ jobs: if: ${{ inputs.upload }} uses: github/codeql-action/upload-sarif@v4.35.1 with: + ref: refs/heads/${{ inputs.ref }} + sha: ${{ steps.get-sha.outputs.sha }} sarif_file: 'scans/hawkbit-ui.sarif' category: "Container Images (hawkbit-ui) [${{ inputs.ref }}]" ref: refs/heads/${{ inputs.ref }} @@ -144,6 +156,8 @@ jobs: if: ${{ inputs.upload }} uses: github/codeql-action/upload-sarif@v4.35.1 with: + ref: refs/heads/${{ inputs.ref }} + sha: ${{ steps.get-sha.outputs.sha }} sarif_file: 'scans/hawkbit-update-server.sarif' category: "Container Images (hawkbit-update-server) [${{ inputs.ref }}]" ref: refs/heads/${{ inputs.ref }} @@ -152,6 +166,8 @@ jobs: if: ${{ inputs.upload }} uses: github/codeql-action/upload-sarif@v4.35.1 with: + ref: refs/heads/${{ inputs.ref }} + sha: ${{ steps.get-sha.outputs.sha }} sarif_file: 'scans/hawkbit-repository-jpa-init.sarif' category: "Container Images (hawkbit-repository-jpa-init) [${{ inputs.ref }}]" ref: refs/heads/${{ inputs.ref }} \ No newline at end of file