Skip to content
Fallow home
All docs pages

Docs home

Unlisted binaries

What an unlisted-binary finding of fallow dead-code means, why it matters and how to fix it.

What it reports

Binary used but provided by no installed package.

Dependencies explains how fallow finds it.

Why it matters

Binaries that package.json scripts or process calls in source (spawn, execSync, execa, the $ template of zx or execa, Bun.spawn) run with a literal command, when no installed or listed package provides them. A binary counts as provided when a node_modules/.bin link exists, a declared dependency or a workspace package declares it in bin, or it maps to a declared dependency. Shell builtins, commands that npx or pnpm dlx download, and a fixed list of common operating-system tools are skipped. The check needs installed dependencies and reports nothing without a root node_modules. Defaults to warn.

Example

The package.json script pack runs gnome-extensions pack ext, and src/capture.ts calls spawnSync("hyprctl", ["version"]). No installed package provides either binary.

Fix

Add the package that provides the binary to devDependencies. When the operating system or the CI image provides it, add the name to ignoreBinaries.

Facts

FactValue
Issue typeunlisted-binary
Rule id in SARIF outputfallow/unlisted-binary
Commandfallow dead-code
Default severitywarn
Config key in rulesunlisted-binaries
Filter option--unlisted-binaries
Fixable with fallow fixNo
Opt-inNo

Note. Needs installed dependencies; a project without a root node_modules reports none.

When to keep the code

  • When the operating system or the CI image supplies the command, add its name to ignoreBinaries. A package.json file cannot hold a comment, so ignoreBinaries is the only way to keep a finding of a script.

Notes

Fallow does not report shell builtins, commands that npx or pnpm dlx downloads, paths, variables, and common system tools such as git, curl and docker.