Lion Cipher Lab

Build an SBOM diff tool that shows what a pull request adds to your dependencies

Why it matters

Every pull request (a proposed change to a codebase that teammates review before it is merged) can quietly change what your software is built from: a new library, a library pulled in by that library, an older version, a new license. Reviewers read the code diff and skim past the lockfile. An SBOM diff turns that hidden change into a short list a human can actually review, and into rules a pipeline can enforce. Building the tool yourself teaches you exactly what an SBOM can and cannot prove, which is the judgment a supply-chain security role is hired for.

What you'll learn

Steps in this lab

  1. What you are building, and the words you need
  2. Set up: a terminal, Python, and a working folder
  3. Create the two SBOMs and the answer key
  4. Write the tool: sbomdiff.py, section by section
  5. Measure the noise: what a plain line diff shows
  6. Run it, read the report, and score it against the key
  7. Break it on purpose: switch off purl normalisation
  8. Where the tool is wrong, and what an SBOM diff can never tell you
  9. Judgment: when an SBOM diff is the right gate, and how a pro wires it into CI
  10. Optional: run it on a real project of your own with Syft

Open the full interactive lab →