bdo-cli 0.48.1 → 0.48.3

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 +46 -0
  2. package/README.md +19 -2
  3. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -5,6 +5,52 @@ 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.3] (2026-10-27)
9
+
10
+ ### Security
11
+
12
+ - **sha2 0.10 → 0.11**, which moves `block-buffer` from 0.10.4 to 0.12.1 and
13
+ fixes GHSA-qwgh-2vcv-g2f7 (a caught panic inside a compression callback
14
+ could corrupt the buffer position; not reachable from bdo, which never
15
+ hashes inside `catch_unwind`). Found by an OSV scan; it has no RustSec ID
16
+ yet, so `cargo audit` did not report it. Hashes are unchanged — the three
17
+ call sites now share one `sha256_hex` helper pinned by FIPS test vectors,
18
+ so stored hook-integrity, trust and device hashes stay valid.
19
+
20
+ ## [0.48.2] (2026-10-25)
21
+
22
+ ### Security
23
+
24
+ - **`install.sh` verifies build provenance.** After the SHA-256 check, an
25
+ authenticated GitHub CLI runs `gh attestation verify`, pinned to this repo's
26
+ `release.yml` and the release tag; a mismatch aborts the install. The
27
+ checksum alone cannot catch a replaced release, since it ships in the same
28
+ release. Without an authenticated `gh` the installer warns and falls back to
29
+ the checksum; `BDO_VERIFY_ATTESTATION=require` refuses that, `=0` skips the
30
+ check. Releases before v0.47.1 have no attestations and are checksum-only.
31
+
32
+ - **The Homebrew tap is checked daily against the release attestations.** The
33
+ formula pins each archive's sha256, so brew already rejects a replaced
34
+ release asset, but not a rewritten tap (e.g. a leaked tap token pointing url
35
+ and sha256 at another binary). A scheduled CI job now verifies that every
36
+ url in the live formula is this repository's release asset for the formula's
37
+ version, that its sha256 matches, that it carries build provenance from
38
+ `release.yml` at that tag, and that the formula tracks the latest release.
39
+ The README shows how to verify a Homebrew download yourself
40
+ (`gh attestation verify "$(brew --cache bushido)" …`).
41
+
42
+ ### Fixed
43
+
44
+ - **`bdo --raw grep` without `grep` on PATH** (native Windows shells) still
45
+ capped, truncated and grouped the matches, because raw mode had no `grep` to
46
+ run and bdo's module ignored the switch. It now runs the same search through
47
+ ripgrep and prints every match in full as grep-style `file:line:content`,
48
+ with rg's exit code.
49
+ - `install.sh` on x86_64 Linux downloaded `x86_64-unknown-linux-musl`, which
50
+ the release never publishes, so every such install failed. It now uses the
51
+ published `x86_64-unknown-linux-gnu` archive, and a test checks every target
52
+ the installer picks against the release's target list.
53
+
8
54
  ## [0.48.1] (2026-10-21)
9
55
 
10
56
  ### Security
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.1"
122
+ bdo --version # Should show "bdo 0.48.3"
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.1"
3
+ "https://github.com/tedorigawa001/TokenReductionTool-BDO/releases/download/v0.48.3"
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.1",
94
+ "version": "0.48.3",
95
95
  "volta": {
96
96
  "node": "18.14.1",
97
97
  "npm": "9.5.0"