bdo-cli 0.48.3 → 0.49.1

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.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,55 @@ 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.49.1] (2026-10-29)
9
+
10
+ ### Security
11
+
12
+ - **Redaction: values starting with `-` and multi-part shell words.** A secret
13
+ beginning with `-` was left in plain text for env assignments
14
+ (`DATABASE_PASSWORD=-…`), `curl -u alice:-…`, mysql `-p-…` and
15
+ `password=-…` — only a value after a `--flag` may be the next flag. And a
16
+ value the shell reads as one word but built from several quoted and
17
+ unquoted parts was masked only in part (`--password "abc"defgh` kept
18
+ `defgh`) or not at all (`abc"d e"f`). The whole word is now masked; a value
19
+ that is exactly one quoted string still keeps its quotes, so JSON stays
20
+ valid, and `""`, `''` and `$VAR` / `"$VAR"` references are left alone.
21
+ - **Redaction: `curl -u` arguments are one shell word too.** A credential
22
+ quoted as a whole and continued after the quote — `curl -u 'alice:abc'defgh`
23
+ — kept `defgh`, because the quoted-argument rule stopped at the closing
24
+ quote. The `-u` / `--user` / `-uUSER` / `--user=` argument is now captured
25
+ as one shell word and split at its first `:`: the user is kept and the rest
26
+ of the word masked, with quotes re-balanced. No `:` (curl prompts) and
27
+ `$VAR` references the shell expands (unquoted or in `"…"`) are left alone,
28
+ while a `$` inside `'…'` is literal and masked
29
+ (`curl -u 'alice:$literalSecret9'`). `--user` must be followed by `=` or a
30
+ space, so `--user-agent=client:1.0` is not touched.
31
+
32
+ ## [0.49.0] (2026-10-29)
33
+
34
+ ### Security
35
+
36
+ - **Secret redaction covers far more forms.** What bdo stores locally
37
+ (tracking DB, tee recovery files, hook audit fields) is now masked for:
38
+ environment-style assignments whose name ends in a secret word
39
+ (`GITHUB_TOKEN=…`, `OPENAI_API_KEY=…`, `AWS_SECRET_ACCESS_KEY=…`) — the old
40
+ rule missed these because `_TOKEN` has no word boundary; passwords in URL
41
+ userinfo (`https://user:PASS@host`, `postgres://…`); secret-named flags with a
42
+ separate value (`--password X`, `--token X`); mysql `-pPASS` and
43
+ `curl -u user:PASS`; Cookie headers; Slack/Discord webhook URLs; AWS/Azure
44
+ signed-URL parameters; and Hugging Face, Docker Hub, DigitalOcean, PyPI,
45
+ SendGrid, Google OAuth and further GitLab token formats. A probe of 23
46
+ common forms went from 2 masked to all 23. Look-alikes are pinned as
47
+ untouched: `MAX_TOKENS=4096`, `GITHUB_TOKEN=$GH_TOKEN`, `--password-stdin`,
48
+ `--token-file`, `ssh://git@host:22`, `cargo test -p`, `docker run -p`,
49
+ mysql's `-P3306`. Values may be quoted and contain spaces
50
+ (`PASSWORD="my secret pass"`, `--password ' leading'`, `-p'a b'`,
51
+ `curl -u 'alice:a b'`, `my\ pass`): the whole value is masked and its quotes
52
+ kept, and a Cookie value containing quotes (`session="…"`) is masked whole.
53
+ Each rule now compiles only when its trigger substrings appear, so the
54
+ per-command cost dropped despite the larger rule set (e.g. ~0.2 ms for an
55
+ env token, ~0.005 ms for a command with no secret word, vs ~2.8 ms before).
56
+
8
57
  ## [0.48.3] (2026-10-27)
9
58
 
10
59
  ### Security
package/README.md CHANGED
@@ -119,7 +119,7 @@ gh attestation verify "$(brew --cache bushido)" --repo tedorigawa001/TokenReduct
119
119
  ### Verify Installation
120
120
 
121
121
  ```bash
122
- bdo --version # Should show "bdo 0.48.3"
122
+ bdo --version # Should show "bdo 0.49.1"
123
123
  bdo gain # Should show token savings stats
124
124
  ```
125
125
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "artifactDownloadUrls": [
3
- "https://github.com/tedorigawa001/TokenReductionTool-BDO/releases/download/v0.48.3"
3
+ "https://github.com/tedorigawa001/TokenReductionTool-BDO/releases/download/v0.49.1"
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.3",
94
+ "version": "0.49.1",
95
95
  "volta": {
96
96
  "node": "18.14.1",
97
97
  "npm": "9.5.0"