Skip to content

fix(deps): remediate Go and x/crypto vulnerabilities - #838

Open
plural-copilot[bot] wants to merge 1 commit into
mainfrom
agent/fix-go-cve-1762900000000
Open

plural-copilot[bot] wants to merge 1 commit into
mainfrom
agent/fix-go-cve-1762900000000

Conversation

@plural-copilot

Copy link
Copy Markdown
Contributor

Summary

  • update the plural CLI module directive and Docker builder/final images from Go 1.27.3 to Go 1.27.4
  • update golang.org/x/crypto from v0.58.0 to v0.58.1-0.20261009181718-2f1f834330b2 and regenerate Go module checksums
  • retain legacy OpenPGP compatibility required by the CLI dependency graph while keeping the primary x/crypto module at its fixed version

Security rationale

This remediates GO-2026-5932 in golang.org/x/crypto and CVE-2026-97054 / GO-2026-6859 in the Go standard library. The plural CLI is embedded in the deployed ghcr.io/pluralsh/console:sha-ec64d95 image, so rebuilding Console with this CLI revision addresses the scanner findings without changing the Console repository or GitOps.

Validation

  • go mod verify passed with golang:1.27.4-alpine3.24
  • bounded Docker builds identified the removed legacy OpenPGP package and drove the compatibility update; the final full CLI build was not completed within the dependency-download time bound.

@plural-copilot plural-copilot Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This PR was generated by the codex Plural Agent Runtime. Here's some useful information you might want to know to evaluate the ai's perfomance:

Name Details
💬 Prompt Create a focused remediation PR for fixable Go vulnerabilities in the plural CLI that is embedded in the deployed ghcr.io/pluralsh/console:sha-ec64d95 image. Do not modify pluralsh/console or GitOps. Return the exact changed files, resolved versions, validation, PR URL, and head branch....
🔗 Run history View run history

@greptile-apps

greptile-apps Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The changes reach CLI builds and the binary image used by CLI deployments.

Fix the missing Docker copy before merging so the CLI image can build.

Findings

  1. P1 Docker builds lack OpenPGP ▶
  2. P2 Copied code lacks its license ▶

Summary

Updates Go to 1.27.4 and selects a patched golang.org/x/crypto version.

  • The CLI now builds on Go 1.27.4 with refreshed Go dependencies.
  • The CLI keeps legacy OpenPGP imports through a local copy.

Reviews (1) · Last reviewed commit: "fix(deps): remediate Go and crypto vulne..." · Reviewed by Greptile

Comment thread go.mod
sigs.k8s.io/structured-merge-diff/v6 v6.4.2 // indirect
)

replace golang.org/x/crypto/openpgp => ./third_party/openpgp

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Docker builds lack OpenPGP

The new local replacement points to third_party/openpgp/, but Dockerfile never copies that directory into the builder. It copies only go.mod and go.sum before go mod download, then only cmd/ and pkg/. Go cannot read third_party/openpgp/go.mod, so the CLI image cannot build. Copy the local module into the builder before downloading dependencies.

Comment on lines +1 to +3
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Copied code lacks its license

The copied OpenPGP files refer to a BSD-style LICENSE, but the new directory does not include it. The root LICENSE contains only Plural's MIT license, leaving anyone redistributing this source without the upstream terms and disclaimer. Include the upstream license alongside the copied code.

}
prefix := make([]byte, blockSize+2)

block.Encrypt(x.fre, x.fre)
prefix[i] = randData[i] ^ x.fre[i]
}

block.Encrypt(x.fre, prefix[:blockSize])
prefixCopy := make([]byte, len(prefix))
copy(prefixCopy, prefix)

block.Encrypt(x.fre, x.fre)
prefixCopy[i] ^= x.fre[i]
}

block.Encrypt(x.fre, prefix[:blockSize])
}

if resync {
block.Encrypt(x.fre, prefix[2:])
iv := make([]byte, cipherFunc.blockSize())
c := cipher.NewCFBEncrypter(cipherFunc.new(keyEncryptingKey), iv)
encryptedCipherAndKey := make([]byte, keySize+1)
c.XORKeyStream(encryptedCipherAndKey, buf[1:])
c := cipher.NewCFBEncrypter(cipherFunc.new(keyEncryptingKey), iv)
encryptedCipherAndKey := make([]byte, keySize+1)
c.XORKeyStream(encryptedCipherAndKey, buf[1:])
c.XORKeyStream(encryptedCipherAndKey[1:], sessionKey)
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