From 5673da39d193b94ac551b1ff33038630ccae295d Mon Sep 17 00:00:00 2001 From: msslulu <1484036491@qq.com> Date: Tue, 1 Sep 2026 04:47:37 -0700 Subject: [PATCH] fix:codeql scan --- .github/workflows/codeql-full.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/codeql-full.yml b/.github/workflows/codeql-full.yml index 8b55b4d5..5b80ac28 100644 --- a/.github/workflows/codeql-full.yml +++ b/.github/workflows/codeql-full.yml @@ -139,16 +139,12 @@ jobs: html_count=0 while IFS= read -r -d '' sarif_file; do - relative_path="${sarif_file#codeql-sarif/}" - html_file="$html_dir/${relative_path%.sarif}.html" - mkdir -p "$(dirname "$html_file")" - - sarif html "$sarif_file" --output "$html_file" + sarif html "$sarif_file" --output "$html_dir" html_count=$((html_count + 1)) - printf '%s -> %s\n' "$sarif_file" "$html_file" + printf '%s -> %s/\n' "$sarif_file" "$html_dir" done < <(find codeql-sarif -type f -name '*.sarif' -print0) - index_file="$html_dir/index.html" + index_file="$html_dir/reports.html" { printf '\n' printf '\n' @@ -159,7 +155,7 @@ jobs: while IFS= read -r -d '' html_file; do link="${html_file#$html_dir/}" printf '
  • %s
  • \n' "$link" "$link" - done < <(find "$html_dir" -type f -name '*.html' ! -name 'index.html' -print0 | sort -z) + done < <(find "$html_dir" -maxdepth 1 -type f -name '*.html' ! -name 'reports.html' -print0 | sort -z) printf '\n' printf '\n' printf '\n'