Repository navigation
fix: backport Go and dependency security fixes to production - #161
Open
dustin-decker wants to merge 2 commits into
Open
dustin-decker wants to merge 2 commits into
dustin-decker wants to merge 2 commits into
Conversation
The snapshot test only checked that the policy set evaluates. The engine also decodes every rule in data as a list of violations, so a package-level value such as `allowed := ["a"]` passed the test while making every message fail to decode. Call evaluate with an empty input so the test covers decoding too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 51a2007. Configure here.
| if err != nil { | ||
| t.Fatal(err) | ||
| } | ||
| if err := eng.evaluate(context.Background(), map[string]interface{}{}); err != nil { |
There was a problem hiding this comment.
Test can hang without alert consumer
Medium Severity
TestProductionPoliciesCompile now calls evaluate with a non-cancellable context and no Alert consumer. evaluate blocks on the unbuffered results channel whenever a policy produces a violation, so any production rule that matches empty input will hang the test until the Go test timeout.
Reviewed by Cursor Bugbot for commit 51a2007. Configure here.
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.


SYNOPSIS
Backport Go 1.26.10 and fixed dependencies onto the exact deployed revision, 69f3ab6.
PURPOSE
Production's binary was built with Go 1.26.5 and has reachable dependency advisories. Current main uses OPA v1 and rejects production's Rego v0 policies, so this hotfix preserves the deployed application code and Rego v0 parsing.
DESCRIPTION
Pin both setup-go workflows and go.mod to Go 1.26.10. Upgrade x/net to v0.60.0 for GO-2026-6603, GO-2026-6610, GO-2026-6611, GO-2026-6612, and GO-2026-6617. Upgrade OPA to the first fixed v0 release, v0.68.0 (GO-2024-3141), gRPC to v1.83.2 (GO-2026-6061, GO-2026-6348, and GO-2026-6443), and OpenTelemetry SDK to v1.45.0 (GO-2026-6505 and GO-2026-6616). gRPC requires protobuf v1.36.11, which also fixes GO-2024-2611. Other module changes follow these requirements.
Add an opt-in test that loads an external production policy snapshot through the engine. It requires cloud-sql-connect.rego, evaluates the compiled rules with an empty input, and decodes the results the same way the engine does for each message. A package-level value such as
allowed := ["a"]therefore fails the test, because the engine cannot decode it as a list of violations. Production policy contents remain outside this public repository.NOTES
GOTOOLCHAIN=go1.26.10 LOGWARDEN_POLICY_TEST_DIR=/tmp/logwarden-go-evidence/warden-policies/gcp go test ./...passes. OPA v0.68.0 passes all 57 tests in the current warden production policy snapshot. Both Linux release architectures build withCGO_ENABLED=0and report go1.26.10.GOTOOLCHAIN=go1.26.10 govulncheck ./...reports zero called and zero imported-package vulnerabilities, with two unused module advisories.v*tag from release/69f3ab6. The tag-triggered release.yml cannot build from this branch: it installs the latest GoReleaser, and GoReleaser v2 rejects its--rm-distflag. It also publishes only to GHCR, not the production registry. Build the production image manually.Note
Cursor Bugbot is generating a summary for commit 51a2007. Configure here.