bdo-cli 0.48.0 → 0.48.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/CHANGELOG.md +56 -0
  2. package/README.md +19 -2
  3. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -5,6 +5,62 @@ All notable changes to Bushido (bdo) will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.48.2] (2026-10-25)
9
+
10
+ ### Security
11
+
12
+ - **`install.sh` verifies build provenance.** After the SHA-256 check, an
13
+ authenticated GitHub CLI runs `gh attestation verify`, pinned to this repo's
14
+ `release.yml` and the release tag; a mismatch aborts the install. The
15
+ checksum alone cannot catch a replaced release, since it ships in the same
16
+ release. Without an authenticated `gh` the installer warns and falls back to
17
+ the checksum; `BDO_VERIFY_ATTESTATION=require` refuses that, `=0` skips the
18
+ check. Releases before v0.47.1 have no attestations and are checksum-only.
19
+
20
+ - **The Homebrew tap is checked daily against the release attestations.** The
21
+ formula pins each archive's sha256, so brew already rejects a replaced
22
+ release asset, but not a rewritten tap (e.g. a leaked tap token pointing url
23
+ and sha256 at another binary). A scheduled CI job now verifies that every
24
+ url in the live formula is this repository's release asset for the formula's
25
+ version, that its sha256 matches, that it carries build provenance from
26
+ `release.yml` at that tag, and that the formula tracks the latest release.
27
+ The README shows how to verify a Homebrew download yourself
28
+ (`gh attestation verify "$(brew --cache bushido)" …`).
29
+
30
+ ### Fixed
31
+
32
+ - **`bdo --raw grep` without `grep` on PATH** (native Windows shells) still
33
+ capped, truncated and grouped the matches, because raw mode had no `grep` to
34
+ run and bdo's module ignored the switch. It now runs the same search through
35
+ ripgrep and prints every match in full as grep-style `file:line:content`,
36
+ with rg's exit code.
37
+ - `install.sh` on x86_64 Linux downloaded `x86_64-unknown-linux-musl`, which
38
+ the release never publishes, so every such install failed. It now uses the
39
+ published `x86_64-unknown-linux-gnu` archive, and a test checks every target
40
+ the installer picks against the release's target list.
41
+
42
+ ## [0.48.1] (2026-10-21)
43
+
44
+ ### Security
45
+
46
+ - **Hook permission gate: ANSI-C quoting and line-continued substitutions are
47
+ never auto-allowed.** `$'...'` quoting can hide real separators behind
48
+ escaped quotes (`git status $'a\'b'; other-cmd; echo $'c\'d'` looked like
49
+ one allowed `git status`), and a backslash-newline between `$`/`<`/`>` and
50
+ `(` (`$\⏎(…)`) slipped a command substitution past the gate, letting two
51
+ allowed commands combine (`git log $\⏎(echo --output=/path)` writes a file).
52
+ Both now defer to the agent's own permission prompt, across the Claude,
53
+ Cursor, Gemini and Copilot hooks.
54
+ - **rustls-webpki 0.103.15 → 0.103.16 and webpki-roots 1.0.6 → 1.0.10**
55
+ (via `ureq`), fixing RUSTSEC-2026-0382 (certificate verification may accept
56
+ distrusted intermediates) and RUSTSEC-2026-0381 (bundled roots trust
57
+ distrusted emSign intermediates). Caught by the daily scheduled audit.
58
+ - **`bdo curl` no longer buffers a whole response in memory.** Piped / redirected
59
+ output now goes straight from curl to the consumer (bytes arrive before the
60
+ transfer ends, exit status and failure bodies unchanged). On a terminal,
61
+ bdo captures at most 16 MiB to summarize; a larger response is streamed
62
+ byte-exact instead of growing memory without bound.
63
+
8
64
  ## [0.48.0] (2026-10-17)
9
65
 
10
66
  ### Features
package/README.md CHANGED
@@ -76,6 +76,13 @@ curl -fsSL https://raw.githubusercontent.com/tedorigawa001/TokenReductionTool-BD
76
76
  > echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc # or ~/.zshrc
77
77
  > ```
78
78
 
79
+ The installer always checks the archive's SHA-256. With an authenticated
80
+ GitHub CLI (`gh auth login`) it also verifies the build provenance — that the
81
+ archive was built by this repository's release workflow at that tag — and
82
+ refuses to install if it doesn't match. Without `gh` it warns and relies on the
83
+ checksum. `BDO_VERIFY_ATTESTATION=require` makes provenance mandatory;
84
+ `BDO_VERIFY_ATTESTATION=0` skips it.
85
+
79
86
  ### Cargo
80
87
 
81
88
  ```bash
@@ -95,6 +102,14 @@ release):
95
102
  gh attestation verify bushido-aarch64-apple-darwin.tar.xz --repo tedorigawa001/TokenReductionTool-BDO
96
103
  ```
97
104
 
105
+ Homebrew installs can be checked the same way, against the archive brew
106
+ downloaded (CI also verifies the published formula against these attestations
107
+ daily):
108
+
109
+ ```bash
110
+ gh attestation verify "$(brew --cache bushido)" --repo tedorigawa001/TokenReductionTool-BDO
111
+ ```
112
+
98
113
  - macOS: `bushido-x86_64-apple-darwin.tar.xz` / `bushido-aarch64-apple-darwin.tar.xz`
99
114
  - Linux: `bushido-x86_64-unknown-linux-gnu.tar.xz` / `bushido-aarch64-unknown-linux-gnu.tar.xz`
100
115
  - Windows: `bushido-x86_64-pc-windows-msvc.zip`
@@ -104,7 +119,7 @@ gh attestation verify bushido-aarch64-apple-darwin.tar.xz --repo tedorigawa001/T
104
119
  ### Verify Installation
105
120
 
106
121
  ```bash
107
- bdo --version # Should show "bdo 0.48.0"
122
+ bdo --version # Should show "bdo 0.48.2"
108
123
  bdo gain # Should show token savings stats
109
124
  ```
110
125
 
@@ -436,7 +451,9 @@ BDO_RAW=1 bdo cargo test # env var form, e.g. for a whole session
436
451
  ```
437
452
 
438
453
  - A command with a same-named program (`git`, `ls`, `cargo`, `grep`, …) runs
439
- that program with your arguments unchanged.
454
+ that program with your arguments unchanged. Where there is no `grep` on PATH
455
+ (native Windows shells), `bdo --raw grep` runs the same search through
456
+ ripgrep and prints every match in full, as `file:line:content`.
440
457
  - `err` / `test` / `summary` run the command they wrap.
441
458
  - `read` shows the full file.
442
459
  - bdo-only commands (`gain`, `map`, …) have no unfiltered form and run as usual.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "artifactDownloadUrls": [
3
- "https://github.com/tedorigawa001/TokenReductionTool-BDO/releases/download/v0.48.0"
3
+ "https://github.com/tedorigawa001/TokenReductionTool-BDO/releases/download/v0.48.2"
4
4
  ],
5
5
  "author": "Patrick Szymkowiak",
6
6
  "bin": {
@@ -91,7 +91,7 @@
91
91
  "zipExt": ".tar.xz"
92
92
  }
93
93
  },
94
- "version": "0.48.0",
94
+ "version": "0.48.2",
95
95
  "volta": {
96
96
  "node": "18.14.1",
97
97
  "npm": "9.5.0"