Add ref & sha to upload sarif in trivy workflow (#3079)
Signed-off-by: strailov <Stanislav.Trailov@bosch.io>
This commit is contained in:
committed by
GitHub
parent
d4c95ca5e0
commit
f7f94291ad
@@ -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 }}
|
||||
Reference in New Issue
Block a user