Skip to content

Search

Search the docs, blog, and marketplace.

Package auditor

Last updated October 25, 2026View source (v0.30.0)

Checks denied packages, suspiciously similar names, and dependency source changes, using data detectors already provide.

PropertyValue
Auditor namepackage
Finding kindpackage
Runs with --auditYes
Needs enrichment dataNo
Policy flags--deny-package, --deny-group, --protected-package, --typosquat-threshold, --typosquat-mode, --fail-on source-change
Finding reasonsdenied package, denied group, typosquat of protected package, source changed to Git or URL

What the package auditor does

It guards the identity and origin of your dependencies with three checks:

CheckWhat it flags
DenylistAny package, or any package in a denied group or namespace, you have banned outright.
TyposquatA package whose name is suspiciously close to one you trust, such as reqeusts, loadsh, or a cross-env lookalike.
Source changeIn a diff, a dependency that had a known source and now comes from Git or an arbitrary URL. This asks for review; it does not claim the change is malicious.

All three checks use dependency details that detection already produced. A move to Git or a URL may also mean registry-based vulnerability checks no longer cover that dependency.

Options

FlagYAML keyEffect
--deny-package <name>policy.deny_packagesFail when this package is present. Repeatable.
--deny-group <group>policy.deny_groupsFail on any package in this group or namespace, for example a Maven groupId. Repeatable.
--fail-on source-changepolicy.fail_onMake a source change to Git or a URL fail instead of warn. Diff only.
--protected-package <name>policy.protected_packagesA trusted name. Lookalikes within the threshold are flagged as possible typosquats. Repeatable.
--typosquat-threshold <0..1>policy.typosquat_thresholdSimilarity score above which a name counts as a lookalike. Default 0.90. Higher is stricter and matches less.
--typosquat-mode <warn|fail>policy.typosquat_modePolicy status for a typosquat finding. warn (default) records a warning. fail lets it fail the run when it also matches --fail-on.

--typosquat-mode only sets the policy status of typosquat findings. It does not change how names are compared. Even in fail mode a finding still has to match --fail-on to change the exit code, so a typical strict gate is --typosquat-mode fail --fail-on any.

Examples

# Ban a known-bad package
bomly scan --enrich --audit --deny-package event-stream --fail-on any

# Ban an entire namespace
bomly scan --enrich --audit --deny-group com.evil --fail-on any

# Catch typosquats of the packages you depend on, and fail on them
bomly scan --enrich --audit \
  --protected-package react --protected-package lodash \
  --typosquat-threshold 0.85 --typosquat-mode fail \
  --fail-on any

# Reject a dependency that changes to Git or a URL
bomly diff --base main --head HEAD --enrich --audit \
  --fail-on source-change

Diff and baselines

Under bomly diff, the base side acts as a trusted baseline for the typosquat check. Bomly adds the package names from the base graph to the protected set. It skips a head-side package whose ID or display name already existed in the base graph, so only newly introduced names are checked. Each new name is compared with your --protected-package list and with the names from the base graph. A long-standing package is not flagged, while a new lookalike can be. Findings are then classified as introduced, resolved, or persisted like findings from other auditors; see AUDITORS.md.

The same diff audit receives the source transitions. A move to Git uses the rule dependency-source-change-to-git. A move to a URL uses dependency-source-change-to-url. Both warn by default and explain that registry-based vulnerability checks may no longer cover the dependency. Use --fail-on source-change when either change should fail. --warn-only still downgrades a configured failure.

Limitations

  • Names, not behavior. This auditor cannot tell whether a package is malicious, only whether its name is denied or resembles a protected one. Pair it with the vulnerability auditor for content risk.
  • Source-change checks need detector evidence. Cargo, Bundler, npm, pnpm, Yarn, Bun, pub, and SwiftPM report source details, as do the pip, Pipenv, Poetry, and uv Python paths. Each does so only when its lockfile or tool output proves the origin. Other detectors leave the source unknown when their input cannot tell a registry package from another origin.
  • Only Git and URL moves are review signals. Moves to project, workspace, or file sources stay informational, even when registry matching eligibility changes.
  • Source-change policy is diff only. --fail-on source-change is accepted by other audited commands but cannot match there, because they do not produce dependency transitions.
  • Source changes need context. A Git or URL source can be intentional. The warning asks a reviewer to confirm the new origin and pinned reference.
  • Typosquat tuning is a trade-off. A lower threshold catches more lookalikes but raises false positives on legitimately similar names. Tune --typosquat-threshold per project.
  • Protected lists are explicit. Outside diff, Bomly only checks lookalikes against names you pass with --protected-package. It does not infer a list of popular packages.