Skip to content
This repository has been archived by the owner on Jan 29, 2025. It is now read-only.

Commit

Permalink
Add GAS folder to golangci lint and Trivy scans
Browse files Browse the repository at this point in the history
This PR will also:
- update Trivy scans to look only for HIGH & CRITICAL issues

Signed-off-by: Madalina Lazar <[email protected]>
  • Loading branch information
madalazar committed Aug 11, 2023
1 parent 85aa651 commit e72fc46
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/static-analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
runs-on: ${{ inputs.runsOn }}
strategy:
matrix:
workingdir: [extender, telemetry-aware-scheduling]
workingdir: [extender, telemetry-aware-scheduling, gpu-aware-scheduling]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
Expand Down
26 changes: 18 additions & 8 deletions .github/workflows/trivy-scan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ${{ inputs.runsOn }}
strategy:
matrix:
workingdir: [extender, telemetry-aware-scheduling]
workingdir: [extender, telemetry-aware-scheduling, gpu-aware-scheduling]
name: vulnerability-scanners
steps:
- name: Checkout project
Expand All @@ -36,15 +36,25 @@ jobs:
- name: trivy config $DIR
run: |
cd ./${{ matrix.workingdir }}
echo "Running trivy config for ${{ matrix.workingdir }} "
trivy config ./
output=$(trivy config ./)
if echo "$output" | grep -E "CRITICAL|HIGH"; then
echo "::warning::severities CRITICAL and HIGH found in ${{ matrix.workingdir }}"
return 1
echo "Running trivy config for ${{ matrix.workingdir }}, looking for CRITICAL or HIGH severity items..."
trivy config ./ --severity=CRITICAL
output=$(trivy config ./ --severity=CRITICAL)
if [ -n "${output}" ]; then
echo "::warning::severities CRITICAL issues spotted by Trivy in ${{ matrix.workingdir }}"
exit 1
else
echo "trivy config ./ ran successfully"
echo "trivy config ./ --severity=CRITICAL ran successfully"
fi
# look for HIGH severity issues
trivy config ./ --severity=HIGH
output=$(trivy config ./ --severity=HIGH)
if [ -n "${output}" ]; then
echo "::warning::severities HIGH issues spotted by Trivy in ${{ matrix.workingdir }}"
exit 1
else
echo "trivy config ./ --severity=HIGH ran successfully"
fi
cd ..
shell: bash
- name: trivy fs --all packages
Expand Down

0 comments on commit e72fc46

Please sign in to comment.