From 25e889190ddd2b896917b3cf1a3385537761df78 Mon Sep 17 00:00:00 2001 From: 237899745 <237899745@users.noreply.git.workyai.cn> Date: Sun, 26 Jul 2026 07:47:34 +0800 Subject: [PATCH] ci: audit from retryable RustSec snapshot --- .gitea/workflows/ci.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 79f84ed..394e1bc 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -99,7 +99,17 @@ jobs: run: cargo install cargo-audit --locked --version 0.22.2 - name: Audit Rust dependencies - run: cargo audit + run: | + set -Eeuo pipefail + audit_db="$RUNNER_TEMP/rustsec-advisory-db" + mkdir -p "$audit_db" + curl --proto '=https' --tlsv1.2 --fail --silent --show-error \ + --location --retry 10 --retry-all-errors \ + https://codeload.github.com/RustSec/advisory-db/tar.gz/refs/heads/main \ + | tar -xz --strip-components=1 -C "$audit_db" + test -f "$audit_db/config.toml" + test -d "$audit_db/crates" + cargo audit --db "$audit_db" --no-fetch - name: Install Node.js run: |