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
| Fact | Value |
|---|---|
| Issue type | unlisted-binary |
| Rule id in SARIF output | fallow/unlisted-binary |
| Command | fallow dead-code |
| Default severity | warn |
Config key in rules | unlisted-binaries |
| Filter option | --unlisted-binaries |
Fixable with fallow fix | No |
| Opt-in | No |
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. Apackage.jsonfile cannot hold a comment, soignoreBinariesis 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.