Skip to content

Commit 111f276

Browse files
committed
Bump toolchain/x-net for CVEs and pin the gitleaks download
- Set 'toolchain go1.26.3' and bump golang.org/x/net to v0.55.0, clearing all govulncheck-reachable advisories (x509 name-constraint bypass, TLS KeyUpdate DoS, HTTP/2 loop, et al.). - Pin the gitleaks release download with a SHA-256 checksum before install. The standalone gosec scan stays advisory (-no-fail, full SARIF upload). Its enforcing counterpart is golangci-lint (make lint), which honors the repo's per-site //nolint:gosec suppressions; the standalone binary can't read those, and globally excluding rule IDs (e.g. G101/G204) to make it hard-fail would blind release scans to new hard-coded creds / unsafe exec.
1 parent 02eb78d commit 111f276

3 files changed

Lines changed: 25 additions & 7 deletions

File tree

.github/workflows/security.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,16 @@ jobs:
2626
persist-credentials: false
2727

2828
- name: Install gitleaks
29+
env:
30+
GITLEAKS_VERSION: 8.21.2
31+
# SHA-256 of gitleaks_8.21.2_linux_x64.tar.gz (from the release
32+
# checksums.txt). Pinning the artifact hash prevents a tampered or
33+
# swapped release tarball from running in CI (supply-chain guard).
34+
GITLEAKS_SHA256: 5bc41815076e6ed6ef8fbecc9d9b75bcae31f39029ceb55da08086315316e3ba
2935
run: |
30-
curl -sSfL https://github.com/gitleaks/gitleaks/releases/download/v8.21.2/gitleaks_8.21.2_linux_x64.tar.gz | tar -xz
36+
curl -sSfL -o gitleaks.tar.gz "https://github.com/gitleaks/gitleaks/releases/download/v${GITLEAKS_VERSION}/gitleaks_${GITLEAKS_VERSION}_linux_x64.tar.gz"
37+
echo "${GITLEAKS_SHA256} gitleaks.tar.gz" | sha256sum -c -
38+
tar -xzf gitleaks.tar.gz gitleaks
3139
sudo mv gitleaks /usr/local/bin/
3240
3341
- name: Run gitleaks
@@ -85,6 +93,14 @@ jobs:
8593
- name: Run gosec
8694
run: |
8795
go install github.com/securego/gosec/v2/cmd/gosec@v2.25.0
96+
# Advisory scan: full SARIF uploaded to the Security tab for visibility
97+
# (-no-fail). The enforcing gosec gate is golangci-lint (make lint),
98+
# which honors the repo's //nolint:gosec suppressions per-site; the
99+
# standalone binary can't read those, so making it hard-fail would
100+
# require either re-annotating every accepted site or excluding rule
101+
# IDs globally — and a global exclude (e.g. G101/G204) would create
102+
# real blind spots for new hard-coded creds / unsafe exec, including in
103+
# release scans. Keep the full advisory scan instead.
88104
gosec -tags dev -no-fail -fmt sarif -out gosec-results.sarif ./...
89105
90106
- name: Upload gosec scan results to GitHub Security tab

go.mod

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ module github.com/basecamp/basecamp-cli
22

33
go 1.26
44

5+
toolchain go1.26.3
6+
57
require (
68
charm.land/bubbles/v2 v2.1.0
79
charm.land/bubbletea/v2 v2.0.6
@@ -72,7 +74,7 @@ require (
7274
github.com/rogpeppe/go-internal v1.14.1 // indirect
7375
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
7476
github.com/yuin/goldmark-emoji v1.0.6 // indirect
75-
golang.org/x/net v0.48.0 // indirect
77+
golang.org/x/net v0.55.0 // indirect
7678
golang.org/x/sync v0.20.0 // indirect
77-
golang.org/x/term v0.38.0 // indirect
79+
golang.org/x/term v0.43.0 // indirect
7880
)

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,16 +165,16 @@ golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM
165165
golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo=
166166
golang.org/x/mod v0.36.0 h1:JJjpVx6myfUsUdAzZuOSTTmRE0PfZeNWzzvKrP7amb4=
167167
golang.org/x/mod v0.36.0/go.mod h1:moc6ELqsWcOw5Ef3xVprK5ul/MvtVvkIXLziUOICjUQ=
168-
golang.org/x/net v0.48.0 h1:zyQRTTrjc33Lhh0fBgT/H3oZq9WuvRR5gPC70xpDiQU=
169-
golang.org/x/net v0.48.0/go.mod h1:+ndRgGjkh8FGtu1w1FGbEC31if4VrNVMuKTgcAAnQRY=
168+
golang.org/x/net v0.55.0 h1:bcvxaJn3e1U6InsFWt1JUq1aSjnRxLzT2rtD2KfkDF8=
169+
golang.org/x/net v0.55.0/go.mod h1:L5U2KuzuOe1lY7Z+aWVIKK6qEeJXnXV9yzGA+WCHJww=
170170
golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4=
171171
golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=
172172
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
173173
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
174174
golang.org/x/sys v0.45.0 h1:dO4czNzziLiiXplLQgBCEpCvXQ3dnkn0SdaZSYdQ+FY=
175175
golang.org/x/sys v0.45.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
176-
golang.org/x/term v0.38.0 h1:PQ5pkm/rLO6HnxFR7N2lJHOZX6Kez5Y1gDSJla6jo7Q=
177-
golang.org/x/term v0.38.0/go.mod h1:bSEAKrOT1W+VSu9TSCMtoGEOUcKxOKgl3LE5QEF/xVg=
176+
golang.org/x/term v0.43.0 h1:S4RLU2sB31O/NCl+zFN9Aru9A/Cq2aqKpTZJ6B+DwT4=
177+
golang.org/x/term v0.43.0/go.mod h1:lrhlHNdQJHO+1qVYiHfFKVuVioJIheAc3fBSMFYEIsk=
178178
golang.org/x/text v0.37.0 h1:Cqjiwd9eSg8e0QAkyCaQTNHFIIzWtidPahFWR83rTrc=
179179
golang.org/x/text v0.37.0/go.mod h1:a5sjxXGs9hsn/AJVwuElvCAo9v8QYLzvavO5z2PiM38=
180180
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=

0 commit comments

Comments
 (0)