Skip to content

Commit

Permalink
Some more tweaks
Browse files Browse the repository at this point in the history
Signed-off-by: naveensrinivasan <[email protected]>
  • Loading branch information
naveensrinivasan committed Apr 1, 2024
1 parent fa8f1dd commit 84e4b2d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/scan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,7 @@ jobs:
uds run grype:install
uds run scan:vulns
# Hard coded steps to upload SARIF files for specific repositories
- name: Upload SARIF files for upstream
- name: Upload SARIF files

Check failure on line 36 in .github/workflows/scan.yaml

View workflow job for this annotation

GitHub Actions / Lint

36:33 [trailing-spaces] trailing spaces
uses: github/codeql-action/upload-sarif@1b1aada464948af03b950897e5eb522f92603cc2
with:
sarif_file: sarif/upstream/*.sarif

- name: Upload SARIF files for repo1
uses: github/codeql-action/upload-sarif@1b1aada464948af03b950897e5eb522f92603cc2
with:
sarif_file: sarif/repo1/*.sarif
sarif_file: sarif/*.sarif
6 changes: 3 additions & 3 deletions tasks/scan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ tasks:
uds zarf package inspect "$file" --sbom-out "$output_dir" --no-progress
done
done
sarif_output_dir="./sarif"
mkdir -p "$sarif_output_dir"
for flavor in "${flavors[@]}"; do
sarif_output_dir="./sarif/$flavor"
mkdir -p "$sarif_output_dir"
find "sbom/$flavor" -type f -name "*.json" | while read -r json_file; do
sarif_file_name="$(basename "${json_file}").sarif"
sarif_file_name="${flavor}_$(basename "${json_file}").sarif"
echo "Processing $json_file"
echo "Outputting to $sarif_output_dir/$sarif_file_name"
grype sbom:"$json_file" --fail-on high -o sarif --file "$sarif_output_dir/$sarif_file_name" || true
Expand Down

0 comments on commit 84e4b2d

Please sign in to comment.