{"record":{"id":"7f71862ab5022b1a","repo":"JuliusBrussee/caveman","slug":"signature-check-failed-for-checksums-txt-refusin","errorCode":null,"errorMessage":"signature check failed for checksums.txt — refusing to install; partial download deleted","messagePattern":"signature check failed for checksums\\.txt — refusing to install; partial download deleted","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"packages/cli/src/index.ts","lineNumber":2448,"sourceCode":"    return;\n  }\n\n  const base = (process.env.CAVE_BINARY_RELEASE_BASE ?? BINARY_RELEASE_BASE_DEFAULT).replace(/\\/+$/, \"\");\n  const releaseBase = `${base}/${BINARY_RELEASE}`;\n  let checksumsRaw: string;\n  let signatureRaw: string;\n  try {\n    const [checksumsResponse, signatureResponse] = await Promise.all([\n      fetchReleaseAsset(`${releaseBase}/checksums.txt`, timeoutSeconds),\n      fetchReleaseAsset(`${releaseBase}/checksums.txt.keysig`, timeoutSeconds),\n    ]);\n    [checksumsRaw, signatureRaw] = await Promise.all([checksumsResponse.text(), signatureResponse.text()]);\n  } catch (error) {\n    setupInstallFailure(error, timeoutSeconds);\n  }\n\n  if (!verifyChecksumSignature(checksumsRaw!, signatureRaw!)) {\n    throw new Error(\"signature check failed for checksums.txt — refusing to install; partial download deleted\");\n  }\n\n  let checksums: Map<string, string>;\n  try {\n    checksums = parseSignedChecksums(checksumsRaw!);\n  } catch {\n    throw new Error(\"signature check failed for checksums.txt — refusing to install; partial download deleted\");\n  }\n\n  const installed: InstalledBinary[] = [];\n  const artifactDigests: Record<string, string> = {};\n  for (const name of INSTALL_BINARIES) {\n    const artifact = `${name}_${platform.os}_${platform.arch}`;\n    const expected = checksums.get(artifact);\n    if (!expected) {\n      throw new Error(`signature check failed for ${artifact} — refusing to install; partial download deleted`);\n    }\n    const target = join(binDir, binaryInstallFilename(name, platform.os));","sourceCodeStart":2430,"sourceCodeEnd":2466,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/3ee70a102609e550bd2e68004bf5990a9341c851/packages/cli/src/index.ts#L2430-L2466","documentation":"After downloading checksums.txt and its signature, the installer calls verifyChecksumSignature(); if the cryptographic signature over checksums.txt does not verify, it refuses to install and deletes partial downloads. This guards against tampered or substitute checksum manifests.","triggerScenarios":"verifyChecksumSignature(checksumsRaw, signatureRaw) returns false — signature bytes don't match the manifest under the pinned public key, the signature is for a different checksums.txt version, or the files were truncated/modified in transit.","commonSituations":"Man-in-the-middle or compromised mirror serving altered checksums.txt; stale cached signature paired with a new release; corporate proxy rewriting content.","solutions":["Re-run the install to re-download a fresh checksums.txt + signature pair.","Verify you are hitting the official release host, not a mirror or proxy cache.","Check whether a proxy is rewriting/transcoding the response body.","If you control the release, confirm the signature was regenerated after the last checksums.txt update."],"exampleFix":"// before (stale CDN cache)\ncaveman install  // signature check failed\n// after\ncaveman install --no-cache   # or clear proxy cache, then retry\n","handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { await install() } catch (e) { if (String(e.message).includes('signature check failed for checksums.txt')) { clearCaches(); await install(); } else throw e; }","preventionTips":["Never disable signature verification or use unofficial mirrors.","Bypass proxies that rewrite response bodies for install traffic.","Re-run installs from a clean cache so checksums.txt and its signature are fetched together."],"tags":["security","signature","install","supply-chain"],"backgroundTag":"checksum-mismatch","analyzedSha":"3ee70a102609e550bd2e68004bf5990a9341c851","analyzedAt":"2026-09-20T15:53:39.229Z","contentChangedAt":"2026-09-20T15:53:39.229Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}