fix: bump dependencies to clear all known CVEs - #402
Merged
Merged
Conversation
Complete the work started in #401, which left the tree unbuildable: - e2e/go.mod was never re-tidied after the client/server bumps, so the module failed with "updates to go.mod needed" and still pinned the vulnerable go-git v5.12.0, circl v1.3.7 and ProtonMail/go-crypto v1.0.0. - release/ was untouched, but replaces ../client, so its go 1.23.2 directive broke against client's bumped one. Its go-jose is now v4.1.4. All four modules now declare `go 1.25.0` (the minimum x/tools and otel/trace require) plus `toolchain go1.25.12`. The split matters: the toolchain line is what closes the stdlib advisories, which have no Go 1.24 backport, and actions/setup-go prefers it over the go directive. Keeping the language version at 1.25.0 leaves room for tools built with older toolchains. Raising the go directive past 1.24 makes golangci-lint v1.64.2 unusable — its prebuilt binary is compiled with go1.24 and cannot parse go1.25 packages at all, so --go=1.24 does not help. Move to v2.11.0, the newest release that common-ci's installer can fetch and that is built with a new enough Go. Its config format is incompatible with the v1 config shared via werf/common-ci, so vendor a local .golangci.yml translated by hand rather than via `golangci-lint migrate`, whose output silently adds exclusion presets that would weaken linting. The gofumpt bundled in v2.11.0 rewrites naked returns to explicit ones, which is also what CODESTYLE.md asks for. Also bump the builder image and drop lint.yaml's hardcoded Go version in favour of go-version-file, so it tracks go.mod like every other workflow. Remaining, both unfixable upstream: GO-2026-5932 (x/crypto/openpgp is unmaintained with no fixed version; needs pkg/pgp migrated to ProtonMail/go-crypto) and the docker daemon-side advisories, which #401 already sidestepped by deleting the unused RemoveImagesByLabels. Signed-off-by: Aleksei Igrychev <aleksei.igrychev@palark.com>
golang.org/x/crypto/openpgp is unmaintained upstream and carries GO-2026-5932, which has no fixed version — the only way out is a different implementation. pkg/pgp was the sole importer in the server graph, so switching it removes the package entirely and brings all four modules to zero known vulnerabilities. This adds no new dependency: ProtonMail/go-crypto was already in the graph as an indirect requirement of go-git, so the server now has one OpenPGP implementation instead of two. The fork is API-compatible except for CheckArmoredDetachedSignature, which takes a trailing *packet.Config. Defaults line up with the old behaviour: an unset Config.Algorithm means RSA and V6Keys defaults to false, so generated keys stay v4. Because trdl stores PGP signing keys in Vault and verifies user-supplied trusted public keys, the risk here is backward compatibility rather than compilation. Add fixtures generated by the previous x/crypto code — an armored private key, its public key, a binary detached signature, and an armored signature produced by the real gpg binary from that same key — and assert the new code still parses and verifies all of them. Verified the test fails when a fixture is tampered with. Note that these fixtures were checked with the gpg CLI, and the existing suite continues to prove the other direction: a key generated and signed by ProtonMail/go-crypto is accepted by gpg --verify. Signed-off-by: Aleksei Igrychev <aleksei.igrychev@palark.com>
Drop the ai_tests build tag from the pgp compatibility test. The tag kept it out of `task server:test:unit`, so the one check guarding backward compatibility of stored PGP keys never ran in CI — which defeats its purpose. Ignore /release/bin and /release/dist. The former is where `task release:build:dev:all` lands its binaries, and I already committed 40MB of them by accident twice while working on this branch. /release/dist is the same omission for `release:build:dist`, next to the /client/dist and /server/dist entries that were already there. Signed-off-by: Aleksei Igrychev <aleksei.igrychev@palark.com>
`task format` and `task lint` disagreed: common-ci pins gofumpt v0.7.0 via deps:install:gofumpt, while golangci-lint v2.11.0 bundles gofumpt v0.11.0. Formatting the tree then linting it produced errors, because the newer gofumpt rewrites naked returns and the older one does not. There is no variable to override the pinned version, so the desync cannot be fixed from this repo as long as the two come from different binaries. Adopt nelm's arrangement, which makes the desync impossible by construction: each module now owns its `format` and `lint` tasks and both call the same golangci-lint binary — `run --fix` to format, `run` to lint. gci and gofumpt come from the `formatters` section of .golangci.yml, so there is exactly one source of formatting behaviour. The common-ci include stays for prettier, but namespaced as `ci:` rather than flattened, since a flattened include cannot be partially overridden — Task rejects duplicate task names outright. Dropping the per-module `paths` vars is not a behaviour change: they only fed the standalone gci and gofumpt invocations. golangci-lint takes ./... and honours the exclusion paths already declared in .golangci.yml. No module set `mode: cgo`, so lint was already a single CGO_ENABLED=0 pass and still is. Signed-off-by: Aleksei Igrychev <aleksei.igrychev@palark.com>
This was referenced Jul 29, 2026
Closed
alexey-igrychev
added a commit
that referenced
this pull request
Jul 29, 2026
#402 raised every module to `go 1.25.0` and moved trdl-builder.Dockerfile to golang:1.25.12-bookworm, but it was merged before the commit that repinned the manifests. So main now asks for go >= 1.25.0 while release builds still run inside a builder image built from golang:1.24 — a release cut from main would fail with "module requires go >= 1.25.0", which is the same breakage #402 set out to fix. Repin all three module manifests to registry.werf.io/trdl/builder:0c698d2, published from the branch of #402. Its tree is identical to the squashed commit on main, so the image is exactly what landed. Signed-off-by: Aleksei Igrychev <aleksei.igrychev@palark.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Supersedes #401, whose commit is included here as the first commit.
Brings all four modules to zero known vulnerabilities.
Why #401 needed follow-up
It left two of four modules unbuildable:
e2e/go.modwas never re-tidied after the client/server bumps, so the module failed outright withupdates to go.mod neededand still pinned the vulnerablego-git v5.12.0,circl v1.3.7andProtonMail/go-crypto v1.0.0.release/was untouched, but itreplaces../client, so itsgo 1.23.2directive broke against client's bumped one.Neither of the two CI jobs that build e2e could have passed.
Go version
All four modules now declare
go 1.25.0plustoolchain go1.25.12. The split matters:1.25.0is the minimumx/toolsandotel/tracerequire, and keeping the language version there leaves room for tools built with older toolchains.toolchainline is what actually closes the stdlib advisories. They have no Go 1.24 backport — the affected ranges are[0, 1.25.9/10/11/12)— andactions/setup-gopreferstoolchainovergowhen readinggo-version-file.lint.yamlno longer hardcodesgo-version: "1.24"; it readsgo-version-filelike every other workflow. The builder image moves togolang:1.25.12-bookworm.golangci-lint v1 -> v2
Raising the go directive past 1.24 makes golangci-lint v1.64.2 unusable: its prebuilt binary is compiled with go1.24 and cannot parse
go 1.25packages at all, so it fails intypecheckand--go=1.24does not help. v2.11.0 is the newest release that common-ci's installer can actually fetch (v2.12.x fails checksum verification) and that is built with a new enough Go.v2's config format is incompatible with the v1 config shared via werf/common-ci, so a local
.golangci.ymlis vendored. It was translated by hand rather than withgolangci-lint migrate, whose output silently adds exclusion presets (comments,common-false-positives,legacy,std-error-handling) that would have weakened linting.The gofumpt bundled in v2.11.0 rewrites naked returns to explicit ones, which is what CODESTYLE.md asks for anyway — hence the small diffs in
client/pkg/repo,client/pkg/utilandserver/pkg/git.openpgp migration
golang.org/x/crypto/openpgpis unmaintained upstream and carries GO-2026-5932, which has no fixed version — the only way out is a different implementation.server/pkg/pgpwas the sole importer in the server graph, so switching it removes the package entirely.This adds no new dependency:
ProtonMail/go-cryptowas already in the graph as an indirect requirement of go-git, so the server now has one OpenPGP implementation instead of two. The fork is API-compatible except forCheckArmoredDetachedSignature, which takes a trailing*packet.Config. Defaults line up — an unsetConfig.Algorithmmeans RSA andV6Keysdefaults to false, so generated keys stay v4.Since trdl stores PGP signing keys in Vault and verifies user-supplied trusted public keys, the real risk here is backward compatibility rather than compilation.
server/pkg/pgp/testdata/holds fixtures generated by the previous x/crypto code — an armored private key, its public key, a binary detached signature, and an armored signature produced by the realgpgbinary from that same key — andopenpgp_compat_ai_test.goasserts the new code still parses and verifies all of them. The test was confirmed to fail when a fixture is tampered with. The pre-existing suite proves the other direction: a key generated and signed by ProtonMail/go-crypto is accepted bygpg --verify.format/lint no longer disagree
task formatandtask lintcontradicted each other: common-ci pins gofumpt v0.7.0, while golangci-lint v2.11.0 bundles v0.11.0. Following nelm, each module now owns itsformatandlinttasks and both call the same golangci-lint binary —run --fixto format,runto lint — so gci and gofumpt come from one place and cannot drift apart. The common-ci include stays for prettier, namespaced asci:rather than flattened, because Task rejects duplicate task names and a flattened include cannot be partially overridden.Still unfixable
Nothing remains in govulncheck. For the record, the docker daemon-side advisories (GO-2026-5668 / 4887 / 4883, fixed only in the pre-release
moby/moby/v2) went away because #401 deletedRemoveImagesByLabels, which was dead code and the last thing pullingdocker/dockerinto the server.Verified locally
task build:dev:all·task lint(0 issues in all four modules) ·task server:test:unit(9/9 suites) ·task client:test:unit· builder image builds and reportsgo1.25.12·govulncheckon all four modules.Not runnable on macOS, so CI is the first real check: the e2e
elf_signingsuite behind//go:build linux && amd64 && cgo.