ci: fix harbor-ctl scan/vulns command syntax
Some checks failed
CI / Security Scan (push) Successful in 20s
CI / Lint & Format (push) Successful in 22s
CI / Advanced Security Tests (push) Successful in 15s
CI / Memory Leak Check (push) Successful in 19s
CI / Security Tests (push) Successful in 25s
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 18s
CI / Harbor Vulnerability Scan (push) Failing after 34s
Some checks failed
CI / Security Scan (push) Successful in 20s
CI / Lint & Format (push) Successful in 22s
CI / Advanced Security Tests (push) Successful in 15s
CI / Memory Leak Check (push) Successful in 19s
CI / Security Tests (push) Successful in 25s
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 18s
CI / Harbor Vulnerability Scan (push) Failing after 34s
This commit is contained in:
@@ -394,13 +394,13 @@ jobs:
|
||||
echo "Triggering vulnerability scan for standard image..."
|
||||
python harbor-ctl.py --url https://harbor.mymx.me \
|
||||
-u "$HARBOR_USER" -p "$HARBOR_PASS" \
|
||||
scan library flaskpaste:latest --wait --timeout 180
|
||||
scan library flaskpaste -d latest --wait --timeout 180
|
||||
|
||||
# Scan slim image
|
||||
echo "Triggering vulnerability scan for slim image..."
|
||||
python harbor-ctl.py --url https://harbor.mymx.me \
|
||||
-u "$HARBOR_USER" -p "$HARBOR_PASS" \
|
||||
scan library flaskpaste:slim --wait --timeout 180
|
||||
scan library flaskpaste -d slim --wait --timeout 180
|
||||
|
||||
- name: Check for critical vulnerabilities
|
||||
env:
|
||||
@@ -415,11 +415,11 @@ jobs:
|
||||
|
||||
python harbor-ctl.py --url https://harbor.mymx.me \
|
||||
-u "$HARBOR_USER" -p "$HARBOR_PASS" \
|
||||
vulns library flaskpaste:${tag} -s critical -l 100 > /tmp/critical-${tag}.txt 2>&1 || true
|
||||
vulns library flaskpaste -d ${tag} -s critical -l 100 > /tmp/critical-${tag}.txt 2>&1 || true
|
||||
|
||||
python harbor-ctl.py --url https://harbor.mymx.me \
|
||||
-u "$HARBOR_USER" -p "$HARBOR_PASS" \
|
||||
vulns library flaskpaste:${tag} -s high -l 100 > /tmp/high-${tag}.txt 2>&1 || true
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user