Skip to content

Commit 794a6e5

Browse files
dep-updates: Go 1.25, refresh modules, add dependency workflow skill (#4888)
- Add dep-updates Cursor skill (Codex/Claude symlinks) for dependency and advisory-driven work; no standing residual-risk docs - Bump go.mod to Go 1.25 / toolchain 1.25.5; align CI workflows and protos Dockerfile - Upgrade OTel SDK, Docker CLI, AWS SDK v2, go-git, go-jose, xz, and related transitive modules
1 parent 761be88 commit 794a6e5

12 files changed

Lines changed: 180 additions & 99 deletions

File tree

.claude/skills/dep-updates

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../.cursor/skills/dep-updates

.codex/skills/dep-updates

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../.cursor/skills/dep-updates
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
---
2+
name: dep-updates
3+
description: Plan and apply Go dependency updates, including advisory-driven bumps, Trivy/govulncheck validation, and supply-chain review. Use when the user asks to update dependencies, refresh modules for security alerts, or run dependency vulnerability scans.
4+
---
5+
6+
# Dependency updates
7+
8+
Use this skill when the user wants to **update dependencies** in this repo—whether driven by security advisories, Dependabot, or general maintenance.
9+
10+
This repository is primarily **Go** (`go.mod` / `go.sum`). There is no root Node workspace; follow the Go workflow below.
11+
12+
**Project convention:** Do **not** create or maintain `docs/vuln-residual-risk.md` (or similar residual-risk documents) unless the user explicitly asks. Summarize anything still open in the PR description or chat instead.
13+
14+
## Quick Start
15+
16+
1. Run Trivy from the project root as a container, not a locally installed binary:
17+
18+
```bash
19+
docker run --rm -v "$PWD:/src" -w /src aquasec/trivy@sha256:bcc376de8d77cfe086a917230e818dc9f8528e3c852f7b1aff648949b6258d1c fs --scanners vuln .
20+
```
21+
22+
2. Optionally supplement with Go’s official checker (reports module vulnerabilities from the Go vulnerability database):
23+
24+
```bash
25+
go install golang.org/x/vuln/cmd/govulncheck@latest
26+
govulncheck ./...
27+
```
28+
29+
3. Use `gh` against the upstream repo when helpful, for example Dependabot security alerts:
30+
31+
```bash
32+
gh api repos/trufflesecurity/trufflehog/dependabot/alerts --paginate
33+
```
34+
35+
4. Triage each finding as:
36+
- `Actionable`: a fixed version exists and the current constraint allows, or can be relaxed to allow, the update.
37+
- `Blocked`: a fix exists, but taking it would require a major-version bump in a sibling dependency or a broader refactor the user did not ask for.
38+
- `No fix available`: upstream has not published a patched release.
39+
40+
5. Apply module updates, rerun the scans, and note remaining gaps in the PR or response (not in a standing residual-risk doc).
41+
42+
## Triage notes
43+
44+
- For Dependabot or advisory-driven work, note the affected module, vulnerable version range, fixed version, and exploit conditions called out in the advisory.
45+
- Check whether this repo is actually affected: look for imports, direct usage of the vulnerable APIs or code paths, and any required configuration, input shape, or runtime exposure described in the alert.
46+
- Verify that any advisory-listed "fixed version" actually exists upstream before planning around it; scanners can report versions that are not yet published.
47+
- For each incoming dependency update, spawn a sub-agent to inspect the new version for malicious or suspicious supply-chain changes before you adopt it.
48+
- Have the sub-agent review release notes and the module diff for typosquat signals, maintainer churn, unexpected build tags or generated code, obfuscated code, unexpected network or process behavior, credential or filesystem access, and unexplained new transitive dependencies.
49+
- Use sub-agents for per-package advisory and diff review, but keep `go.mod` / `go.sum` edits in a single coordinating agent.
50+
- Even if the alert appears non-exploitable here, still take the patch when the upgrade is reasonable and low risk.
51+
- If something cannot be upgraded yet, explain why in the PR or chat (upstream tag missing, incompatible API, etc.); do not create standing residual-risk documentation files unless the user asks.
52+
53+
## Go workflow
54+
55+
Use this path for findings in `go.mod` or `go.sum`.
56+
57+
- Prefer targeted upgrades: `go get example.com/module@vX.Y.Z` (or a compatible minor/patch as appropriate).
58+
- After changes, run `go mod tidy` from the project root.
59+
- Never edit `go.sum` manually; it is generated.
60+
- Run `make lint` (or `./scripts/lint.sh`) to match CI’s golangci-lint configuration.
61+
- Run tests appropriate to what changed. Broad checks often use:
62+
- `make test` for the default unit test sweep, or
63+
- `go test -timeout 30s -tags "integration detectors" ./...` when exercising integration and detector-tagged packages (narrow the path when only specific packages changed).
64+
- Use `make test-integration` or `make test-detectors` when the change touches integration-only or detector code paths.
65+
66+
## Validation
67+
68+
After making updates:
69+
70+
1. Re-run the same Trivy container command from the project root and confirm the vulnerability count decreased or the actionable findings were removed.
71+
2. Re-run `govulncheck ./...` if you use it in this pass.
72+
3. Run `make lint` and the relevant `go test` / `make test*` targets for the areas you touched.
73+
74+
## Execution notes
75+
76+
- Do not install Trivy locally as part of this workflow; use the containerized command.
77+
- Never edit `go.sum` manually; regenerate with `go mod tidy` after `go get` / `go mod` changes.
78+
- Do not create commits unless the user explicitly asks for them.
79+
- Use sub-agents wherever practical for read-only research and independent validation; keep `go.mod` and `go.sum` edits under one coordinating agent.
80+
- Include the analysis in the PR description: what the alert or upgrade was, how you checked impact, what the supply-chain review found, and what you changed.
81+
- Follow nearby project conventions and add tests when dependency updates require behavioral changes.

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
- name: Install Go
4343
uses: actions/setup-go@v5
4444
with:
45-
go-version: "1.24"
45+
go-version: "1.25"
4646
# Initializes the CodeQL tools for scanning.
4747
- name: Initialize CodeQL
4848
uses: github/codeql-action/init@v3

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- uses: actions/checkout@v4
1919
- uses: actions/setup-go@v5
2020
with:
21-
go-version: "1.24"
21+
go-version: "1.25"
2222
- name: golangci-lint
2323
uses: golangci/golangci-lint-action@v7
2424
with:

.github/workflows/performance.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Install Go
2020
uses: actions/setup-go@v5
2121
with:
22-
go-version: "1.24"
22+
go-version: "1.25"
2323

2424
- name: Run Head
2525
run: |

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- name: Set up Go
3838
uses: actions/setup-go@v5
3939
with:
40-
go-version: "1.24"
40+
go-version: "1.25"
4141
- name: Cosign install
4242
uses: sigstore/cosign-installer@d58896d6a1865668819e1d91763c7751a165e159 # v3.9.2
4343
- name: Install UPX

.github/workflows/smoke.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- name: Install Go
1313
uses: actions/setup-go@v5
1414
with:
15-
go-version: "1.24"
15+
go-version: "1.25"
1616
- name: Smoke
1717
run: |
1818
set -e
@@ -27,7 +27,7 @@ jobs:
2727
- name: Install Go
2828
uses: actions/setup-go@v5
2929
with:
30-
go-version: "1.24"
30+
go-version: "1.25"
3131
- name: Run trufflehog
3232
run: |
3333
set -e

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Install Go
2323
uses: actions/setup-go@v5
2424
with:
25-
go-version: "1.24"
25+
go-version: "1.25"
2626
- id: "auth"
2727
uses: "google-github-actions/auth@v2"
2828
with:
@@ -64,6 +64,6 @@ jobs:
6464
- name: Install Go
6565
uses: actions/setup-go@v5
6666
with:
67-
go-version: "1.24"
67+
go-version: "1.25"
6868
- name: Test
6969
run: make test-community

go.mod

Lines changed: 30 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
module github.com/trufflesecurity/trufflehog/v3
22

3-
go 1.24.0
3+
go 1.25.0
44

5-
toolchain go1.24.5
5+
toolchain go1.25.5
66

77
replace github.com/jpillora/overseer => github.com/trufflesecurity/overseer v1.2.8
88

@@ -17,14 +17,14 @@ require (
1717
github.com/adrg/strutil v0.3.1
1818
github.com/alecthomas/kingpin/v2 v2.4.0
1919
github.com/avast/apkparser v0.0.0-20250626104540-d53391f4d69d
20-
github.com/aws/aws-sdk-go-v2 v1.39.0
20+
github.com/aws/aws-sdk-go-v2 v1.41.5
2121
github.com/aws/aws-sdk-go-v2/config v1.31.7
2222
github.com/aws/aws-sdk-go-v2/credentials v1.18.11
2323
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.19.5
24-
github.com/aws/aws-sdk-go-v2/service/s3 v1.88.0
24+
github.com/aws/aws-sdk-go-v2/service/s3 v1.97.3
2525
github.com/aws/aws-sdk-go-v2/service/sns v1.38.2
2626
github.com/aws/aws-sdk-go-v2/service/sts v1.38.3
27-
github.com/aws/smithy-go v1.23.0
27+
github.com/aws/smithy-go v1.24.2
2828
github.com/aymanbagabas/go-osc52 v1.2.1
2929
github.com/bill-rich/go-syslog v0.0.0-20220413021637-49edb52a574c
3030
github.com/bradleyfalzon/ghinstallation/v2 v2.16.0
@@ -36,7 +36,7 @@ require (
3636
github.com/couchbase/gocb/v2 v2.11.0
3737
github.com/crewjam/rfc5424 v0.1.0
3838
github.com/csnewman/dextk v0.3.0
39-
github.com/docker/docker v28.3.3+incompatible
39+
github.com/docker/docker v28.5.2+incompatible
4040
github.com/dustin/go-humanize v1.0.1
4141
github.com/elastic/go-elasticsearch/v8 v8.17.1
4242
github.com/envoyproxy/protoc-gen-validate v1.3.0
@@ -45,7 +45,7 @@ require (
4545
github.com/gabriel-vasile/mimetype v1.4.10
4646
github.com/getsentry/sentry-go v0.32.0
4747
github.com/go-errors/errors v1.5.1
48-
github.com/go-git/go-git/v5 v5.13.2
48+
github.com/go-git/go-git/v5 v5.17.1
4949
github.com/go-logr/logr v1.4.3
5050
github.com/go-logr/zapr v1.3.0
5151
github.com/go-redis/redis v6.15.9+incompatible
@@ -137,22 +137,22 @@ require (
137137
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.53.0 // indirect
138138
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.53.0 // indirect
139139
github.com/Microsoft/go-winio v0.6.2 // indirect
140-
github.com/ProtonMail/go-crypto v1.1.5 // indirect
140+
github.com/ProtonMail/go-crypto v1.1.6 // indirect
141141
github.com/STARRY-S/zip v0.2.1 // indirect
142142
github.com/alecthomas/chroma/v2 v2.14.0 // indirect
143143
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect
144144
github.com/andybalholm/brotli v1.1.1 // indirect
145145
github.com/atotto/clipboard v0.1.4 // indirect
146-
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.1 // indirect
146+
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.8 // indirect
147147
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.7 // indirect
148-
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.7 // indirect
149-
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.7 // indirect
148+
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.21 // indirect
149+
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.21 // indirect
150150
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 // indirect
151-
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.7 // indirect
152-
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.1 // indirect
153-
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.8.7 // indirect
154-
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.7 // indirect
155-
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.7 // indirect
151+
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.22 // indirect
152+
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.7 // indirect
153+
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.13 // indirect
154+
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.21 // indirect
155+
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.21 // indirect
156156
github.com/aws/aws-sdk-go-v2/service/sso v1.29.2 // indirect
157157
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.34.3 // indirect
158158
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
@@ -168,7 +168,7 @@ require (
168168
github.com/charmbracelet/x/cellbuf v0.0.13 // indirect
169169
github.com/charmbracelet/x/exp/slice v0.0.0-20250327172914-2fdc97757edf // indirect
170170
github.com/charmbracelet/x/term v0.2.1 // indirect
171-
github.com/cloudflare/circl v1.6.1 // indirect
171+
github.com/cloudflare/circl v1.6.3 // indirect
172172
github.com/cncf/xds/go v0.0.0-20251210132809-ee656c7534f5 // indirect
173173
github.com/containerd/errdefs v1.0.0 // indirect
174174
github.com/containerd/errdefs/pkg v0.3.0 // indirect
@@ -180,12 +180,12 @@ require (
180180
github.com/couchbase/goprotostellar v1.0.2 // indirect
181181
github.com/couchbaselabs/gocbconnstr/v2 v2.0.0-20240607131231-fb385523de28 // indirect
182182
github.com/cpuguy83/dockercfg v0.3.2 // indirect
183-
github.com/cyphar/filepath-securejoin v0.3.6 // indirect
183+
github.com/cyphar/filepath-securejoin v0.4.1 // indirect
184184
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
185185
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 // indirect
186186
github.com/distribution/reference v0.6.0 // indirect
187187
github.com/dlclark/regexp2 v1.11.0 // indirect
188-
github.com/docker/cli v28.2.2+incompatible // indirect
188+
github.com/docker/cli v29.3.1+incompatible // indirect
189189
github.com/docker/distribution v2.8.3+incompatible // indirect
190190
github.com/docker/docker-credential-helpers v0.9.3 // indirect
191191
github.com/docker/go-connections v0.5.0 // indirect
@@ -199,17 +199,16 @@ require (
199199
github.com/fsnotify/fsnotify v1.6.0 // indirect
200200
github.com/go-asn1-ber/asn1-ber v1.5.8-0.20250403174932-29230038a667 // indirect
201201
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
202-
github.com/go-git/go-billy/v5 v5.6.2 // indirect
203-
github.com/go-jose/go-jose/v4 v4.1.3 // indirect
202+
github.com/go-git/go-billy/v5 v5.8.0 // indirect
203+
github.com/go-jose/go-jose/v4 v4.1.4 // indirect
204204
github.com/go-logr/stdr v1.2.2 // indirect
205205
github.com/go-ole/go-ole v1.2.6 // indirect
206206
github.com/goccy/go-json v0.10.3 // indirect
207207
github.com/gofrs/flock v0.12.1 // indirect
208-
github.com/gogo/protobuf v1.3.2 // indirect
209208
github.com/golang-jwt/jwt/v4 v4.5.2 // indirect
210209
github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 // indirect
211210
github.com/golang-sql/sqlexp v0.1.0 // indirect
212-
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
211+
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect
213212
github.com/golang/snappy v1.0.0 // indirect
214213
github.com/google/go-github/v72 v72.0.0 // indirect
215214
github.com/google/go-querystring v1.2.0 // indirect
@@ -276,7 +275,7 @@ require (
276275
github.com/shoenig/go-m1cpu v0.1.6 // indirect
277276
github.com/shurcooL/graphql v0.0.0-20230722043721-ed46e5a46466 // indirect
278277
github.com/sirupsen/logrus v1.9.3 // indirect
279-
github.com/skeema/knownhosts v1.3.0 // indirect
278+
github.com/skeema/knownhosts v1.3.1 // indirect
280279
github.com/sorairolake/lzip-go v0.3.5 // indirect
281280
github.com/spiffe/go-spiffe/v2 v2.6.0 // indirect
282281
github.com/stretchr/objx v0.5.2 // indirect
@@ -285,7 +284,7 @@ require (
285284
github.com/tklauser/go-sysconf v0.3.12 // indirect
286285
github.com/tklauser/numcpus v0.6.1 // indirect
287286
github.com/trufflesecurity/touchfile v0.1.1 // indirect
288-
github.com/ulikunitz/xz v0.5.12 // indirect
287+
github.com/ulikunitz/xz v0.5.15 // indirect
289288
github.com/vbatts/tar-split v0.12.1 // indirect
290289
github.com/wasilibs/wazero-helpers v0.0.0-20240620070341-3dff1577cd52 // indirect
291290
github.com/xanzy/ssh-agent v0.3.3 // indirect
@@ -303,16 +302,16 @@ require (
303302
go.opentelemetry.io/contrib/detectors/gcp v1.39.0 // indirect
304303
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.62.0 // indirect
305304
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 // indirect
306-
go.opentelemetry.io/otel v1.39.0 // indirect
305+
go.opentelemetry.io/otel v1.43.0 // indirect
307306
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 // indirect
308-
go.opentelemetry.io/otel/metric v1.39.0 // indirect
309-
go.opentelemetry.io/otel/sdk v1.39.0 // indirect
310-
go.opentelemetry.io/otel/sdk/metric v1.39.0 // indirect
311-
go.opentelemetry.io/otel/trace v1.39.0 // indirect
307+
go.opentelemetry.io/otel/metric v1.43.0 // indirect
308+
go.opentelemetry.io/otel/sdk v1.43.0 // indirect
309+
go.opentelemetry.io/otel/sdk/metric v1.43.0 // indirect
310+
go.opentelemetry.io/otel/trace v1.43.0 // indirect
312311
go.uber.org/multierr v1.11.0 // indirect
313312
go4.org v0.0.0-20230225012048-214862532bf5 // indirect
314313
golang.org/x/mod v0.30.0 // indirect
315-
golang.org/x/sys v0.39.0 // indirect
314+
golang.org/x/sys v0.42.0 // indirect
316315
golang.org/x/term v0.38.0 // indirect
317316
google.golang.org/genproto v0.0.0-20251202230838-ff82c1b0f217 // indirect
318317
google.golang.org/genproto/googleapis/api v0.0.0-20251202230838-ff82c1b0f217 // indirect

0 commit comments

Comments
 (0)