Skip to content
Novus Examples
lock1.7 KB

mix.lock (Elixir)

An Elixir mix.lock: a literal Elixir map whose values are tuples of atoms, strings and lists. It is neither JSON nor TOML, so a generic lockfile reader has to special-case it. Every package, version, hash and licence is fictional — the tree describes nothing real.

Preview — first 13 lineslock
# SAMPLE — fictional supply-chain data. Every package, registry, version, hash, licence, advisory identifier and signature in this document is invented.
%{
  "cache": {:hex, :cache, "0.9.2", "dc3b117cb10e84f962970843481005d5", [:mix], ["yamllite"], "hexpm", "6f9e5d121aef2fd53dc444b445107e73cb3585252e1da8b7a9ff34df45b118e2"},
  "crypto": {:hex, :crypto, "1.2.0", "0fae81d42db607ed231f045ad6e388de", [:mix], [], "hexpm", "befe052b9b5dccc5a93310056cf4965c9f024e6f81f1029426a96579abed99d4"},
  "http_core": {:hex, :http_core, "1.8.0", "65b88c4017934e9472613326b3bc2668", [:mix], ["logger", "jsonpath"], "hexpm", "0a09e4b722bf6f0d0d8f6a08c07c9f1d985dfab79ac2d0255c9c978c312b623c"},
  "jsonpath": {:hex, :jsonpath, "2.0.5", "ead0c1b573f913b7d2b684413cdbb3f0", [:mix], [], "hexpm", "14d697ab11020f2ee3458d7b7ec2f8a5c1e0e6d23f4a956f5fb2547368b0e526"},
  "logger": {:hex, :logger, "3.4.1", "b2e881b92c910f8846520dc3cfe96259", [:mix], [], "hexpm", "63ae74bd285543ce50a2ac5e9d1c11e60421820ca8192a77168ca3ceb1f81a51"},
  "metrics": {:hex, :metrics, "4.0.0", "3ba814138420154558405ed6a7abae22", [:mix], ["logger"], "hexpm", "dd82ddc156e35c8bc1b5b543a4e7e5f821a53018d75bf66e3fa5b8cfbad040a2"},
  "retry": {:hex, :retry, "1.0.4", "192f67de58c9061de11e00cc4182322a", [:mix], [], "hexpm", "f207ecd1f4ce895b7ec1456c418aa648c1e24a4eda3b90486c9727417af67f2a"},
  "router": {:hex, :router, "2.1.3", "995ef1792c5be629784999031eb293a0", [:mix], ["logger", "retry"], "hexpm", "2ccf6c13deaed35b55771a646a86fe2de07c2ca9a52cee0d73fd79e8fc568f67"},
  "yamllite": {:hex, :yamllite, "1.1.7", "100725697b78ccab6956621a7f396c2c", [:mix], ["jsonpath"], "hexpm", "de29f8d307aa8758b71f97a1bfafe6b61f15a085956692ff566a29f77b23efb8"},
}

Specifications

Seed
51200
Sample Only
true
Ecosystem
Hex/Mix
Packages
9
Syntax
Elixir map literal
Line Endings
LF

Testing contract

Expected to pass
Scenario
Extract package coordinates from a lockfile written as source code.
Expected result
Nine entries yield name, version and both hex checksums without a JSON or TOML parser succeeding on the file.

What is a .lock file?

A .lock file pins the exact dependency graph a package manager resolved, so a later install reproduces it byte for byte. Cargo.lock and Poetry's poetry.lock use TOML, Gemfile.lock and yarn.lock use their own line-oriented grammars, and all of them record resolved versions, source registries, integrity hashes, and the transitive edges between packages. It is committed alongside the human-edited manifest, which states ranges rather than exact versions.

How to use this file

Use an example .lock file to test dependency parsers, SBOM generators, and vulnerability scanners, verifying that transitive dependencies and integrity hashes are read correctly and that a pinned version is never confused with the range declared in the manifest.

How to use this file for testing

“mix.lock (Elixir)” is a deterministic Novus Examples fixture for Config parsing, Conversion testing, Error handling. TOML and INI configuration files with nested sections and typed values — for testing config parsers and loaders.

Documented properties for this file: seed 51200 · LF. Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.

Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such — expect parsers to fail loudly rather than silently accept them.

SBOM, lockfile, provenance, and advisory fixtures describe the same fabricated component tree across formats, so a converter or scanner can be diffed against a known answer. Every package name, version, hash, and advisory ID is invented — never treat a finding here as real.

Point your config loader at the file and assert it reads the documented sections and typed values, including any deliberately-tricky nesting or comments.

Generated by generation/supply_chain.py. Free for any use, no attribution required — license.