Skip to content

build(cli): stop autoloading cwd bunfig/.env in the compiled binary - #1376

Closed
nc9 wants to merge 2 commits into
mainfrom
fix/compiled-binary-no-cwd-autoload
Closed

nc9 wants to merge 2 commits into
mainfrom
fix/compiled-binary-no-cwd-autoload

Conversation

@nc9

@nc9 nc9 commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Stop autoloading the working directory's bunfig.toml and .env in the compiled binary.

  • Makefile (release builds) and apps/cli/package.json (bun run build) pass --no-compile-autoload-dotenv --no-compile-autoload-bunfig. In the Makefile they follow --minify, so the existing --compile --splitting --minify assertion still holds; startup.test.ts now also asserts the two flags in both files.
  • New apps/cli/scripts/check-compiled-autoload.ts <binary>: runs a compiled binary in a directory that has a bunfig.toml with a preload and a .env setting SQUIRREL_CONTENT_STORE_PATH, and fails if the preload ran or the .env took effect. Checked locally: a binary built without the flags fails both checks, one built with them passes. The Compile CLI CI job runs it after the build (actionlint clean).
  • CHANGELOG.md (Changed) and docs/cli/auth.mdx: variables such as SQUIRRELSCAN_API_KEY have to come from the real environment; a .env or bunfig.toml in the project directory is not read. Settings and squirrel.toml are unaffected.
  • No docs or skill text tells users to put keys in a project .env (searched docs/ and the skill). Skill: no change needed.

Gates: apps/cli format, lint, tsgo, startup.test.ts, make validate.

@nc9

nc9 commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

Landed in v0.0.145 as 90b347e0 21d74cf7 via #1377. Release: https://github.com/squirrelscan/squirrelscan/releases/tag/v0.0.145. Closing this original.

nik

@nc9 nc9 closed this Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant