Skip to content

fix(security): refresh nla-cli Trivy ignore list - #210

Merged
moizpgedge merged 2 commits into
mainfrom
Fix/PLAT-703/Security-Trivy-Triage-security-issues-in-nla-cli-1.0.0
Aug 4, 2026
Merged

moizpgedge merged 2 commits into
mainfrom
Fix/PLAT-703/Security-Trivy-Triage-security-issues-in-nla-cli-1.0.0

Conversation

@moizpgedge

@moizpgedge moizpgedge commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

What this fixes

A security scan of the published command-line tool image flagged 27
High, 32 Medium, and 10 Low warnings.

Rebuilding the tool from the current version, with no code changes,
already fixes every one of these — they were all caused by software
updates that had already happened but hadn't made it into a new build
of this image yet.

What was left

A fresh scan of the rebuilt image shows only 10 minor warnings left:

  • 9 are in small pieces of the base operating system that this tool
    doesn't actually use (no fix is available for these from the vendor
    yet, and none apply here).
  • 1 is an advisory flagging an old, unmaintained piece of an encryption
    library as something people shouldn't use going forward. It's not a
    security bug with a fix — it's a "don't use this anymore" notice.
    Checked the tool's code directly: it only uses a different, unrelated
    part of that same library, never the flagged part.

Each of these is documented with a specific, checkable reason rather
than a generic one.

Results

Scanning the newly built image against the updated list of "checked,
doesn't apply" items shows zero warnings, at every severity level.

What this doesn't do

This doesn't publish a new version of the image — that's a separate
release step. The already-published image is unaffected until that
happens.
https://pgedge.atlassian.net/browse/PLAT-703

Summary by CodeRabbit

  • Chores
    • Updated vulnerability scan exceptions for several packages and components.
    • Added expiration dates, vulnerability details, and usage rationale to the updated entries.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 3035b25d-31e3-4475-9edb-bb13440bbccd

📥 Commits

Reviewing files that changed from the base of the PR and between 1e0d2be and 8ce6044.

📒 Files selected for processing (1)
  • .trivy/nla-cli.trivyignore.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .trivy/nla-cli.trivyignore.yaml

Walkthrough

The Trivy ignore policy now covers vulnerabilities in coreutils, libattr, libgcc, ncurses, pcre2, and golang.org/x/crypto/openpgp. Each entry records applicability, expiration, and CLI reachability details.

Changes

Trivy ignore policy refresh

Layer / File(s) Summary
Update vulnerability ignore entries
.trivy/nla-cli.trivyignore.yaml
Replaces the coreutils sort ignore and adds package-specific ignores for unused commands, libraries, APIs, and the openpgp advisory. Each entry includes vulnerability details, expiration dates, and non-applicability statements.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: tsivaprasad

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the update to the nla-cli Trivy ignore list.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch Fix/PLAT-703/Security-Trivy-Triage-security-issues-in-nla-cli-1.0.0

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@moizpgedge moizpgedge changed the title Security: Trivy triage for nla-cli 1.0.0 (PLAT-703) Security fix: update the command-line tool, close out old warnings Jul 30, 2026

@coderabbitai coderabbitai Bot left a comment

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.

🧹 Nitpick comments (2)
.trivy/nla-cli.trivyignore.yaml (2)

46-56: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

Verify the openpgp exclusion independently of govulncheck.

“0 reachable vulnerabilities” does not by itself prove that golang.org/x/crypto/openpgp is absent; govulncheck narrows known vulnerability reports based on analyzed reachability. Add a dependency/import or SBOM assertion that the CLI excludes openpgp, and verify that the exact scanned PURL is pkg:golang/golang.org/x/crypto@v0.54.0. (pkg.go.dev)

🤖 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 @.trivy/nla-cli.trivyignore.yaml around lines 46 - 56, The GO-2026-5932
ignore statement relies only on govulncheck reachability. Add an independent
dependency/import or SBOM assertion proving the CLI excludes
golang.org/x/crypto/openpgp, and verify that the scanned dependency is exactly
pkg:golang/golang.org/x/crypto@v0.54.0; update the statement with those verified
results.

3-56: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

Add expiration dates to the ignore entries.

These suppressions are permanent because expired_at is omitted. Bound them to a review date so future base-image or dependency updates cannot remain silently ignored after fixes become available. Trivy’s YAML ignore format supports expired_at. (trivy.dev)

