gstack 1.91.159.0 stops the repo it audits from configuring gstack through .env

1 month ago

gstack 1.91.159.0 for Claude Code closes a hole where the repository gstack audits could configure gstack itself: a committed .env could swap in the binary run as "claude", and a bunfig.toml preload could run arbitrary code. Every Bun gstack starts now ignores both files; your shell environment works as before. If you kept gstack settings in a repo .env, move them to your shell or gstack-config.

Ask about this presentation

Chapters

Show transcript
  1. gstack runs inside the repository it audits, and Bun loaded that repository's .env file. So a committed .env could swap in an attacker's binary and run it as Claude. This release closes that.

    Slide text
    gstack logo

    gstack 1.91.159.0 stops the repo it audits from configuring gstack

    # committed .env
    GSTACK_CLAUDE_BIN=attacker-chosen binary
    before it ran as “claude”
    The hole The fix Your config Also Your turn
    garrytan/gstack · CHANGELOG.md · 1.91.159.0
  2. A bunfig.toml preload was worse: it ran any code before gstack's first line. Now all 123 Bun entry points skip both files. Your shell environment works exactly as before.

    Slide text

    Every Bun that gstack starts now ignores .env and bunfig.toml

    A bunfig.toml preload ran arbitrary code in every gstack bin, hook and skill step
    Your shell environment works exactly as before
    The hole The fix Your config Also Your turn
    garrytan/gstack · CHANGELOG.md · 1.91.159.0
  3. That changes one thing for you. If you kept gstack settings in a repository's .env, gstack ignores them now. Export them in your shell, or set them with gstack-config.

    Slide text

    A repo .env no longer configures gstack

    Your shell or gstack-config carries those settings now
    The hole The fix Your config Also Your turn
    garrytan/gstack · CHANGELOG.md · 1.91.159.0
  4. gstack-evidence run now hands its command your shell's environment, as if you ran it by hand, so it stops dropping variables you exported. Compiled builds skip both files, and Windows gets the same isolation.

    Slide text

    The same isolation reaches evidence runs, builds and Windows

    gstack-evidence run passes your shell’s environment through unscrubbed
    Compiled builds no longer load .env or bunfig.toml
    Native Windows gets an empty config in place of /dev/null
    The hole The fix Your config Also Your turn
    garrytan/gstack · CHANGELOG.md · 1.91.159.0
  5. The details are in gstack's changelog. Do any of the repositories you run gstack in commit a .env file?

    Slide text

    The full notes are in gstack’s changelog

    CHANGELOG.md gstack 1.91.159.0, October 19
    Do any of the repos you run gstack in commit a .env file?
    The hole The fix Your config Also Your turn
    garrytan/gstack · CHANGELOG.md · 1.91.159.0

What happened in AI today, in your inbox

One short email each evening. Read it and you’re caught up.

Built with ❤️ in New York