diff --git a/.github/workflows/cve-edge-post.yml b/.github/workflows/cve-edge-post.yml index d19b313..6c9fb77 100644 --- a/.github/workflows/cve-edge-post.yml +++ b/.github/workflows/cve-edge-post.yml @@ -198,7 +198,18 @@ jobs: print(json.dumps(results, indent=2)) PY - cat "$OUT_DIR/cve-summary.json" >> "$GITHUB_STEP_SUMMARY" + python3 -c ' + import json, os, sys + with open(sys.argv[1]) as f: + data = json.load(f) + print("### 🛡️ CVE 스캔 결과 요약\n") + print("| Catalog | Version | Image | Critical | High | Medium | Low | Summary |") + print("| --- | --- | --- | --- | --- | --- | --- | --- |") + for item in data: + summary = item.get("summary", "").replace("|", "\\|") + print(f"| {item.get(\"catalog\", \"-\")} | {item.get(\"version\", \"-\")} | `{item.get(\"image\", \"-\")}` | {item.get(\"critical\", 0)} | {item.get(\"high\", 0)} | {item.get(\"medium\", 0)} | {item.get(\"low\", 0)} | {summary} |") + ' "$OUT_DIR/cve-summary.json" >> "$GITHUB_STEP_SUMMARY" + - name: CVE 스캔 결과 전송 if: always()