ci: fix vuln count parsing in harbor scan
Some checks failed
CI / Lint & Format (push) Successful in 22s
CI / Security Scan (push) Successful in 20s
CI / Advanced Security Tests (push) Successful in 16s
CI / Memory Leak Check (push) Successful in 20s
CI / Security Tests (push) Successful in 26s
CI / Unit Tests (push) Successful in 34s
CI / Fuzz Testing (push) Successful in 24s
CI / SBOM Generation (push) Successful in 20s
CI / Build & Push Image (push) Successful in 17s
CI / Harbor Vulnerability Scan (push) Failing after 34s
Some checks failed
CI / Lint & Format (push) Successful in 22s
CI / Security Scan (push) Successful in 20s
CI / Advanced Security Tests (push) Successful in 16s
CI / Memory Leak Check (push) Successful in 20s
CI / Security Tests (push) Successful in 26s
CI / Unit Tests (push) Successful in 34s
CI / Fuzz Testing (push) Successful in 24s
CI / SBOM Generation (push) Successful in 20s
CI / Build & Push Image (push) Successful in 17s
CI / Harbor Vulnerability Scan (push) Failing after 34s
This commit is contained in:
@@ -421,8 +421,8 @@ jobs:
|
||||
-u "$HARBOR_USER" -p "$HARBOR_PASS" \
|
||||
vulns library flaskpaste -d ${tag} -s high -l 100 > /tmp/high-${tag}.txt 2>&1 || true
|
||||
|
||||
CRITICAL=$(grep -v "N/A *$" /tmp/critical-${tag}.txt | grep -c "^CVE\|^GHSA" || echo 0)
|
||||
HIGH=$(grep -v "N/A *$" /tmp/high-${tag}.txt | grep -c "^CVE\|^GHSA" || echo 0)
|
||||
CRITICAL=$(grep -v "N/A *$" /tmp/critical-${tag}.txt 2>/dev/null | grep -c "^CVE\|^GHSA" 2>/dev/null) || CRITICAL=0
|
||||
HIGH=$(grep -v "N/A *$" /tmp/high-${tag}.txt 2>/dev/null | grep -c "^CVE\|^GHSA" 2>/dev/null) || HIGH=0
|
||||
|
||||
echo " :${tag} - Critical fixable: $CRITICAL, High fixable: $HIGH"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user