Skip to content

chore(ci): accept GO-2026-5932 (unmaintained x/crypto/openpgp)#28

Closed
rodrigodh wants to merge 1 commit into
developfrom
ci/trivyignore-openpgp-go-2026-5932
Closed

chore(ci): accept GO-2026-5932 (unmaintained x/crypto/openpgp)#28
rodrigodh wants to merge 1 commit into
developfrom
ci/trivyignore-openpgp-go-2026-5932

Conversation

@rodrigodh

Copy link
Copy Markdown
Contributor

Why

The Fiber v3 migration PR (#27) is blocked by the security gate on a single Trivy finding:

Severity Library Vulnerability Installed Fixed
UNKNOWN golang.org/x/crypto GO-2026-5932 v0.53.0 N/A

golang.org/x/crypto is a new transitive dependency introduced by Fiber v3 (gofiber/fiber/v3 → golang.org/x/crypto/acme/autocert) — it is not in the current go.mod on develop.

This cannot be fixed by updating the dependency: GO-2026-5932 flags golang.org/x/crypto/openpgp as unmaintained, an advisory with no fixed version — it applies to every release, including the latest v0.54.0.

What

Adds a root .trivyignore accepting GO-2026-5932 as a reviewed risk, because:

  • The openpgp package is not imported anywhere in this module — only acme/autocert is reachable, so the unmaintained-package risk is not exercised.
  • There is no remediation available (no fixed version; the edge is controlled upstream by Fiber).

Scope / impact

Merging this to develop unblocks #27 and pre-empts the identical failure in every downstream Fiber v3 PR in the wave (lib-commons, lib-auth, lib-license-go, lib-systemplane, plugin-access-manager — all pull x/crypto via Fiber v3).

⚠️ Security review requested: this is an accepted-risk suppression, not a version bump. Please confirm the openpgp-not-imported justification before merge.

After merge, re-run #27's security check (or merge develop into #27) so its merge-ref scan picks up the ignore.

Fiber v3 pulls golang.org/x/crypto transitively via acme/autocert. The
Go advisory GO-2026-5932 (openpgp unmaintained) has no fixed version and the
openpgp package is not imported by this module, so it is suppressed via
.trivyignore to unblock the Fiber v3 migration PRs across the wave.

X-Lerian-Ref: 0x1
@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Changes

Security suppression

Layer / File(s) Summary
Add accepted-risk advisory entry
.trivyignore
Adds a suppression for GO-2026-5932 and documents its transitive dependency path and accepted-risk rationale.
✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch ci/trivyignore-openpgp-go-2026-5932

Comment @coderabbitai help to get the list of available commands.

@lerian-studio lerian-studio added the size/XS PR changes < 50 lines label Jul 14, 2026
@lerian-studio

Copy link
Copy Markdown
Contributor

🔍 PR Validation Summary

✅ PR Mergeable — no blocking failures

Check Status Blocking
Source Branch ✅ success yes
PR Title ✅ success yes
PR Description ✅ success yes
PR Size ✅ success no
Auto Labels ✅ success no
PR Metadata ✅ success no

🔍 View workflow run

@lerian-studio

Copy link
Copy Markdown
Contributor

📊 Unit Test Coverage Report: lib-observability

Metric Value
Overall Coverage 85.7% ✅ PASS
Threshold 80%

Coverage by Package

Package Coverage
github.com/LerianStudio/lib-observability/assert 97.9%
github.com/LerianStudio/lib-observability/constants 83.3%
github.com/LerianStudio/lib-observability/log 94.9%
github.com/LerianStudio/lib-observability/metrics 91.4%
github.com/LerianStudio/lib-observability/middleware 76.9%
github.com/LerianStudio/lib-observability/redaction 95.8%
github.com/LerianStudio/lib-observability/runtime 80.4%
github.com/LerianStudio/lib-observability/tracing 84.8%
github.com/LerianStudio/lib-observability/zap 96.0%
github.com/LerianStudio/lib-observability 91.5%

Generated by Go PR Analysis workflow

@lerian-studio

Copy link
Copy Markdown
Contributor

🔒 Security Scan Results — lib-observability

🚫 PR Blocked — 1 blocking finding

Stage Status Blocking?
Filesystem Scan ⚠️ 1 finding 🔴 Yes
Docker Image Scan ➖ Skipped
Docker Hub Health Score ➖ Skipped
Pre-release Version Check ✅ Clean

Trivy

Filesystem Scan

Severity Library Vulnerability Installed Fixed Title
🟡 MEDIUM github.com/gofiber/fiber/v2 CVE-2026-45045 v2.52.13 N/A GoFiber Vulnerable to X-Real-IP Spoofing via Header.Add()...

Pre-release Version Check

✅ No unstable version pins found.


🔍 View full scan logs

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.trivyignore:
- Line 9: Scope the GO-2026-5932 suppression in .trivyignore so it only applies
to the intended openpgp dependency, and add an expiration via a Trivy YAML rule
or an equivalent CI check that verifies openpgp remains unreachable. Do not
retain an unbounded ID-only ignore entry.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: de56b206-44bb-4302-be64-6352571f0f1a

📥 Commits

Reviewing files that changed from the base of the PR and between f38d000 and 7a7db7f.

📒 Files selected for processing (1)
  • .trivyignore

Comment thread .trivyignore
# - The openpgp package is NOT imported by this module (only acme/autocert is
# reachable), so the unmaintained-package risk is not exercised here.
# - Accepted until an upstream (fiber/x-crypto) change removes the transitive edge.
GO-2026-5932

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== Files of interest ==\n'
git ls-files | rg '(^|/)(\.trivyignore|go\.mod|go\.sum|trivy.*yml|trivy.*yaml|\.github/workflows/.*)$' || true

printf '\n== .trivyignore ==\n'
if [ -f .trivyignore ]; then
  cat -n .trivyignore
fi

printf '\n== go.mod ==\n'
if [ -f go.mod ]; then
  cat -n go.mod
fi

printf '\n== Search for openpgp / acme/autocert references ==\n'
rg -n 'openpgp|acme/autocert|GO-2026-5932|trivyignore|trivy' -S .

Repository: LerianStudio/lib-observability

Length of output: 4010


Scope or expire this ignore entry. .trivyignore suppresses GO-2026-5932 by ID only, so a later openpgp dependency would also be hidden. Prefer a scoped Trivy YAML rule with expired_at, or pair this ignore with a CI check that keeps openpgp unreachable.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.trivyignore at line 9, Scope the GO-2026-5932 suppression in .trivyignore
so it only applies to the intended openpgp dependency, and add an expiration via
a Trivy YAML rule or an equivalent CI check that verifies openpgp remains
unreachable. Do not retain an unbounded ID-only ignore entry.

@rodrigodh

Copy link
Copy Markdown
Contributor Author

Closing — wrong vehicle. Based on develop (still Fiber v2), this PR trips CVE-2026-45045 on gofiber/fiber/v2, a real fiber-v2 CVE the migration itself removes; a separate ignore PR off develop can't pass the gate. The GO-2026-5932 suppression has been moved directly onto the Fiber v3 branch (#27), which has no fiber-v2 and only needs that one advisory ignored.

@rodrigodh rodrigodh closed this Jul 14, 2026
@rodrigodh
rodrigodh deleted the ci/trivyignore-openpgp-go-2026-5932 branch July 14, 2026 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS PR changes < 50 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants