Skip to content

Releases: yangsi7/rotate-env

v0.1.3

Choose a tag to compare

@yangsi7 yangsi7 released this 08 Jul 21:38

Security + polish release from a deep multi-axis audit.

Security

  • Placeholder exclusion is now case-insensitive and broader. A real secret could previously be written into .env.Sample/.env.Template/.env.EXAMPLE (case variants) or .env.dist/.env.tmpl/.env.defaults (conventions that were not on the denylist) — files that are typically git-tracked, so the next commit would publish the secret. Discovery now applies an authoritative case-insensitive filter.
  • New values containing an embedded newline/CR are now refused (prevented a .env line-injection; the JSON path was already safe).
  • Backups use install -m 600 (no brief looser-mode window).

Fixed

  • Docs: "symlinks"→"copies", full exclusion list documented, "git worktrees" reworded, awk documented as required, em-dashes removed from --help/log output.
  • CI: ShellCheck action pinned to a tag.

Install

brew install yangsi7/tap/rotate
# or
curl -fsSL https://raw.githubusercontent.com/yangsi7/rotate-env/v0.1.3/install.sh | bash

v0.1.2

Choose a tag to compare

@yangsi7 yangsi7 released this 08 Jul 20:36

Patch release: rotate --version now reports the release version (was pinned at 0.1.0), so the Homebrew formula test passes and --version matches the installed tag. No functional change to rotation behavior.

brew install yangsi7/tap/rotate
# or
curl -fsSL https://raw.githubusercontent.com/yangsi7/rotate-env/v0.1.2/install.sh | bash

v0.1.1

Choose a tag to compare

@yangsi7 yangsi7 released this 08 Jul 20:10

Maintenance + polish release.

Fixed

  • Permission preservation on Linux. copy_perms tried BSD stat -f first (on GNU that means --file-system and does not error), so rotated files were left at the temp file's 0600 instead of their original mode. Now tries GNU stat -c first, then BSD stat -f.
  • install.sh: EXIT-trap cleanup under set -u, and --help no longer depends on $0 (works under curl | bash).

Added

  • Homebrew: brew install yangsi7/tap/rotate.
  • Animated demo in the README.

Install

brew install yangsi7/tap/rotate
# or
curl -fsSL https://raw.githubusercontent.com/yangsi7/rotate-env/v0.1.1/install.sh | bash

v0.1.0

Choose a tag to compare

@yangsi7 yangsi7 released this 08 Jul 19:45

First public release of rotate — rotate a leaked or expired API-key env variable across all your .env and .mcp.json files, safely.

Install

curl -fsSL https://raw.githubusercontent.com/yangsi7/rotate-env/v0.1.0/install.sh | bash

Highlights

  • Rotates a named env var's value across .env, .env.*, .envrc, and .mcp.json, discovered at runtime with fd.
  • .env via awk (preserves quoting / export / inline comments, exact-key, literal value); .mcp.json via jq walk (env, headers, args[] wrapper).
  • Secret never on argv (passed via environment), never printed (masked). New value via --value-file, $ROTATE_NEW_VALUE, a silent prompt, or stdin.
  • Dry-run by default; atomic temp+mv writes, preserved perms, optional --backup (chmod 600); idempotent; --old-value-file surgical rotation.

See the CHANGELOG.