Skip to content

Conversation

@Alex-1089
Copy link
Contributor

@Alex-1089 Alex-1089 commented Aug 8, 2025

Removed duplicate version from purl in md output

Summary by CodeRabbit

  • New Features

    • Introduced a new subcommand to inspect Dependency Track project violations, with output available in Markdown and JSON formats.
    • Enhanced CLI with more modular and consistent subcommands for inspection tasks, including improved Dependency Track integration.
  • Bug Fixes

    • Resolved issues with folder filtering for fingerprinting and scanning.
    • Fixed a bug with purl formatting in Dependency Track output.
  • Refactor

    • Renamed several inspect subcommands for clarity.
    • Improved argument validation, error handling, and file initialization for CLI commands.
  • Documentation

    • Updated changelog to reflect new releases and features.

agustingroh and others added 30 commits July 28, 2025 12:28
@Alex-1089 Alex-1089 requested a review from eeisegn August 8, 2025 14:05
@coderabbitai
Copy link

coderabbitai bot commented Aug 8, 2025

Walkthrough

This update revises the CLI interface for inspection commands, particularly reorganizing and extending the inspect subcommands with new Dependency Track project violation inspection and improved argument validation. The changelog and version string are updated, and Dependency Track Markdown output formatting is corrected to handle PURL and version display accurately.

Changes

Cohort / File(s) Change Summary
Changelog and Version Update
CHANGELOG.md, src/scanoss/__init__.py
Updated changelog to document versions 1.31.0 and 1.31.1, including new features, bug fixes, and command renaming. Bumped version string from 1.30.0 to 1.31.1 in __init__.py.
CLI Refactor and Extension
src/scanoss/cli.py
Refactored CLI argument parsing and command handling for inspect subcommands, introducing hierarchical subparsers for raw and Dependency Track inspections. Added new subcommands, argument validation, improved error handling, and consistent output initialization. Updated Dependency Track export logic to match new argument structure. Enhanced help and input validation throughout.
Dependency Track Output Formatting
src/scanoss/inspection/dependency_track/project_violation.py
Improved Markdown summary generation for Dependency Track project violations by refining how the component PURL and version are displayed, preventing duplication or incorrect formatting.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant CLI
    participant RawInspect
    participant DTInspect
    participant DTExport

    User->>CLI: scanoss inspect [raw|dependency-track] [subcommand] [args]
    alt Raw inspection
        CLI->>RawInspect: Validate args, initialize output, run inspection
        RawInspect-->>CLI: Return status code
    else Dependency Track inspection
        CLI->>DTInspect: Validate DT args, initialize output, run inspection
        DTInspect-->>CLI: Return status code
    end
    User->>CLI: scanoss export dt [args]
    CLI->>DTExport: Validate args, upload SBOM
    DTExport-->>CLI: Return status code
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~30 minutes

Possibly related PRs

Suggested labels

bug

Suggested reviewers

  • agustingroh

Poem

A bunny hopped through CLI fields anew,
With subcommands fresh and arguments true.
Dependency Track now clearer to see,
Markdown and JSON as neat as can be.
The version hops up, the changelog grows—
In the warren of code, improvement shows!
🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 29933a3 and 81fd5ad.

📒 Files selected for processing (1)
  • src/scanoss/inspection/dependency_track/project_violation.py (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/scanoss/inspection/dependency_track/project_violation.py
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/dep-track-inspection

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions
Copy link

github-actions bot commented Aug 8, 2025

SCANOSS SCAN Completed 🚀

  • Detected components: 1
  • Undeclared components: 0
  • Declared components: 1
  • Detected files: 83
  • Detected files undeclared: 0
  • Detected files declared: 83
  • Licenses detected: 1
  • Licenses detected with copyleft: 0
  • Policies: ✅ 1 pass (1 total)

View more details on SCANOSS Action Summary

@Alex-1089 Alex-1089 merged commit 16b743f into main Aug 8, 2025
6 checks passed
@Alex-1089 Alex-1089 deleted the feat/dep-track-inspection branch August 8, 2025 14:20
@coderabbitai coderabbitai bot mentioned this pull request Aug 26, 2025
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.

4 participants