Skip to content

CM-68446: Render unmaintained package detections in SCA output - #523

Merged
omer-roth merged 16 commits into
cycodehq:mainfrom
AradTraub:CM-68446-unmaintained-package-cli-scan
Aug 30, 2026
Merged

CM-68446: Render unmaintained package detections in SCA output#523
omer-roth merged 16 commits into
cycodehq:mainfrom
AradTraub:CM-68446-unmaintained-package-cli-scan

Conversation

@AradTraub

@AradTraub AradTraub commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

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.

  • Dedicated Unmaintained Packages table with an OSSF Score column in place of CVE / Upgrade / License.
  • Detail card gains the score and a link to the scorecard report.
  • Package health is read from the nested ossf detection detail (ossf.score, ossf.scorecard_report_url); the flat ossf_scorecard_score field 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-packages value; it was reverted once the gate moved to the policy, so this PR is rendering only.

Testing

  • ruff check + ruff format --check clean.
  • 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.
  • Verified end to end against a local backend: a CLI SCA scan on a tenant with the policy enabled prints the Unmaintained Packages table with a score of 1.5.

@claude claude 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.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

Comment thread cycode/cli/printers/tables/sca_table_printer.py Outdated
Comment thread cycode/cli/apps/scan/scan_parameters.py Outdated
@AradTraub AradTraub closed this Aug 25, 2026
@AradTraub AradTraub changed the title CM-68446: Add the unmaintained-packages SCA scan option CM-68446: Render unmaintained package detections in SCA output Aug 25, 2026
@AradTraub AradTraub reopened this Aug 27, 2026
AradTraub and others added 2 commits August 27, 2026 12:03
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
AradTraub force-pushed the CM-68446-unmaintained-package-cli-scan branch from 1e259ba to 2284682 Compare August 27, 2026 11:21
Comment thread cycode/cli/printers/tables/sca_table_printer.py Outdated
Comment thread cycode/cli/printers/rich_printer.py Outdated
Comment thread cycode/cli/printers/text_printer.py Outdated

@omer-roth omer-roth left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Added some comments

AradTraub and others added 3 commits August 30, 2026 11:01
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
omer-roth merged commit 435afef into cycodehq:main Aug 30, 2026
26 checks passed
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