diff

A dependency comparison command that reports how software components changed between two Git versions, software bills of materials, or container image tags.

In plain words
What is it for?
It is for comparing dependency states between commits, SBOM files, or images and reporting the differences found by the same scan checks.
Why use it?
It shows additions, removals, upgrades, and relationship changes that may alter security or licensing exposure even when a version number stays the same.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/bomly-dev/bomly-cli/diff
Clone the repo
git clone --depth 1 https://github.com/bomly-dev/bomly-cli
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 839 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00839
Opus 5 $0.00000 $0.00419
Sonnet 5 $0.00000 $0.00168
Haiku 4.5 $0.00000 $0.00084

Measured 2d ago against content hash ad19ff701f25, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

diff scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/commands/diff.md · 69 lines

How it starts

The opening of the file, as written. The whole thing — 69 lines — stays where its author put it; the contents beside it link to each section on GitHub.

bomly diff

Compare dependency state between two points — two Git refs, two SBOM files, or two container image tags — and report what changed. diff runs the scan pipeline against both states, so the same target flags and gates apply to each side.

Minimal invocation

bomly diff --base main --head HEAD

Comparing two commits where express was upgraded:

Added (1)
  + [email protected]  MIT      runtime
Version changed (9)
  ~ body-parser        1.20.2 → 1.20.3
  ~ cookie             0.6.0 → 0.7.1
  ~ express            4.19.2 → 4.21.2
  ~ finalhandler       1.2.0 → 1.3.1
  ~ merge-descriptors  1.0.1 → 1.0.3
  ~ path-to-regexp     0.1.7 → 0.1.12
  ~ qs                 6.11.0 → 6.13.0
  ~ send               0.18.0 → 0.19.0
  ~ serve-static       1.15.0 → 1.16.2

Beyond additions, removals, and version changes, diff also reports changes to a dependency's relationship (direct vs transitive), source, and registry-matching eligibility — the detail shifts that alter your exposure without a version number moving.

What to compare

# Git refs of the current repository (or a remote one via --url)
bomly diff --base main --head HEAD
bomly diff --url https://github.com/owner/repo --base v1.2.0 --head v1.3.0

# Two SBOM files
bomly diff --sbom --base ./before.cdx.json --head ./after.cdx.json

# Two tags or digests of a container image
bomly diff --image alpine --base 3.19 --head 3.20

Audit the delta

Add --enrich --audit to classify findings between the two states into three buckets — introduced (present in head, absent in base), resolved (present in base, absent in head), and persisted (present in both):

bomly diff --base main --head HEAD --enrich --audit --fail-on high

The audit only inspects packages the change touched, so unrelated pre-existing debt never appears. Within that scope, --fail-on gates on introduced and persisted findings — a persisted finding means the changed package still carries a known issue at its new version, so the gate holds until the bump reaches a fixed version (or the finding is baselined). See Auditors → Diff and auditing. This is exactly what Bomly Guard runs on pull requests, with the result rendered as a PR comment.

Read the full file on GitHub · 69 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 69 lines · 0 tokens per session scan A ad19ff701f25

Subscribe to this mod's changes

diff is a command published in the GitHub repository bomly-dev/bomly-cli (11 stars, last pushed 3d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 839 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.