Skip to content

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

Closed
AradTraub wants to merge 5 commits into
cycodehq:mainfrom
AradTraub:CM-68446-unmaintained-package-cli-scan
Closed

CM-68446: Render unmaintained package detections in SCA output#523
AradTraub wants to merge 5 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.

Jira

CM-68446

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

table.add_cell(LICENSE_COLUMN, detection_details.get('license'))

ossf_score = get_ossf_score(detection_details)
table.add_cell(OSSF_SCORE_COLUMN, 'N/A' if ossf_score is None else str(ossf_score))

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.

Is this the overall ossf score or the maintained check's score?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The overall score.

'report': ctx.obj.get('report'),
'package_vulnerabilities': ctx.obj.get('package-vulnerabilities'),
'license_compliance': ctx.obj.get('license-compliance'),
'maintainability': ctx.obj.get('unmaintained-packages'),

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.

overall might be worth checking:
What happens if the policy is off and the user specified they want to scan unmaintained-packages specifically?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

they will get 0 detections. as the policy is close and this the maintainability will be align, there will be no detection found as the rest of the detection will be filtered out and maintainability will skipped due to the fact that the policy is close

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