🤖 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 @.trivy/nla-cli.trivyignore.yaml around lines 3 - 56, Add an expired_at
review date to every CVE and advisory entry in the ignore configuration,
including the entries for CVE-2026-56391, CVE-2026-56392, CVE-2026-54371,
CVE-2021-46195, CVE-2022-27943, CVE-2023-50495, CVE-2022-41409, and
GO-2026-5932. Use Trivy’s supported date format and choose a bounded future
review date consistently across the suppressions.
🤖 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.

Nitpick comments:
In @.trivy/nla-cli.trivyignore.yaml:
- Around line 46-56: The GO-2026-5932 ignore statement relies only on
govulncheck reachability. Add an independent dependency/import or SBOM assertion
proving the CLI excludes golang.org/x/crypto/openpgp, and verify that the
scanned dependency is exactly pkg:golang/golang.org/x/crypto@v0.54.0; update the
statement with those verified results.
- Around line 3-56: Add an expired_at review date to every CVE and advisory
entry in the ignore configuration, including the entries for CVE-2026-56391,
CVE-2026-56392, CVE-2026-54371, CVE-2021-46195, CVE-2022-27943, CVE-2023-50495,
CVE-2022-41409, and GO-2026-5932. Use Trivy’s supported date format and choose a
bounded future review date consistently across the suppressions.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: e9a76bcd-df63-4b68-8afe-e1c3b2bcce4d

📥 Commits

Reviewing files that changed from the base of the PR and between 11cad0e and 1e0d2be.

📒 Files selected for processing (1)
  • .trivy/nla-cli.trivyignore.yaml

@moizpgedge moizpgedge changed the title Security fix: update the command-line tool, close out old warnings fix(security): refresh nla-cli Trivy ignore list Jul 31, 2026

@tsivaprasad tsivaprasad left a comment

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.

For consistency with #209 (which added purls: scoping and expired_at: expiry to every ignore entry), please add the same to the entries here as well.

vulnerabilities:
# coreutils-single - Present in UBI9 micro base image.
- id: CVE-2025-5278
- id: CVE-2026-56391

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.

For consistency with #209 (which added purls: scoping and expired_at: expiry to every ignore entry), please add the same to the entries here as well.

Rebuilt nla-cli from current source (go.mod already carries the
patched pgx/x/crypto/x/net versions from earlier PLAT-701 work) and
rescanned: all 27 High + 32 Medium + 10 Low findings in the reported
scan resolve, leaving only 10 residual findings in the fresh scan.

The existing ignore file was stale, referencing CVE IDs (coreutils
CVE-2025-5278, glibc CVE-2026-4046/CVE-2026-4437) that don't appear
in the current scan at all -- already resolved by the ubi9-micro
base image's own freshness. Replaced with entries for the 10 findings
actually present: coreutils-single, libattr, libgcc, ncurses, pcre2
(all no-fix-available, none reachable from this statically linked Go
binary), and GO-2026-5932 (x/crypto/openpgp unmaintained-package
advisory -- the CLI only imports x/crypto/bcrypt, confirmed via
govulncheck: 0 reachable vulnerabilities).

Verified: trivy image --ignorefile .trivy/nla-cli.trivyignore.yaml
reports 0 findings at every severity.
Addresses review feedback on #210 (tsivaprasad): for consistency with
#209, scope every entry to its exact package via purls and add an
expired_at date, rather than matching a CVE ID globally across the
scan.

Rebuilt nla-cli fresh from current source, took a raw scan (10
findings across the 8 CVE/advisory IDs already in this file, 0 gaps,
0 orphans), and generated package-scoped purls (bare, unqualified,
consistent with the other trivyignore files in this repo) plus
expired_at: 2026-11-02T00:00:00Z for all 8 entries.

Verified: trivy image --ignorefile .trivy/nla-cli.trivyignore.yaml
reports 0 findings on both scan targets, and a structural check
against ExperimentalModifiedFindings confirms all 10 raw findings are
individually tracked with Status: ignored -- none slipping through on
a broad ID match.
@moizpgedge
moizpgedge force-pushed the Fix/PLAT-703/Security-Trivy-Triage-security-issues-in-nla-cli-1.0.0 branch from 1e0d2be to 8ce6044 Compare August 4, 2026 05:40

@tsivaprasad tsivaprasad left a comment

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.

Awesome...!
Looks good.

@moizpgedge
moizpgedge merged commit 1a9f73a into main Aug 4, 2026
12 checks passed
@dpage
dpage deleted the Fix/PLAT-703/Security-Trivy-Triage-security-issues-in-nla-cli-1.0.0 branch August 17, 2026 10:48
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