{"record":{"id":"c8faf0f54943d3c0","repo":"jdx/mise","slug":"no-checksum-entry-found-for-filename-in-checksum","errorCode":null,"errorMessage":"no checksum entry found for {filename} in checksum file","messagePattern":"no checksum entry found for (.+?) in checksum file","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/backend/aqua.rs","lineNumber":2420,"sourceCode":"\n    /// Parse a checksum from checksum file content for a specific filename.\n    fn parse_checksum_from_content(\n        &self,\n        content: &str,\n        checksum_config: &AquaChecksum,\n        filename: &str,\n    ) -> Result<String> {\n        let mut checksum_file = content.to_string();\n\n        if checksum_config.file_format() == \"regexp\" {\n            let pattern = checksum_config.pattern();\n            if let Some(file_pattern) = &pattern.file {\n                let re = regex::Regex::new(file_pattern.as_str())?;\n                let Some(line) = checksum_file\n                    .lines()\n                    .find(|l| re.captures(l).is_some_and(|c| c[1].to_string() == filename))\n                else {\n                    bail!(\"no checksum entry found for {filename} in checksum file\");\n                };\n                checksum_file = line.to_string();\n            }\n            let re = regex::Regex::new(pattern.checksum.as_str())?;\n            if let Some(caps) = re.captures(checksum_file.as_str()) {\n                checksum_file = caps[1].to_string();\n            } else {\n                debug!(\n                    \"no checksum found matching {} in checksum file\",\n                    pattern.checksum\n                );\n            }\n        }\n\n        // Standard format: \"<hash>  <filename>\" or \"<hash> *<filename>\"\n        let entries = checksum_file\n            .lines()\n            .filter_map(|l| {","sourceCodeStart":2402,"sourceCodeEnd":2438,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/backend/aqua.rs#L2402-L2438","documentation":"When verifying a download against an aqua checksum file that lists one checksum per line, mise applies the checksum_file pattern's `file` regex to each line to find the entry whose captured filename matches the downloaded asset. If no line's captured filename equals the expected filename, it errors instead of guessing, because using another entry's checksum would produce a wrong-but-valid-looking verification.","triggerScenarios":"Running checksum verification for an aqua package whose checksum file uses a `file` pattern regex that (a) doesn't capture group 1 at all, (b) captures a filename that differs from the asset's actual filename (e.g. different archive suffix, version-renamed asset), or (c) simply lacks a line for this asset's filename.","commonSituations":"Upstream renamed release assets between versions so the old file pattern no longer matches; the aqua package's checksum configuration has a regex capturing the wrong field; platform-specific assets (e.g. `-arm64` suffix) not covered by the pattern.","solutions":["Update mise so the embedded aqua registry carries the corrected checksum file pattern for this package","Verify the asset filename actually downloaded matches what the registry's file regex expects; pin a version whose assets match","If you author the aqua package config, fix the `file` regex so group 1 captures the exact asset filename","As a workaround, disable strict checksum lookup for this tool via mise settings only if you accept unverified downloads"],"exampleFix":"# before (aqua package checksum config — pattern misses arm64 assets)\nfile: '(?m)^.*\\n([0-9a-f]{64})  {{.Filename}}'\n\n# after — capture the filename of every asset line\nfile: '(?m)^[0-9a-f]{64}\\s+(.*{{.Version}}.*)$'","handlingStrategy":"validation","validationCode":"// pre-check that the checksum file contains an entry for the expected asset\nconst cs = await fetch(checksumUrl).then(r => r.text());\nconst assetName = `tool-${version}-${os}-${arch}.tar.gz`;\nif (!cs.split(/\\r?\\n/).some(l => l.trimEnd().endsWith(assetName))) {\n  console.warn(`checksum file lacks an entry for ${assetName}; verification will fail`);\n}","typeGuard":null,"tryCatchPattern":"try {\n  await $`mise install aqua:owner/repo`;\n} catch (e) {\n  if (String(e).includes(\"no checksum entry found\")) {\n    // clear cache and retry once; then pin a matching version\n    await $`mise cache clean`;\n    await $`mise install aqua:owner/repo@${knownGoodVersion}`;\n  } else throw e;\n}","preventionTips":["Pin tool versions whose release assets you have verified are listed in the checksum file","After upstream releases, check whether asset names changed before upgrading pins","Keep mise updated so registry checksum patterns are corrected upstream"],"tags":["aqua","checksum","verification"],"backgroundTag":"checksum-mismatch","analyzedSha":"afd2eddd3a50c16190efc1c7e94404b48f72af57","analyzedAt":"2026-09-09T01:38:25.179Z","contentChangedAt":"2026-09-09T01:38:25.179Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}