jdx/mise · error
registry archive contains too many entries
Error message
registry archive contains too many entries
What it means
When parsing a registry archive, mise counts entries and enforces MAX_REGISTRY_ARCHIVE_ENTRIES. This is a resource-exhaustion guard: a malicious or corrupted archive with a huge number of entries (zip-bomb style) would otherwise consume unbounded time and memory. Exceeding the entry cap aborts parsing immediately.
Source
Thrown at src/registry.rs:372
.to_string();
let mut source = String::new();
entry.read_to_string(&mut source)?;
sources.insert(short, source);
}
ensure!(
!sources.is_empty(),
"archive does not contain registry entries"
);
registry_from_sources(sources)
}
fn track_registry_archive_entry(
index: usize,
entry_size: u64,
archive_size: &mut u64,
) -> Result<()> {
ensure!(
index < MAX_REGISTRY_ARCHIVE_ENTRIES,
"registry archive contains too many entries"
);
ensure!(
entry_size <= MAX_REGISTRY_ARCHIVE_ENTRY_SIZE,
"registry archive entry is too large"
);
*archive_size = archive_size
.checked_add(entry_size)
.ok_or_else(|| eyre::eyre!("registry archive size overflow"))?;
ensure!(
*archive_size <= MAX_REGISTRY_ARCHIVE_SIZE,
"registry archive is too large"
);
Ok(())
}
fn registry_from_sources(sources: BTreeMap<String, String>) -> Result<Registry> {View on GitHub (pinned to afd2eddd3a)
Solutions
- Obtain the registry archive from a trusted source and re-download it; the file is likely corrupted or tampered with.
- Inspect `tar -tzf archive.tar.gz | wc -l` to confirm the entry count and identify what was accidentally included.
- If you publish the archive, exclude non-registry files (e.g. add .git/ and vendored assets to the packaging exclusion list).
- Do not attempt to bypass the cap; use a subset/split registry archive if you legitimately need more entries.
Defensive patterns
Strategy: validation
Validate before calling
# shell: check entry count against a sane bound before parsing count=$(tar -tzf registry.tar.gz | wc -l); [ "$count" -lt 50000 ] && echo OK || echo "REJECTED: $count entries"
Prevention
- Only consume registry archives from trusted, official sources.
- Exclude non-registry files from packaging to keep entry counts small.
- Treat unexplained entry-count growth between registry versions as tampering and re-download.
When it happens
Trigger: parse_registry_archive iterating an archive whose entry index reaches MAX_REGISTRY_ARCHIVE_ENTRIES — i.e. an archive with more entries than the configured cap.
Common situations: A corrupted or malicious registry archive (decompression bomb), or a publisher accidentally including thousands of unrelated files (e.g. vendored assets or .git objects) in the registry archive.
Understand the failure class
Background: "File too large" / "file size exceeds limit" errors: why libraries cap file sizes and how to fix them — this error's family across 46 libraries.
Related errors
- registry archive entry is too large
- registry archive is too large
- content-level SLSA verification rejected unsafe archive path
- the release list of packslip:{project} has sequence {sequenc
- the signed release list of packslip:{project} disappeared; r
AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09).
Data as JSON: /api/errors/50e76d39ac5f4158.
Report an issue: GitHub.