jdx/mise · error

content-level SLSA verification found duplicate installed ar

Error message

content-level SLSA verification found duplicate installed archive path: {}

What it means

After strip-components normalization, no two entries may map to the same installed path, otherwise provenance subject-name matching would be ambiguous. The HashSet in validate_archive_content_files detects the collision and names the duplicated path.

Source

Thrown at src/file.rs:2560

    let mut buf = [0; 8192];
    loop {
        let n = reader.read(&mut buf)?;
        if n == 0 {
            break;
        }
        hasher.update(&buf[..n]);
    }
    Ok(hex::encode(hasher.finalize()))
}

fn validate_archive_content_files(files: Vec<ArchiveContent>) -> Result<Vec<ArchiveContent>> {
    if files.is_empty() {
        bail!("content-level SLSA verification found no regular files in archive");
    }
    let mut names = std::collections::HashSet::new();
    for file in &files {
        if !names.insert(file.name.clone()) {
            bail!(
                "content-level SLSA verification found duplicate installed archive path: {}",
                file.name
            );
        }
    }
    Ok(files)
}

fn normalize_archive_content_path(path: &Path, strip_components: usize) -> Result<String> {
    let mut parts = Vec::new();
    for component in skip_curdir_components(path) {
        match component {
            std::path::Component::Normal(part) => parts.push(part.to_string_lossy().to_string()),
            std::path::Component::CurDir => {}
            std::path::Component::ParentDir
            | std::path::Component::RootDir
            | std::path::Component::Prefix(_) => {
                bail!(

View on GitHub (pinned to 9dcfcaa0dc)

Solutions

  1. Set strip_components to 0 so distinct top-level directories stay distinct
  2. Use a single-platform archive asset instead of a combined one
  3. Fall back to artifact-level verification if the combined layout must be kept

Example fix

# before
strip_components = 1 # collapses linux/bin/tool and macos/bin/tool to bin/tool

# after
strip_components = 0
Defensive patterns

Strategy: validation

Validate before calling

// multi-top-level-dir archives must not be stripped
if strip_components > 0 {
    let tops = top_level_dirs(&archive, format)?;
    anyhow::ensure!(tops.len() <= 1, "multiple top-level dirs ({tops:?}) + strip would collide paths");
}

Prevention

When it happens

Trigger: An archive with multiple top-level directories whose contents repeat (e.g. linux/bin/tool and macos/bin/tool) processed with strip_components = 1 - both entries normalize to bin/tool.

Common situations: Multi-platform combined archives where stripping was meant to select one platform directory; tarballs that intentionally contain duplicate paths (later entries would overwrite earlier ones on extraction).

Related errors


AI-assisted analysis of jdx/mise@9dcfcaa0dc (2026-08-17). Data as JSON: /api/errors/3fb9e5cd9daf62a6. Report an issue: GitHub.