Skip to content

Commit

Permalink
[PILOT-5663] Added trivy step (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
vbezbakh-indocsystems authored Jul 23, 2024
1 parent 339fb92 commit cc12d5b
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 0 deletions.
Empty file added .github/.trivyignore
Empty file.
29 changes: 29 additions & 0 deletions .github/workflows/pilot-pipeline-admin-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,35 @@ jobs:
push: ${{ github.event_name != 'pull_request' }}
# Sets the target stage to build
target: arranger-admin-server
load: true

- name: Run Trivy vulnerability scanner
uses: aquasecurity/[email protected]
with:
image-ref: '${{ steps.meta.outputs.tags }}'
format: 'table'
severity: 'CRITICAL'
exit-code: '1'
hide-progress: true
trivyignores: .github/.trivyignore
output: scan-results.txt
env:
TRIVY_IGNORE_STATUS: 'will_not_fix'

- name: Publish Trivy Scan Results to Summary
if: always()
run: |
if [[ -s scan-results.txt ]]; then
{
echo "### Trivy Scan Results"
echo "<details><summary>Click to expand</summary>"
echo ""
echo '```arranger-admin-server'
cat scan-results.txt
echo '```'
echo "</details>"
} >> $GITHUB_STEP_SUMMARY
fi
trigger_pilot_dev_deployment:
needs: [build-and-push-docker-image, get-version]
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/pilot-pipeline-admin-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,35 @@ jobs:
push: ${{ github.event_name != 'pull_request' }}
# Sets the target stage to build
target: arranger-admin-ui
load: true

- name: Run Trivy vulnerability scanner
uses: aquasecurity/[email protected]
with:
image-ref: '${{ steps.meta.outputs.tags }}'
format: 'table'
severity: 'CRITICAL'
exit-code: '1'
hide-progress: true
trivyignores: .github/.trivyignore
output: scan-results.txt
env:
TRIVY_IGNORE_STATUS: 'will_not_fix'

- name: Publish Trivy Scan Results to Summary
if: always()
run: |
if [[ -s scan-results.txt ]]; then
{
echo "### Trivy Scan Results"
echo "<details><summary>Click to expand</summary>"
echo ""
echo '```arranger-admin-ui'
cat scan-results.txt
echo '```'
echo "</details>"
} >> $GITHUB_STEP_SUMMARY
fi
trigger_pilot_dev_deployment:
needs: [build-and-push-docker-image, get-version]
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/pilot-pipeline-server-filter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,35 @@ jobs:
push: ${{ github.event_name != 'pull_request' }}
# Sets the target stage to build
target: arranger-server
load: true

- name: Run Trivy vulnerability scanner
uses: aquasecurity/[email protected]
with:
image-ref: '${{ steps.meta.outputs.tags }}'
format: 'table'
severity: 'CRITICAL'
exit-code: '1'
hide-progress: true
trivyignores: .github/.trivyignore
output: scan-results.txt
env:
TRIVY_IGNORE_STATUS: 'will_not_fix'

- name: Publish Trivy Scan Results to Summary
if: always()
run: |
if [[ -s scan-results.txt ]]; then
{
echo "### Trivy Scan Results"
echo "<details><summary>Click to expand</summary>"
echo ""
echo '```arranger-server-filter'
cat scan-results.txt
echo '```'
echo "</details>"
} >> $GITHUB_STEP_SUMMARY
fi
trigger_pilot_dev_deployment:
needs: [build-and-push-docker-image, get-version]
Expand Down

0 comments on commit cc12d5b

Please sign in to comment.