Visitar URL original
chore: refresh Go dependencies and fix CI by kbrennan-oai · Pull Request #355 · gitpod-io/leeway · GitHub
Skip to content

chore: refresh Go dependencies and fix CI - #355

Merged
kylos101 merged 5 commits into
mainfrom
kb/leeway-deps
Nov 11, 2026
Merged

kylos101 merged 5 commits into
mainfrom
kb/leeway-deps

Conversation

@kbrennan-oai

@kbrennan-oai kbrennan-oai commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Description

Raise the go.mod language/minimum toolchain version from Go 1.24.1 to 1.26.0 and refresh selected direct/transitive dependencies and checksums. CI and release builds use Go 1.27.3, configured by the merged prerequisite PR #354.

Update the lint job to set up that Go toolchain and run golangci-lint v2.15.0 through the v9 action. Fix lint findings with behavior-preserving cleanup: explicitly discard previously ignored errors, simplify redundant expressions/selectors, and remove an unreachable nil-cache check. Preserve existing signing, output flushing, close-error, and environment-default behavior.

Keep containerd on the 1.x line, updating v1.7.27 to v1.7.36. Retain stereoscope v0.1.2, runc v1.1.10, and the original runc library-based rootless jail configuration.

Keep the isolated flaky-test fix: use io.Discard in command flag tests instead of wrapping file descriptor 0 in os.File, whose finalizers can close stdin or a reused descriptor during workspace discovery.

Validation

Using Go 1.27.3:

CGO_ENABLED=0 go build -o /tmp/leeway .
go test ./... -skip '^TestSignCache_DryRunMode$'
golangci-lint run --timeout 5m
go mod tidy

The static build, local test suite above, and module tidy passed; golangci-lint v2.15.0 reports zero issues. TestSignCache_DryRunMode was skipped locally because Yarn was unavailable. GitHub CI passed the full suite, including that test.

Grype findings (November 5, 2026)

On November 5, scanned the retained dependency set in the source tree and a static binary with Grype v0.121.1 and that day's vulnerability database:

grype dir:. --fail-on critical
grype /tmp/leeway --fail-on critical

Both raw scans reported two critical matches against containerd v1.7.36 and exited with status 2. No ignores, suppressions, or VEX filters were applied.

The scanner records conflict with the affected-version ranges published by containerd:

Both upstream advisories identify github.com/containerd/containerd/v2 as the affected Go package and list only >=2.1.0,<2.1.9, >=2.2.0,<2.2.5, and >=2.3.0,<2.3.2 as affected. Containerd v1.7.36 is outside those published ranges.

The corresponding Go record for GO-2026-5064 and Go record for GO-2026-5338 were marked UNREVIEWED at the time of the scan and additionally marked all versions of the containerd v1 module as affected. Based on the upstream advisories, the two v1.7.36 matches appear to be false positives in those Go records. Lower-severity findings also remain.

CI results

All GitHub Actions checks passed on 91b8e9edf376d251699ff0f128532ce00ce0d103:

Relates to

@kbrennan-oai
kbrennan-oai changed the base branch from kb/go127-release to main November 5, 2026 17:26
@kbrennan-oai kbrennan-oai changed the title chore: refresh Go dependencies fix: refresh Go dependencies and resolve critical containerd findings Nov 5, 2026
Retain the original runc library-based jail configuration unchanged.
Make the deferred temporary-directory cleanup's error handling explicit
for the current linter.
Set up the configured Go toolchain for linting and pin golangci-lint
v2.15.0 with the v9 action. Resolve existing lint findings, explicitly
handle cleanup errors, and propagate output close/flush errors where
applicable. Preserve signing dry-run behavior while detecting a disabled
remote cache.

Keep containerd on v1.7.36 and retain the original jail configuration.
Use io.Discard instead of os.NewFile(0, os.DevNull). Finalizers on the
latter wrappers can close stdin or a reused file descriptor during
workspace discovery, causing intermittent bad-file-descriptor failures.
@kbrennan-oai kbrennan-oai changed the title fix: refresh Go dependencies and resolve critical containerd findings chore: refresh Go dependencies and fix CI Nov 5, 2026
Remove the broader behavior changes introduced with the lint cleanup:
ignore close and flush errors as before, restore deferred template
flushing even on errors, preserve environment-default return behavior,
and remove the new disabled-cache validation.

Remove the original unreachable nil-cache check rather than changing
its runtime semantics. Retain Go/dependency updates, mechanical lint
fixes, and the isolated flaky-test fix.

Local lint and Go tests pass; the Yarn-dependent dry-run test remains
skipped locally per the environment constraint.
@kylos101
kylos101 marked this pull request as ready for review November 11, 2026 15:33
@kylos101

Copy link
Copy Markdown
Contributor

@atugarev-oai for 👀 , I am preparing a new version of leeway, and will test in a branch build first.

@kylos101
kylos101 merged commit cf32547 into main Nov 11, 2026
7 checks passed
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.

2 participants