Skip to content

Commit

Permalink
Multiple bug fixes in yamls related to patch failing with repos havin…
Browse files Browse the repository at this point in the history
…g namespace, null ref error fix, timeout increase and disabling secret scanner etc
  • Loading branch information
Ruchi Maheshwari committed Jul 16, 2024
1 parent 507d8be commit f1e4209
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: v1.1.0
alias:
values:
ScanReport : os-vulnerability-report_trivy_{{.Values.SOURCE_REPOSITORY}}_{{.Values.SOURCE_IMAGE_TAG}}_$(date "+%Y-%m-%d").json
ScanReport : os-vulnerability-report_trivy_{{ regexReplaceAll "[^a-zA-Z0-9]" .Values.SOURCE_REPOSITORY "-" }}_{{.Values.SOURCE_IMAGE_TAG}}_$(date "+%Y-%m-%d").json
cssc : mcr.microsoft.com/acr/cssc:56f0765
steps:
# Step #1: Perform the vulnerability scan
Expand All @@ -17,6 +17,8 @@ steps:
--vuln-type os \
--ignore-unfixed \
--format json \
--timeout 30m \
--scanners vuln \
--output /workspace/data/$ScanReport
# Step 2: Attach the vulnerability scan report to the image
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ steps:
--vuln-type os \
--ignore-unfixed \
--format json \
--timeout 30m \
--scanners vuln \
--output /workspace/data/vulnerability-report_trivy_$DATE.json
- cmd: cssc jq "[.Results[].Vulnerabilities | length] | add" /workspace/data/vulnerability-report_trivy_$DATE.json > /workspace/data/vulCount.txt
- cmd: cssc jq 'if .Results == null or (.Results | length) == 0 then 0 else [.Results[] | select(.Vulnerabilities != null) | .Vulnerabilities | length] | add end' /workspace/data/vulnerability-report_trivy_$DATE.json > /workspace/data/vulCount.txt
- cmd: bash echo "Generated vulnerability report at /workspace/data/vulnerability-report_trivy_$DATE.json"
- cmd: az login --identity
- cmd: bash echo "Vulnerabilities found for image {{.Values.SOURCE_REPOSITORY}}:{{.Values.SOURCE_IMAGE_TAG}} -> $(cat /workspace/data/vulCount.txt)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ alias:
ScanImageAndSchedulePatchTask: cssc-scan-image
cssc : mcr.microsoft.com/acr/cssc:56f0765
steps:
- cmd: bash -c 'echo "Inside CSSC-TriggerScan, getting images to be patched based on --filter-policy for Registry {{.Run.Registry}}."'
- cmd: bash -c 'echo "Inside cssc-trigger-workflow task, getting list of images to be patched based on --filter-policy for Registry {{.Run.Registry}}."'
- cmd: cssc acr cssc patch --filter-policy csscpolicies/patchpolicy:v1 --dry-run > filterRepos.txt
env:
- ACR_EXPERIMENTAL_CSSC=true
Expand Down

0 comments on commit f1e4209

Please sign in to comment.