From 9ec23007ccc8bca294e8b72f572dea4c64acb057 Mon Sep 17 00:00:00 2001 From: Carlos Villela Date: Sat, 8 Aug 2026 12:05:47 -0700 Subject: [PATCH 1/4] fix(ci): stabilize main audit checks --- .../actions/ci-wechat-runtime-audit/audit.sh | 51 ++++++++- agents/openclaw/dependency-review.md | 12 +- test/wechat-runtime-audit-workflow.test.ts | 105 +++++++++++++++++- tools/e2e/cli-artifact-workflow-boundary.mts | 2 +- 4 files changed, 162 insertions(+), 8 deletions(-) diff --git a/.github/actions/ci-wechat-runtime-audit/audit.sh b/.github/actions/ci-wechat-runtime-audit/audit.sh index 783e316184a..6a5c5538d6d 100755 --- a/.github/actions/ci-wechat-runtime-audit/audit.sh +++ b/.github/actions/ci-wechat-runtime-audit/audit.sh @@ -249,11 +249,54 @@ fs.writeFileSync(process.env.PROVENANCE_PATH, `${JSON.stringify(provenance, null if (failure !== undefined) process.exitCode = 1; NODE +run_signature_audit() { + local attempt + local attempt_report + local command_status + local signature_attempt_limit=3 + local signature_report="$report_dir/npm-audit-signatures.txt" + local signature_debug_dir="$report_dir/npm-audit-signature-debug" + + : >"$signature_report" + for ((attempt = 1; attempt <= signature_attempt_limit; attempt += 1)); do + attempt_report="$report_dir/npm-audit-signatures-attempt-${attempt}.txt" + command_status=0 + npm --prefix "$runtime_dir" audit signatures \ + --userconfig "$trusted_npmrc" \ + --registry "$npm_registry" \ + --cache "$trusted_cache" \ + >"$attempt_report" 2>&1 || command_status=$? + { + printf 'attempt=%d status=%d\n' "$attempt" "$command_status" + cat "$attempt_report" + } >>"$signature_report" + + if ((command_status == 0)); then + return 0 + fi + + if [[ -d "$trusted_cache/_logs" ]]; then + mkdir -p "$signature_debug_dir" + cp -a "$trusted_cache/_logs/." "$signature_debug_dir/" + fi + + # Retry only npm's exact registry download failure. Invalid or missing + # signatures remain fail-closed and return after the first attempt. + if ! grep -Fq "npm error Failed to download" "$attempt_report"; then + return "$command_status" + fi + if ((attempt < signature_attempt_limit)); then + printf 'retrying transient signature download after attempt %d\n' "$attempt" \ + >>"$signature_report" + sleep 2 + fi + done + + return "$command_status" +} + signature_status=0 -npm --prefix "$runtime_dir" audit signatures \ - --userconfig "$trusted_npmrc" \ - --registry "$npm_registry" \ - >"$report_dir/npm-audit-signatures.txt" 2>&1 || signature_status=$? +run_signature_audit || signature_status=$? # Reproduce the sandbox-user npm-pack boundary with the exact reviewed archive. # The trusted source cache is read-only; only its short-lived copy is writable. diff --git a/agents/openclaw/dependency-review.md b/agents/openclaw/dependency-review.md index 2a41254e82f..22408e51ae7 100644 --- a/agents/openclaw/dependency-review.md +++ b/agents/openclaw/dependency-review.md @@ -31,10 +31,18 @@ The reviewed audit wrapper reports lower-severity production findings and blocks - Locked graph: `agents/openclaw/wechat-runtime/package-lock.json` (npm lockfile version 3). - Lock regeneration: `npm install --package-lock-only --legacy-peer-deps --ignore-scripts --omit=dev --prefix agents/openclaw/wechat-runtime`. - Installation boundary: the image materializes the reviewed lock into a root-owned dedicated npm cache and adds the exact package metadata needed by npm's offline resolver. Before that cache becomes immutable, the shared `scripts/lib/reviewed-npm-archive.mts` implementation re-packs every locked archive offline from the final cache and rejects registry-origin drift, metadata or packed-byte SRI drift, unsafe filenames, missing archives, and symlinks. The sandbox user copies that verified immutable source into a writable cache used for registry metadata lookup, archive packing, and the OpenClaw plugin install; no retrieval step falls back to `HOME/.npm`. The copy is deleted in the same image layer, and the trusted cache is never writable. The installer runs in offline, legacy-peer mode, then `verify-wechat-runtime-lock.mts` rejects integrity, version, dependency-set, or peer-range drift and refuses an image OpenClaw version below the plugin's locked peer minimum. -- Default CI gate: `wechat-runtime-audit` in `.github/workflows/pr.yaml` and `.github/workflows/main.yaml` invokes the reviewed `.github/actions/ci-wechat-runtime-audit` implementation. Pull requests resolve it from the base SHA. Because PR #6739's base predates the action, that PR alone may bootstrap the action from signed immutable commit `HOYALIM/NemoClaw@0d2256d71d5bbba3bcaaaa4d01714fa56f22d1e2`; every other PR fails closed if its base lacks the action. Main uses the merged action. The action uses Node `22.19.0` and npm `10.9.4`, materializes the committed graph with scripts disabled, fails on any low-or-higher production advisory, verifies registry signatures, uploads the JSON/text reports, and exercises the exact reviewed archive through a copied writable cache while the trusted source remains read-only. Removal condition: delete the PR #6739 bootstrap checkout, its paired conditional audit step, and the bootstrap-specific test assertions in the first follow-up after this PR merges, before the next release tag; all later PRs must use the normal base-SHA action path. +- Default CI gate: `wechat-runtime-audit` in `.github/workflows/pr.yaml` and `.github/workflows/main.yaml` invokes the reviewed `.github/actions/ci-wechat-runtime-audit` implementation. + Pull requests resolve it from the base SHA. + Because PR #6739's base predates the action, that PR alone can bootstrap the action from signed immutable commit `HOYALIM/NemoClaw@0d2256d71d5bbba3bcaaaa4d01714fa56f22d1e2`; every other PR fails closed if its base lacks the action. + Main uses the merged action. + The action uses Node `22.19.0` and npm `10.9.4`, materializes the committed graph with scripts disabled, fails on any low-or-higher production advisory, verifies registry signatures, uploads the reports, and exercises the exact reviewed archive through a copied writable cache while the trusted source remains read-only. + It retries `npm audit signatures` at most three times only when npm reports the exact `npm error Failed to download` transport failure. + Invalid or missing signatures fail after the first attempt. + Each failed attempt retains its output and npm debug logs. + Removal condition: delete the PR #6739 bootstrap checkout, its paired conditional audit step, and the bootstrap-specific test assertions in the first follow-up after this PR merges, before the next release tag; all later PRs must use the normal base-SHA action path. - Advisory command: `npm ci --ignore-scripts --omit=dev --legacy-peer-deps --prefix agents/openclaw/wechat-runtime && npm audit --omit=dev --audit-level=low --json --prefix agents/openclaw/wechat-runtime && npm audit signatures --prefix agents/openclaw/wechat-runtime`. - Advisory review: `2026-07-12`; result: `0` known vulnerabilities across the resolved production graph. -- Regression tests: `test/wechat-locked-install.test.ts` keeps the manifest runtime-lock paths and installer verification dispatch synchronized; `test/verify-wechat-runtime-lock.test.ts` proves the installed graph and OpenClaw peer-range compatibility fail closed; `test/wechat-runtime-audit-workflow.test.ts` keeps the Docker cache lifecycle, base-trusted required CI gate, evidence upload, audit threshold, signature verification, and real npm-pack boundary synchronized. +- Regression tests: `test/wechat-locked-install.test.ts` keeps the manifest runtime-lock paths and installer verification dispatch synchronized; `test/verify-wechat-runtime-lock.test.ts` proves the installed graph and OpenClaw peer-range compatibility fail closed; `test/wechat-runtime-audit-workflow.test.ts` keeps the Docker cache lifecycle, base-trusted required CI gate, evidence upload, audit threshold, bounded download-only signature retry, invalid-signature denial, and real npm-pack boundary synchronized. The dedicated graph intentionally omits the plugin's `openclaw` peer dependency. The image already installs and integrity-verifies the reviewed OpenClaw runtime separately; auto-installing another OpenClaw copy would create a second unreviewed runtime graph. Disabling scripts also prevents transitive packages from executing lifecycle code during the trusted image build. diff --git a/test/wechat-runtime-audit-workflow.test.ts b/test/wechat-runtime-audit-workflow.test.ts index 0db36cb7ee8..5dd025950db 100644 --- a/test/wechat-runtime-audit-workflow.test.ts +++ b/test/wechat-runtime-audit-workflow.test.ts @@ -68,11 +68,24 @@ function runAuditValidation( "wechat-runtime-audit", "npm-audit.provenance.json", ); + const reportDir = path.join(targetRoot, "artifacts", "wechat-runtime-audit"); + const signatureReportPath = path.join(reportDir, "npm-audit-signatures.txt"); + const signatureCounterPath = path.join(targetRoot, "signature-attempt-count"); + const signatureDebugDir = path.join(reportDir, "npm-audit-signature-debug"); return { ...result, provenance: fs.existsSync(provenancePath) ? (JSON.parse(fs.readFileSync(provenancePath, "utf8")) as Record) : undefined, + signatureAttemptCount: fs.existsSync(signatureCounterPath) + ? Number(fs.readFileSync(signatureCounterPath, "utf8")) + : 0, + signatureDebugFiles: fs.existsSync(signatureDebugDir) + ? fs.readdirSync(signatureDebugDir).sort() + : [], + signatureReport: fs.existsSync(signatureReportPath) + ? fs.readFileSync(signatureReportPath, "utf8") + : "", }; } finally { fs.rmSync(targetRoot, { force: true, recursive: true }); @@ -83,27 +96,64 @@ function installFakeAuditNpm( targetRoot: string, auditOutput: Record | string, auditStatus: number, + signatureAttempts: readonly { readonly output: string; readonly status: number }[] = [ + { output: "verified signatures", status: 0 }, + ], ): void { const binDir = path.join(targetRoot, "bin"); fs.mkdirSync(binDir, { recursive: true }); const npm = path.join(binDir, "npm"); + const packageLock = JSON.parse( + fs.readFileSync( + path.join(targetRoot, "agents", "openclaw", "wechat-runtime", "package-lock.json"), + "utf8", + ), + ); + const expectedIntegrity = + packageLock.packages["node_modules/@tencent-weixin/openclaw-weixin"].integrity; fs.writeFileSync( npm, [ "#!/usr/bin/env node", + 'const fs = require("node:fs");', + 'const path = require("node:path");', `const auditReport = ${JSON.stringify( typeof auditOutput === "string" ? auditOutput : JSON.stringify(auditOutput), )};`, `const auditStatus = ${auditStatus};`, + `const expectedIntegrity = ${JSON.stringify(expectedIntegrity)};`, + `const signatureAttempts = ${JSON.stringify(signatureAttempts)};`, + `const signatureCounterPath = ${JSON.stringify(path.join(targetRoot, "signature-attempt-count"))};`, "const args = process.argv.slice(2);", 'if (args[0] === "--version") {', ' console.log("10.9.4");', " process.exit(0);", "}", + 'if (args.includes("audit") && args.includes("signatures")) {', + ' const attempt = fs.existsSync(signatureCounterPath) ? Number(fs.readFileSync(signatureCounterPath, "utf8")) + 1 : 1;', + " fs.writeFileSync(signatureCounterPath, String(attempt));", + " const selected = signatureAttempts[Math.min(attempt - 1, signatureAttempts.length - 1)];", + ' const cacheIndex = args.indexOf("--cache");', + " if (cacheIndex >= 0) {", + ' const logDir = path.join(args[cacheIndex + 1], "_logs");', + " fs.mkdirSync(logDir, { recursive: true });", + ' fs.writeFileSync(path.join(logDir, \"signature-attempt-\" + attempt + \".log\"), selected.output + \"\\\\n\");', + " }", + " console.error(selected.output);", + " process.exit(selected.status);", + "}", 'if (args.includes("audit")) {', " console.log(auditReport);", " process.exit(auditStatus);", "}", + 'if (args[0] === "pack") {', + ' const destination = args[args.indexOf("--pack-destination") + 1];', + ' const filename = "wechat-runtime-test.tgz";', + " fs.mkdirSync(destination, { recursive: true });", + ' fs.writeFileSync(path.join(destination, filename), "test archive");', + " console.log(JSON.stringify([{ filename, integrity: expectedIntegrity }]));", + " process.exit(0);", + "}", "process.exit(0);", "", ].join("\n"), @@ -279,12 +329,65 @@ describe("WeChat runtime audit and install-cache gates (#5896)", () => { }); expect(result.status).not.toBe(0); - expect(result.provenance).toMatchObject({ + expect(result.provenance, result.stderr).toMatchObject({ failure: expect.stringMatching(expectedFailure), rawReportPath: "npm-audit.json", }); }); + it("retries signature download failures and succeeds on the third attempt", () => { + const result = runAuditValidation(({ targetRoot }) => { + installFakeAuditNpm( + targetRoot, + { + vulnerabilities: {}, + metadata: { + vulnerabilities: { info: 0, low: 0, moderate: 0, high: 0, critical: 0 }, + }, + }, + 0, + [ + { output: "npm error Failed to download", status: 1 }, + { output: "npm error Failed to download", status: 1 }, + { output: "verified signatures", status: 0 }, + ], + ); + }); + + expect(result.status, result.stderr).toBe(0); + expect(result.signatureAttemptCount, result.stderr).toBe(3); + expect(result.signatureDebugFiles).toEqual([ + "signature-attempt-1.log", + "signature-attempt-2.log", + ]); + expect(result.signatureReport).toContain("retrying transient signature download"); + expect(result.signatureReport).toContain("attempt=3 status=0"); + }); + + it("does not retry an invalid signature result", () => { + const result = runAuditValidation(({ targetRoot }) => { + installFakeAuditNpm( + targetRoot, + { + vulnerabilities: {}, + metadata: { + vulnerabilities: { info: 0, low: 0, moderate: 0, high: 0, critical: 0 }, + }, + }, + 0, + [ + { output: "npm error Invalid registry signature", status: 1 }, + { output: "verified signatures", status: 0 }, + ], + ); + }); + + expect(result.status).not.toBe(0); + expect(result.signatureAttemptCount, result.stderr).toBe(1); + expect(result.signatureDebugFiles).toEqual(["signature-attempt-1.log"]); + expect(result.signatureReport).not.toContain("retrying transient signature download"); + }); + it("keeps the image cache trusted and deletes the sandbox-writable copy", () => { const dockerfile = fs.readFileSync(path.join(repoRoot, "Dockerfile"), "utf8"); for (const fragment of [ diff --git a/tools/e2e/cli-artifact-workflow-boundary.mts b/tools/e2e/cli-artifact-workflow-boundary.mts index b64b662b474..baf2a1b4451 100644 --- a/tools/e2e/cli-artifact-workflow-boundary.mts +++ b/tools/e2e/cli-artifact-workflow-boundary.mts @@ -40,7 +40,7 @@ const CLI_ARTIFACT_PROVENANCE_STEP = "Record CLI artifact provenance"; const CANDIDATE_CHECKOUT_STEP_CONTENT_SHA256 = "3578a053cede863f7aa4814d8399b4ca21ea0b77cee712e6d549c684818f11dd"; const CLI_ARTIFACT_WORKFLOW_CONTRACT_SHA256 = - "ba3ab24550161d5d229511a0c679be0a3c6442b1ccd3d998d934ad2ca147e678"; + "4f3920e0dab09978e0d60d53c97e345cc562ada690deec9b071d3dc471c80840"; const CLI_ARTIFACT_CONSUMER_JOB_NAMES = [ "agent-turn-latency", "bedrock-runtime-compatible-anthropic", From 9b67655b14e5be62e552121e6ab4f166d15ac4be Mon Sep 17 00:00:00 2001 From: Carlos Villela Date: Sat, 8 Aug 2026 12:09:59 -0700 Subject: [PATCH 2/4] docs(ci): clarify signature retry evidence --- .../actions/ci-wechat-runtime-audit/audit.sh | 4 ++-- agents/openclaw/dependency-review.md | 18 +++++++++++------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.github/actions/ci-wechat-runtime-audit/audit.sh b/.github/actions/ci-wechat-runtime-audit/audit.sh index 6a5c5538d6d..7fa9386154f 100755 --- a/.github/actions/ci-wechat-runtime-audit/audit.sh +++ b/.github/actions/ci-wechat-runtime-audit/audit.sh @@ -280,8 +280,8 @@ run_signature_audit() { cp -a "$trusted_cache/_logs/." "$signature_debug_dir/" fi - # Retry only npm's exact registry download failure. Invalid or missing - # signatures remain fail-closed and return after the first attempt. + # Retry only when npm output contains the registry download failure marker. + # Invalid or missing signatures fail closed after the first attempt. if ! grep -Fq "npm error Failed to download" "$attempt_report"; then return "$command_status" fi diff --git a/agents/openclaw/dependency-review.md b/agents/openclaw/dependency-review.md index 22408e51ae7..b1abd8117bd 100644 --- a/agents/openclaw/dependency-review.md +++ b/agents/openclaw/dependency-review.md @@ -32,13 +32,17 @@ The reviewed audit wrapper reports lower-severity production findings and blocks - Lock regeneration: `npm install --package-lock-only --legacy-peer-deps --ignore-scripts --omit=dev --prefix agents/openclaw/wechat-runtime`. - Installation boundary: the image materializes the reviewed lock into a root-owned dedicated npm cache and adds the exact package metadata needed by npm's offline resolver. Before that cache becomes immutable, the shared `scripts/lib/reviewed-npm-archive.mts` implementation re-packs every locked archive offline from the final cache and rejects registry-origin drift, metadata or packed-byte SRI drift, unsafe filenames, missing archives, and symlinks. The sandbox user copies that verified immutable source into a writable cache used for registry metadata lookup, archive packing, and the OpenClaw plugin install; no retrieval step falls back to `HOME/.npm`. The copy is deleted in the same image layer, and the trusted cache is never writable. The installer runs in offline, legacy-peer mode, then `verify-wechat-runtime-lock.mts` rejects integrity, version, dependency-set, or peer-range drift and refuses an image OpenClaw version below the plugin's locked peer minimum. - Default CI gate: `wechat-runtime-audit` in `.github/workflows/pr.yaml` and `.github/workflows/main.yaml` invokes the reviewed `.github/actions/ci-wechat-runtime-audit` implementation. - Pull requests resolve it from the base SHA. - Because PR #6739's base predates the action, that PR alone can bootstrap the action from signed immutable commit `HOYALIM/NemoClaw@0d2256d71d5bbba3bcaaaa4d01714fa56f22d1e2`; every other PR fails closed if its base lacks the action. - Main uses the merged action. - The action uses Node `22.19.0` and npm `10.9.4`, materializes the committed graph with scripts disabled, fails on any low-or-higher production advisory, verifies registry signatures, uploads the reports, and exercises the exact reviewed archive through a copied writable cache while the trusted source remains read-only. - It retries `npm audit signatures` at most three times only when npm reports the exact `npm error Failed to download` transport failure. - Invalid or missing signatures fail after the first attempt. - Each failed attempt retains its output and npm debug logs. + The pull request workflow resolves the action from the PR base SHA. + Because PR #6739's base SHA predates the action, only that PR can use the pinned bootstrap action from signed immutable commit `HOYALIM/NemoClaw@0d2256d71d5bbba3bcaaaa4d01714fa56f22d1e2`. + Other PRs fail closed if their base lacks the action. + The `main.yaml` workflow uses the merged action. + The action uses Node `22.19.0` and npm `10.9.4`. + It materializes the committed graph with scripts disabled. + It rejects any low-or-higher production advisory, verifies registry signatures, and uploads the reports. + It also exercises the reviewed archive through a copied writable cache while the trusted source remains read-only. + The action retries `npm audit signatures` at most three times when a failed attempt contains `npm error Failed to download`. + For other nonzero results, including invalid or missing signatures, the action stops after the first attempt. + The report directory retains each attempt's output and any npm debug logs from failed attempts. Removal condition: delete the PR #6739 bootstrap checkout, its paired conditional audit step, and the bootstrap-specific test assertions in the first follow-up after this PR merges, before the next release tag; all later PRs must use the normal base-SHA action path. - Advisory command: `npm ci --ignore-scripts --omit=dev --legacy-peer-deps --prefix agents/openclaw/wechat-runtime && npm audit --omit=dev --audit-level=low --json --prefix agents/openclaw/wechat-runtime && npm audit signatures --prefix agents/openclaw/wechat-runtime`. - Advisory review: `2026-07-12`; result: `0` known vulnerabilities across the resolved production graph. From 54fcea807284388ca6da211eefda7b5fb5cda6e7 Mon Sep 17 00:00:00 2001 From: Carlos Villela Date: Sat, 8 Aug 2026 12:12:56 -0700 Subject: [PATCH 3/4] docs(ci): correct signature audit ownership --- agents/openclaw/dependency-review.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/agents/openclaw/dependency-review.md b/agents/openclaw/dependency-review.md index b1abd8117bd..6005c9d9d08 100644 --- a/agents/openclaw/dependency-review.md +++ b/agents/openclaw/dependency-review.md @@ -38,11 +38,14 @@ The reviewed audit wrapper reports lower-severity production findings and blocks The `main.yaml` workflow uses the merged action. The action uses Node `22.19.0` and npm `10.9.4`. It materializes the committed graph with scripts disabled. - It rejects any low-or-higher production advisory, verifies registry signatures, and uploads the reports. + The action rejects any low-or-higher production advisory and verifies registry signatures. + The PR and main workflows upload the resulting reports. It also exercises the reviewed archive through a copied writable cache while the trusted source remains read-only. - The action retries `npm audit signatures` at most three times when a failed attempt contains `npm error Failed to download`. + The action makes at most three `npm audit signatures` attempts. + It retries only when a failed attempt contains `npm error Failed to download`. For other nonzero results, including invalid or missing signatures, the action stops after the first attempt. - The report directory retains each attempt's output and any npm debug logs from failed attempts. + The report directory stores each attempt in `npm-audit-signatures-attempt-.txt`. + After a failed attempt, the action copies npm debug logs to `npm-audit-signature-debug/`. Removal condition: delete the PR #6739 bootstrap checkout, its paired conditional audit step, and the bootstrap-specific test assertions in the first follow-up after this PR merges, before the next release tag; all later PRs must use the normal base-SHA action path. - Advisory command: `npm ci --ignore-scripts --omit=dev --legacy-peer-deps --prefix agents/openclaw/wechat-runtime && npm audit --omit=dev --audit-level=low --json --prefix agents/openclaw/wechat-runtime && npm audit signatures --prefix agents/openclaw/wechat-runtime`. - Advisory review: `2026-07-12`; result: `0` known vulnerabilities across the resolved production graph. From cb65d86064368441e59707f51b4cbd1fe4dac59f Mon Sep 17 00:00:00 2001 From: Carlos Villela Date: Sat, 8 Aug 2026 12:16:39 -0700 Subject: [PATCH 4/4] docs(ci): define signature retry stop rule --- .github/actions/ci-wechat-runtime-audit/audit.sh | 4 ++-- agents/openclaw/dependency-review.md | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/actions/ci-wechat-runtime-audit/audit.sh b/.github/actions/ci-wechat-runtime-audit/audit.sh index 7fa9386154f..44e4782f61c 100755 --- a/.github/actions/ci-wechat-runtime-audit/audit.sh +++ b/.github/actions/ci-wechat-runtime-audit/audit.sh @@ -280,8 +280,8 @@ run_signature_audit() { cp -a "$trusted_cache/_logs/." "$signature_debug_dir/" fi - # Retry only when npm output contains the registry download failure marker. - # Invalid or missing signatures fail closed after the first attempt. + # Retry only when failed npm output contains the registry download marker. + # A failure without this marker stops further signature audit attempts. if ! grep -Fq "npm error Failed to download" "$attempt_report"; then return "$command_status" fi diff --git a/agents/openclaw/dependency-review.md b/agents/openclaw/dependency-review.md index 6005c9d9d08..364099cda06 100644 --- a/agents/openclaw/dependency-review.md +++ b/agents/openclaw/dependency-review.md @@ -42,10 +42,11 @@ The reviewed audit wrapper reports lower-severity production findings and blocks The PR and main workflows upload the resulting reports. It also exercises the reviewed archive through a copied writable cache while the trusted source remains read-only. The action makes at most three `npm audit signatures` attempts. - It retries only when a failed attempt contains `npm error Failed to download`. - For other nonzero results, including invalid or missing signatures, the action stops after the first attempt. + It retries a failed attempt only when the output contains `npm error Failed to download`. + A failed attempt without this marker stops further attempts. + Any final nonzero status fails the action. The report directory stores each attempt in `npm-audit-signatures-attempt-.txt`. - After a failed attempt, the action copies npm debug logs to `npm-audit-signature-debug/`. + After a failed attempt, the action copies available npm debug logs to `npm-audit-signature-debug/`. Removal condition: delete the PR #6739 bootstrap checkout, its paired conditional audit step, and the bootstrap-specific test assertions in the first follow-up after this PR merges, before the next release tag; all later PRs must use the normal base-SHA action path. - Advisory command: `npm ci --ignore-scripts --omit=dev --legacy-peer-deps --prefix agents/openclaw/wechat-runtime && npm audit --omit=dev --audit-level=low --json --prefix agents/openclaw/wechat-runtime && npm audit signatures --prefix agents/openclaw/wechat-runtime`. - Advisory review: `2026-07-12`; result: `0` known vulnerabilities across the resolved production graph.