bdo-cli 0.49.0 → 0.49.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.
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.2] (2026-10-31)
9
+
10
+ ### Security
11
+
12
+ - **`bdo grep` no longer lets ripgrep run a program.** bdo translates grep to
13
+ rg and forwarded extra arguments, including rg's `--pre <cmd>` (runs `<cmd>`
14
+ on every searched file) and `--hostname-bin <cmd>`. Native grep rejects
15
+ these as unknown options, so a hook-rewritten `grep -rn x . --pre rm` — which
16
+ a `grep` allow rule auto-approves — deleted the files it searched. bdo grep
17
+ now refuses `--pre`, `--pre-glob` and `--hostname-bin` (also `--opt=value`)
18
+ in the path, `-t` value and extra arguments, including under `--raw`, and
19
+ passes the pattern with `-e` so a pattern like `--pre` is searched for, not
20
+ parsed as a flag.
21
+ - **`bdo read` streams instead of loading unbounded input.** `cat` / `head` /
22
+ `tail` become `bdo read`, which loaded the whole file to filter it:
23
+ `/dev/zero` grew memory until the process was killed, a FIFO showed nothing
24
+ until the writer closed, and a multi-gigabyte log was held in memory. Files
25
+ that are not regular files, or are over 16 MiB, are now streamed unfiltered
26
+ and byte-exact (non-UTF-8 included), honouring `-m` / `--tail-lines`, in
27
+ bounded memory: `-m` counts newlines chunk by chunk (~8 MB RSS for 200 MB of
28
+ `/dev/zero`); `--tail-lines` scans a regular file backwards from the end
29
+ (a 300 MB single-line file: ~10 MB RSS) and keeps at most a 16 MiB window of
30
+ input that cannot be seeked (`/dev/zero` holds at ~38 MB RSS, warning when
31
+ the requested lines did not fit).
32
+
33
+ ## [0.49.1] (2026-10-29)
34
+
35
+ ### Security
36
+
37
+ - **Redaction: values starting with `-` and multi-part shell words.** A secret
38
+ beginning with `-` was left in plain text for env assignments
39
+ (`DATABASE_PASSWORD=-…`), `curl -u alice:-…`, mysql `-p-…` and
40
+ `password=-…` — only a value after a `--flag` may be the next flag. And a
41
+ value the shell reads as one word but built from several quoted and
42
+ unquoted parts was masked only in part (`--password "abc"defgh` kept
43
+ `defgh`) or not at all (`abc"d e"f`). The whole word is now masked; a value
44
+ that is exactly one quoted string still keeps its quotes, so JSON stays
45
+ valid, and `""`, `''` and `$VAR` / `"$VAR"` references are left alone.
46
+ - **Redaction: `curl -u` arguments are one shell word too.** A credential
47
+ quoted as a whole and continued after the quote — `curl -u 'alice:abc'defgh`
48
+ — kept `defgh`, because the quoted-argument rule stopped at the closing
49
+ quote. The `-u` / `--user` / `-uUSER` / `--user=` argument is now captured
50
+ as one shell word and split at its first `:`: the user is kept and the rest
51
+ of the word masked, with quotes re-balanced. No `:` (curl prompts) and
52
+ `$VAR` references the shell expands (unquoted or in `"…"`) are left alone,
53
+ while a `$` inside `'…'` is literal and masked
54
+ (`curl -u 'alice:$literalSecret9'`). `--user` must be followed by `=` or a
55
+ space, so `--user-agent=client:1.0` is not touched.
56
+
8
57
  ## [0.49.0] (2026-10-29)
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.49.0"
122
+ bdo --version # Should show "bdo 0.49.2"
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.49.0"
3
+ "https://github.com/tedorigawa001/TokenReductionTool-BDO/releases/download/v0.49.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.49.0",
94
+ "version": "0.49.2",
95
95
  "volta": {
96
96
  "node": "18.14.1",
97
97
  "npm": "9.5.0"