CM-68446: Render unmaintained package detections in SCA output - #523
Merged
omer-roth merged 16 commits intoAug 30, 2026
Merged
Conversation
omer-roth
reviewed
Aug 25, 2026
omer-roth
reviewed
Aug 25, 2026
The text printer fell through to the license branch for unmaintained package detections, printing a License row instead of the score. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The unmaintained policy decides on the scorecard's Maintained check, so showing the aggregate as the only number was misleading: a package flagged as unmaintained could display a healthy-looking 4.1. The Maintained score now leads and the aggregate stays as context. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
AradTraub
force-pushed
the
CM-68446-unmaintained-package-cli-scan
branch
from
August 27, 2026 11:21
1e259ba to
2284682
Compare
omer-roth
reviewed
Aug 27, 2026
omer-roth
reviewed
Aug 27, 2026
omer-roth
reviewed
Aug 27, 2026
The score was looked up for every SCA detection and pushed at a column that only the unmaintained table has, so vulnerability and license detections paid for a lookup that could never be rendered. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The printers picked their rows from an if/elif chain over has_alert, which is only a guess at the policy and has to grow a branch for every new one. It had already gone wrong once: unmaintained packages have no alert, so they fell to the license branch and rendered an empty License row. Each policy now contributes its own labelled fields from one map that both printers render, and a policy with no entry contributes nothing rather than borrowing another's fields. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The rich printer added a CVEs row to every SCA detection, so unmaintained and license findings - neither of which carries a vulnerability_id - rendered an empty row. The CVE now comes from the policy-keyed details alongside the first patched version, so a policy that has no CVE simply does not show the field. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
omer-roth
approved these changes
Aug 30, 2026
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.
Summary
Renders unmaintained-package findings (OpenSSF Scorecard score <= 2) in local SCA scan output. Until now they arrived with an unrecognised policy id and fell through to a table titled "Unknown" with vulnerability-shaped columns.
ossfdetection detail (ossf.score,ossf.scorecard_report_url); the flatossf_scorecard_scorefield no longer exists.No new CLI flag. Whether the policy runs is decided entirely by the tenant's policy state, resolved server-side in dependency-collector — the CLI neither sends nor needs a scan parameter for it. An earlier revision of this branch added a
--sca-scan unmaintained-packagesvalue; it was reverted once the gate moved to the policy, so this PR is rendering only.Testing
ruff check+ruff format --checkclean.pytest: 999 passed, 1 skipped, including new tests for the printer's title, its exact column set and order, and the score fallback when no scorecard is present.