GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — CM-72593: Surface malicious package detections in SCA scan output by AradTraub · Pull Request #545 · cycodehq/cycode-cli

Conversation

@AradTraub

@AradTraub AradTraub commented Sep 14, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Renders the "Malicious package found" SCA policy (1fe6d83a-19de-48a2-a5ba-a80fe648489b) in scan output, and adds the scan option needed for the backend to run the detector at all.

Mirrors CM-68446 (unmaintained packages), which is the template for every file here.

Changes

File Change
consts.py MALICIOUS_PACKAGE_POLICY_ID
cli_types.py ScaScanTypeOption.MALICIOUS_PACKAGES
scan_command.py malicious-packages added to the --sca-scan default set
scan_parameters.py malicious_packages wire parameter
sca_policy_details.py Advisory + Remediation rows (remediation from the policy's remediation_guidelines), registered in _DETAILS_BY_POLICY
sca_table_printer.py Advisory column, Malicious Packages title
README.md option docs

text_printer and rich_printer both consume _DETAILS_BY_POLICY, so they need no changes.

Why the scan option is required

ScaScanDetectorBase.ShouldRunDetector runs a detector only when no [ScaScanDetector] option is mentioned, or when that detector's own option is explicitly true. The CLI always sends package_vulnerabilities / license_compliance / maintainability, so the "no opinion" path is already closed — without malicious_packages the detector never runs. The , False) default when the option is deselected is deliberate for the same reason.

Deliberate omission: no GHSA row

The ticket asks for a "GHSA- ID (if present)". That data does not exist: threat-service's packages/batch projects only the cluster's primary id (MAL- → CVE- → GHSA-), so there is exactly one threat_id to render. A GHSA row would always be empty.

Verification

Verified end to end against a live backend — cycode scan -t sca --sca-scan malicious-packages on a fixture containing [email protected]:

Package flatmap-stream was identified as malicious.    Violation 1 of 1
  Severity     ❗ CRITICAL
  Advisory     MAL-2025-20690
  Remediation  This package has been identified as malicious. Remove it from your dependencies.

102 unit tests pass (tests/cli/printers, tests/cli/commands/scan).

🤖 Generated with Claude Code

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@AradTraub
AradTraub requested review from avishaiamiel and omer-roth as code owners September 14, 2026 12:06
@AradTraub
AradTraub force-pushed the CM-72593-malicious-package-cli-output branch 2 times, most recently from aede77e to c34997c Compare November 1, 2026 09:06
omer-roth
omer-roth reviewed Nov 1, 2026
View reviewed changes

@omer-roth omer-roth left a comment

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Reviewed for DRY / KISS / YAGNI. Scope and approach look good; comments below are about duplication and test overlap, none blocking except the remediation one, which also resolves the "Known nit" in the description.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread cycode/cli/printers/utils/sca_policy_details.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread tests/cli/printers/test_sca_table_printer.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread tests/cli/commands/scan/test_scan_parameters.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread tests/cli/printers/test_text_printer.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread cycode/cli/printers/tables/sca_table_printer.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@omer-roth

omer-roth commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator

@AradTraub thanks, the follow-up commit covers the review. I resolved the threads. Can you rebase on main once more? It's 1 commit behind (#576, gitpython bump). Then CI should go green and this is ready to approve.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

AradTraub and others added 3 commits November 1, 2026 12:01
@AradTraub @claude
CM-72593: Surface malicious package detections in SCA scan output
fc5e4d2
Co-Authored-By: Claude Opus 5 <[email protected]>
@AradTraub @claude
CM-72593: Retrigger CI
7e7c053
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@AradTraub @claude
CM-72593: Render policy remediation guidelines and trim overlapping t…
82f6eaa
…ests

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@AradTraub
AradTraub force-pushed the CM-72593-malicious-package-cli-output branch from 0c76a81 to 82f6eaa Compare November 1, 2026 10:01
omer-roth
omer-roth approved these changes Nov 1, 2026
View reviewed changes
@omer-roth
omer-roth merged commit b5066a0 into cycodehq:main Nov 1, 2026
23 checks passed

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@omer-roth omer-roth omer-roth approved these changes
@avishaiamiel avishaiamiel Awaiting requested review from avishaiamiel avishaiamiel is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@AradTraub @omer-roth
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.