Skip to content

Commit fdb3c9f

Browse files
committed
security: drop vhs dev tool to clear critical wish SCP path traversal (CVE-2026-41589)
Dependabot alert #2 (the only open alert on the default branch) flags github.com/charmbracelet/wish v1.4.7 in tools/go.mod for CVE-2026-41589 / GHSA-xjvp-7243-rg9h — a critical (CVSS 9.6) path traversal in wish's SCP middleware. There is no fixed v1: the patch ships only as charm.land/wish/v2 >= 2.0.1, a different module path, and the latest vhs (v0.11.0) still requires wish v1.4.7 — so neither a version bump nor a `replace` resolves it in place. wish is pulled in solely as an indirect dependency of the vhs dev tool. vhs is never compiled into the mdsmith binary and nothing invokes `go tool -modfile=tools/go.mod vhs` (the demo workflow installs a prebuilt vhs release binary). Removing vhs from the tool directive and tidying drops wish plus ~38 other indirect modules from the graph (258 -> 219), clearing the alert with no impact on the shipped binary or CI. vhs was the only thing forcing tools/go.mod to Go 1.25.8; the floor now drops to 1.25.0, matching go.mod. golangci-lint and gobco still build and run from the trimmed modfile. Docs that listed vhs as a tools/go.mod tool are updated. Closes #617 https://claude.ai/code/session_01UT8dyBo9sjkBDNbAbAUVgs
1 parent aed18aa commit fdb3c9f

6 files changed

Lines changed: 24 additions & 166 deletions

File tree

.github/copilot-instructions.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -229,11 +229,10 @@ row: "- [{title}](../docs/development/{filename})"
229229

230230
#### Build & Test Commands
231231

232-
Requires Go 1.25+. Dev tools (golangci-lint, vhs,
233-
gobco) build from `tools/go.mod`, which needs Go
234-
1.25.8+; `go.mod` itself must stay tool-free so
235-
`go install` consumers never inherit a dev tool's
236-
go floor.
232+
Requires Go 1.25+. Dev tools (golangci-lint and
233+
gobco) build from `tools/go.mod`; `go.mod` itself
234+
stays tool-free so `go install` consumers never
235+
inherit a dev tool's large dependency tree.
237236

238237
- `go build ./...` — build all packages
239238
- `go test ./...` — run all tests

AGENTS.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -234,11 +234,10 @@ row: "- [{title}](docs/development/{filename})"
234234

235235
### Build & Test Commands
236236

237-
Requires Go 1.25+. Dev tools (golangci-lint, vhs,
238-
gobco) build from `tools/go.mod`, which needs Go
239-
1.25.8+; `go.mod` itself must stay tool-free so
240-
`go install` consumers never inherit a dev tool's
241-
go floor.
237+
Requires Go 1.25+. Dev tools (golangci-lint and
238+
gobco) build from `tools/go.mod`; `go.mod` itself
239+
stays tool-free so `go install` consumers never
240+
inherit a dev tool's large dependency tree.
242241

243242
- `go build ./...` — build all packages
244243
- `go test ./...` — run all tests

CLAUDE.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -220,11 +220,10 @@ row: "- [{title}](docs/development/{filename})"
220220

221221
### Build & Test Commands
222222

223-
Requires Go 1.25+. Dev tools (golangci-lint, vhs,
224-
gobco) build from `tools/go.mod`, which needs Go
225-
1.25.8+; `go.mod` itself must stay tool-free so
226-
`go install` consumers never inherit a dev tool's
227-
go floor.
223+
Requires Go 1.25+. Dev tools (golangci-lint and
224+
gobco) build from `tools/go.mod`; `go.mod` itself
225+
stays tool-free so `go install` consumers never
226+
inherit a dev tool's large dependency tree.
228227

229228
- `go build ./...` — build all packages
230229
- `go test ./...` — run all tests

docs/development/index.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,10 @@ row: "- [{title}]({filename})"
3535

3636
## Build & Test Commands
3737

38-
Requires Go 1.25+. Dev tools (golangci-lint, vhs,
39-
gobco) build from `tools/go.mod`, which needs Go
40-
1.25.8+; `go.mod` itself must stay tool-free so
41-
`go install` consumers never inherit a dev tool's
42-
go floor.
38+
Requires Go 1.25+. Dev tools (golangci-lint and
39+
gobco) build from `tools/go.mod`; `go.mod` itself
40+
stays tool-free so `go install` consumers never
41+
inherit a dev tool's large dependency tree.
4342

4443
- `go build ./...` — build all packages
4544
- `go test ./...` — run all tests

tools/go.mod

Lines changed: 8 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
11
module github.com/jeduden/mdsmith
22

