Skip to content

Eliminate unused logrus replace, move to Go 1.27 and update dependencies - #30

Open
alexanselmo wants to merge 4 commits into
masterfrom
dep-bump
Open

alexanselmo wants to merge 4 commits into
masterfrom
dep-bump

Conversation

@alexanselmo

@alexanselmo alexanselmo commented Apr 6, 2026 •

Copy link
Copy Markdown

Fix #29

I don't believe the logrus 1.4.2 was being used, the replace line just wasn't removed last time we updated the dependencies. I also moved the module to Go 1.27 and pulled the dependencies up to their latest versions.

Module Before After
go directive 1.20 1.27.0
toolchain none go1.27.4
github.com/sirupsen/logrus 1.9.1 1.10.2
github.com/google/uuid 1.3.0 1.6.0
github.com/gorilla/websocket 1.5.0 1.5.3
golang.org/x/sys (indirect) 0.7.0 0.50.0
actions/checkout v3 v7
actions/setup-go v2 v7

The go line stays at 1.27.0 so modules that import guac aren't pushed onto a newer patch release, and the toolchain line keeps guac's own CI and local builds on 1.27.4. CI reads its Go version from go.mod now instead of ^1.13. logrus 1.10.2 is outside the affected ranges for GHSA-4f99-4q7p-p3gh.

cmd/guac is the example main. Moving off go 1.20 drops the old GODEBUG settings it was built with (tlsmlkem=0, httpmuxgo121=1, panicnil=1, etc) so it runs with Go 1.27's defaults. I don't expect a visible change since its routes are plain paths and its TLS config sets its own curve list. Modules that import guac aren't affected since their own go line sets their defaults.

There's also a separate gofmt commit for config.go, doc.go and tunnel_map.go, whitespace only.

go build, go vet and go test -race pass locally on Go 1.27.4 and on 1.27.0 with GOTOOLCHAIN=local.

🤖 Generated with Claude Code

@alexanselmo
alexanselmo requested a review from mattskipton April 6, 2026 17:08
CI now reads its Go version from go.mod, so it builds with the toolchain
the module declares instead of whatever ^1.13 resolves to.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@alexanselmo alexanselmo changed the title Eliminate unused logrus replace and bump other dependencies Eliminate unused logrus replace, bump Go to 1.27.4 and update dependencies Nov 17, 2026
Comment thread go.mod Outdated
go 1.20

replace github.com/Sirupsen/logrus v1.4.2 => github.com/sirupsen/logrus v1.4.2
go 1.27.4

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking: go 1.27.4 makes 1.27.4 the minimum Go for every module that imports guac. go mod tidy in a consumer raises its own go line to match, so atc-console-prox (go 1.27.0) would move to go 1.27.4 on its next guac bump. From then on, Go 1.27.0–1.27.3 has to download 1.27.4 to build it under GOTOOLCHAIN=auto, and fails outright under GOTOOLCHAIN=local, which the official golang: images set. guac doesn't need anything from 1.27.4 that 1.27.0 lacks, since patch releases only carry fixes.

Use the same split as aws-api and atc-console-prox:

go 1.27.0

toolchain go1.27.4

Go ignores a dependency's toolchain line, so guac's own CI and local builds stay on 1.27.4 without raising the floor for consumers. I think go-version-file: go.mod reads the toolchain line, but it's worth checking the "Set up Go" step on the next run. The description's line about consumers needing 1.27.4 can go too.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switched to go 1.27.0 with toolchain go1.27.4 in 4178cd8 and took the 1.27.4 line out of the description. setup-go v7 reads the toolchain line as long as GOTOOLCHAIN isn't local, and the "Set up Go" step on the 8c9c263 run installed 1.27.4. I also ran the tests with GOTOOLCHAIN=local on 1.27.0 to make sure the floor builds.

Comment thread go.mod Outdated
go 1.20

replace github.com/Sirupsen/logrus v1.4.2 => github.com/sirupsen/logrus v1.4.2
go 1.27.4

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: moving the go line off 1.20 also drops the 27 GODEBUG defaults Go kept for cmd/guac, so that binary's runtime behavior changes. Several touch what it does, for example tlssha1=1, tlsmlkem=0, x509negativeserial=1, httpmuxgo121=1, panicnil=1 and containermaxprocs=0. Run GOTOOLCHAIN=go1.27.4 go list -f '{{.DefaultGODEBUG}}' ./cmd/guac on master for the full list. If cmd/guac is only an example, a line in the description saying so covers it. Modules that import guac aren't affected, since their own go line sets their defaults.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cmd/guac is the example main, and I added a paragraph to the description saying so. I also looked at what it touches. Its routes are plain paths and its TLS config sets its own CurvePreferences, so I don't expect httpmuxgo121 or tlsmlkem to change anything visible there.

@robgaston1

Copy link
Copy Markdown

Non-blocking: config.go, doc.go and tunnel_map.go aren't gofmt-clean (gofmt -l . lists them). In config.go it's extra alignment spaces in the struct fields. It's the same on master, so this PR didn't cause it. gofmt -w . in its own commit fixes it.

alexanselmo and others added 2 commits November 18, 2026 17:13
The go line is the minimum for every module that imports guac, and Go
ignores a dependency's toolchain line. This keeps guac's own builds on
1.27.4 without moving consumers off 1.27.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@alexanselmo alexanselmo changed the title Eliminate unused logrus replace, bump Go to 1.27.4 and update dependencies Eliminate unused logrus replace, move to Go 1.27 and update dependencies Nov 18, 2026
@alexanselmo

Copy link
Copy Markdown
Author

Ran gofmt -w . in its own commit, 8c9c263. It's whitespace only.

Comment thread .github/workflows/go.yml

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: line 26 still runs go get -v -t -d ./.... The 8c9c263 run logs go: -d flag is deprecated. -d=true is a no-op, and go get in CI can tidy go.mod/go.sum in the runner, so an untidy go.mod passes the build and merges unnoticed. Replace it with this, which fails on drift:

    - name: Get dependencies
      run: |
        go mod download
        go mod tidy -diff

Comment thread .github/workflows/go.yml

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: the Gopkg.toml / dep ensure block (lines 27–30) is left over from before modules and never runs. If a Gopkg.toml ever showed up, it would pipe an install script from the archived golang/dep repo's master branch into sh. Delete it while you're in this file.

Comment thread .github/workflows/go.yml

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: Build and Test (lines 33 and 36) only cover ., so cmd/guac is never compiled or vetted, and nothing checks gofmt, which is how config.go, doc.go and tunnel_map.go drifted. All of these pass on this branch today:

    - name: Build
      run: go build -v ./...

    - name: Vet
      run: go vet ./...

    - name: gofmt
      run: test -z "$(gofmt -l .)"

    - name: Test
      run: go test -race -v ./...

@robgaston1 robgaston1 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gave one more pass using Opus just to be real safe. I think we're good, it had some cleanup items I thought you may want to know about. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

new version to avoid two high-severity DoS advisories

2 participants