Shebang line is present and correct
Why it matters
Without #!/usr/bin/env node on the first line of dist/cli.js, Linux and macOS refuse to execute the file — users see cannot execute binary file: Exec format error and have no way to fix it short of prefixing node manually. Hardcoding #!/usr/local/bin/node is nearly as bad: it breaks on systems using nvm, asdf, volta, Homebrew's Apple Silicon paths, or any container where node lives elsewhere. env-based shebangs are the only portable form.
Severity rationale
High because a missing or hardcoded shebang breaks execution on Unix systems for a large fraction of users.
Remediation
Ensure the entry file's first line is exactly #!/usr/bin/env node (or #!/usr/bin/env python3) with no BOM or blank line before it. If you transpile, configure the bundler to preserve it. With tsup or esbuild in tsup.config.ts:
export default defineConfig({
entry: ['src/cli.ts'],
banner: { js: '#!/usr/bin/env node' },
})
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the CLI Quality Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
Taxons
History
- 2026-04-18·v1.0.0·Initial import from cli-quality·automated