3-
// Alternate modfile for dev tools only: golangci-lint, vhs, and
4-
// gobco are built from this graph via
3+
// Alternate modfile for dev tools only: golangci-lint and gobco are
4+
// built from this graph via
55
// `go tool -modfile=tools/go.mod <tool>`. Keeping them out of
6-
// go.mod keeps their dependency trees and go-version floors out of
7-
// the module graph that `go install m@version` and library
8-
// consumers resolve (vhs alone forces go >= 1.25.8 here, while the
9-
// real dependencies in go.mod top out at 1.25.0). Tidy with
10-
// `go mod tidy -modfile=tools/go.mod`; the require list is a
6+
// go.mod keeps their large dependency trees out of the module graph
7+
// that `go install m@version` and library consumers resolve. Tidy
8+
// with `go mod tidy -modfile=tools/go.mod`; the require list is a
119
// superset of go.mod because an alternate modfile still covers the
1210
// repository's own packages.
13-
go 1.25.8
11+
go 1.25.0
1412

1513
tool (
16-
github.com/charmbracelet/vhs
1714
github.com/golangci/golangci-lint/v2/cmd/golangci-lint
1815
github.com/rillig/gobco
1916
)
@@ -54,20 +51,16 @@ require (
5451
github.com/Masterminds/semver/v3 v3.4.0 // indirect
5552
github.com/MirrexOne/unqueryvet v1.4.0 // indirect
5653
github.com/OpenPeeDeeP/depguard/v2 v2.2.1 // indirect
57-
github.com/agnivade/levenshtein v1.2.1 // indirect
5854
github.com/alecthomas/chroma/v2 v2.21.1 // indirect
5955
github.com/alecthomas/go-check-sumtype v0.3.1 // indirect
6056
github.com/alexkohler/nakedret/v2 v2.0.6 // indirect
6157
github.com/alexkohler/prealloc v1.0.1 // indirect
6258
github.com/alfatraining/structtag v1.0.0 // indirect
6359
github.com/alingse/asasalint v0.0.11 // indirect
6460
github.com/alingse/nilnesserr v0.2.0 // indirect
65-
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be // indirect
6661
github.com/ashanbrown/forbidigo/v2 v2.3.0 // indirect
6762
github.com/ashanbrown/makezero/v2 v2.1.0 // indirect
68-
github.com/atotto/clipboard v0.1.4 // indirect
6963
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
70-
github.com/aymerick/douceur v0.2.0 // indirect
7164
github.com/beorn7/perks v1.0.1 // indirect
7265
github.com/bkielbasa/cyclop v1.2.3 // indirect
7366
github.com/blizzy78/varnamelen v0.8.0 // indirect
@@ -77,37 +70,23 @@ require (
7770
github.com/breml/errchkjson v0.4.1 // indirect
7871
github.com/butuzov/ireturn v0.4.0 // indirect
7972
github.com/butuzov/mirror v1.3.0 // indirect
80-
github.com/caarlos0/env/v11 v11.4.0 // indirect
8173
github.com/catenacyber/perfsprint v0.10.1 // indirect
8274
github.com/ccojocar/zxcvbn-go v1.0.4 // indirect
8375
github.com/cespare/xxhash/v2 v2.3.0 // indirect
8476
github.com/charithe/durationcheck v0.0.11 // indirect
85-
github.com/charmbracelet/bubbletea v1.3.4 // indirect
8677
github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc // indirect
87-
github.com/charmbracelet/glamour v1.0.0 // indirect
88-
github.com/charmbracelet/keygen v0.5.4 // indirect
8978
github.com/charmbracelet/lipgloss v1.1.1-0.20250404203927-76690c660834 // indirect
90-
github.com/charmbracelet/log v0.4.1 // indirect
91-
github.com/charmbracelet/ssh v0.0.0-20250128164007-98fd5ae11894 // indirect
92-
github.com/charmbracelet/vhs v0.11.0 // indirect
93-
github.com/charmbracelet/wish v1.4.7 // indirect
9479
github.com/charmbracelet/x/ansi v0.10.2 // indirect
9580
github.com/charmbracelet/x/cellbuf v0.0.13 // indirect
96-
github.com/charmbracelet/x/conpty v0.1.0 // indirect
97-
github.com/charmbracelet/x/errors v0.0.0-20240904165849-e8e43e13f84b // indirect
98-
github.com/charmbracelet/x/exp/slice v0.0.0-20250327172914-2fdc97757edf // indirect
9981
github.com/charmbracelet/x/term v0.2.1 // indirect
100-
github.com/charmbracelet/x/termios v0.1.0 // indirect
10182
github.com/ckaznocha/intrange v0.3.1 // indirect
10283
github.com/clipperhouse/uax29/v2 v2.2.0 // indirect
103-
github.com/creack/pty v1.1.24 // indirect
10484
github.com/curioswitch/go-reassign v0.3.0 // indirect
10585
github.com/daixiang0/gci v0.13.7 // indirect
10686
github.com/dave/dst v0.27.3 // indirect
10787
github.com/davecgh/go-spew v1.1.1 // indirect
10888
github.com/denis-tingaikin/go-header v0.5.0 // indirect
10989
github.com/dlclark/regexp2 v1.11.5 // indirect
110-
github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect
11190
github.com/ettle/strcase v0.2.0 // indirect
11291
github.com/fatih/color v1.18.0 // indirect
11392
github.com/fatih/structtag v1.2.0 // indirect
@@ -116,8 +95,6 @@ require (
11695
github.com/fzipp/gocyclo v0.6.0 // indirect
11796
github.com/ghostiam/protogetter v0.3.18 // indirect
11897
github.com/go-critic/go-critic v0.14.3 // indirect
119-
github.com/go-logfmt/logfmt v0.6.0 // indirect
120-
github.com/go-rod/rod v0.116.2 // indirect
12198
github.com/go-toolsmith/astcast v1.1.0 // indirect
12299
github.com/go-toolsmith/astcopy v1.1.0 // indirect
123100
github.com/go-toolsmith/astequal v1.2.0 // indirect
@@ -144,7 +121,6 @@ require (
144121
github.com/golangci/unconvert v0.0.0-20250410112200-a129a6e6413e // indirect
145122
github.com/google/go-cmp v0.7.0 // indirect
146123
github.com/gordonklaus/ineffassign v0.2.0 // indirect
147-
github.com/gorilla/css v1.0.1 // indirect
148124
github.com/gostaticanalysis/analysisutil v0.7.1 // indirect
149125
github.com/gostaticanalysis/comment v1.5.0 // indirect
150126
github.com/gostaticanalysis/forcetypeassert v0.2.0 // indirect
@@ -179,23 +155,14 @@ require (
179155
github.com/maratori/testableexamples v1.0.1 // indirect
180156
github.com/maratori/testpackage v1.1.2 // indirect
181157
github.com/matoous/godox v1.1.0 // indirect
158+
github.com/matryer/is v1.4.1 // indirect
182159
github.com/mattn/go-colorable v0.1.14 // indirect
183160
github.com/mattn/go-isatty v0.0.20 // indirect
184-
github.com/mattn/go-localereader v0.0.1 // indirect
185161
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
186162
github.com/mgechev/revive v1.13.0 // indirect
187-
github.com/microcosm-cc/bluemonday v1.0.27 // indirect
188163
github.com/mitchellh/go-homedir v1.1.0 // indirect
189164
github.com/mitchellh/mapstructure v1.5.0 // indirect
190165
github.com/moricho/tparallel v0.3.2 // indirect
191-
github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect
192-
github.com/muesli/cancelreader v0.2.2 // indirect
193-
github.com/muesli/go-app-paths v0.2.2 // indirect
194-
github.com/muesli/mango v0.2.0 // indirect
195-
github.com/muesli/mango-cobra v1.3.0 // indirect
196-
github.com/muesli/mango-pflag v0.1.0 // indirect
197-
github.com/muesli/reflow v0.3.0 // indirect
198-
github.com/muesli/roff v0.1.0 // indirect
199166
github.com/muesli/termenv v0.16.0 // indirect
200167
github.com/nakabonne/nestif v0.3.1 // indirect
201168
github.com/nishanths/exhaustive v0.12.0 // indirect
@@ -223,6 +190,7 @@ require (
223190
github.com/sashamelentyev/interfacebloat v1.1.0 // indirect
224191
github.com/sashamelentyev/usestdlibvars v1.29.0 // indirect
225192
github.com/securego/gosec/v2 v2.22.11 // indirect
193+
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect
226194
github.com/sirupsen/logrus v1.9.3 // indirect
227195
github.com/sivchari/containedctx v1.0.3 // indirect
228196
github.com/sonatard/noctx v0.4.0 // indirect
@@ -251,13 +219,6 @@ require (
251219
github.com/yagipy/maintidx v1.0.0 // indirect
252220
github.com/yeya24/promlinter v0.3.0 // indirect
253221
github.com/ykadowak/zerologlint v0.1.5 // indirect
254-
github.com/ysmood/fetchup v0.2.3 // indirect
255-
github.com/ysmood/goob v0.4.0 // indirect
256-
github.com/ysmood/got v0.40.0 // indirect
257-
github.com/ysmood/gson v0.7.3 // indirect
258-
github.com/ysmood/leakless v0.9.0 // indirect
259-
github.com/yuin/goldmark v1.7.13 // indirect
260-
github.com/yuin/goldmark-emoji v1.0.6 // indirect
261222
gitlab.com/bosi/decorder v0.4.2 // indirect
262223
go-simpler.org/musttag v0.14.0 // indirect
263224
go-simpler.org/sloglint v0.11.1 // indirect
@@ -267,11 +228,8 @@ require (
267228
go.uber.org/multierr v1.10.0 // indirect
268229
go.uber.org/zap v1.27.0 // indirect
269230
go.yaml.in/yaml/v3 v3.0.4 // indirect
270-
golang.org/x/crypto v0.49.0 // indirect
271-
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 // indirect
272231
golang.org/x/exp/typeparams v0.0.0-20251023183803-a4bb9ffd2546 // indirect
273232
golang.org/x/sync v0.20.0 // indirect
274-
golang.org/x/term v0.41.0 // indirect
275233
golang.org/x/text v0.35.0 // indirect
276234
google.golang.org/protobuf v1.36.8 // indirect
277235
gopkg.in/ini.v1 v1.67.0 // indirect

0 commit comments

Comments
 (0)