Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds an entry point for the sbom-tool use the ScanCommand class. #936

Merged
merged 5 commits into from Dec 19, 2023
Merged

Adds an entry point for the sbom-tool use the ScanCommand class. #936

merged 5 commits into from Dec 19, 2023

Conversation

sebasgomez238
Copy link
Contributor

@sebasgomez238 sebasgomez238 commented Dec 15, 2023

Currently the ScanCommand class returns an int. In the sbom-tool we rely on the ScanResult object which forced us to go a step below and use the ScanExecution itself. This is causing us to miss out on a few features such as the ability to write a ScanManifest file (microsoft/sbom-tool#452).

This PR adds an extra method to the ScanCommand class that returns a ScanResult object instead of an int.

Let me know if there is more suitable name the current name is "ExecuteAsync" the method I added is "ExecuteScanAsync"

@sebasgomez238 sebasgomez238 requested a review from a team as a code owner December 15, 2023 16:55
@sebasgomez238 sebasgomez238 requested a review from cobya December 15, 2023 16:55
Copy link

codecov bot commented Dec 15, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (d4ca976) 74.9% compared to head (af562e8) 74.9%.

Additional details and impacted files
@@          Coverage Diff          @@
##            main    #936   +/-   ##
=====================================
  Coverage   74.9%   74.9%           
=====================================
  Files        235     235           
  Lines       9996   10002    +6     
  Branches     981     981           
=====================================
+ Hits        7488    7494    +6     
  Misses      2234    2234           
  Partials     274     274           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@cobya cobya left a comment

Choose a reason for hiding this comment

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

Looks good to me, pending a look from Fern on why Rust is failing on the ubuntu build I will merge.

@sebasgomez238
Copy link
Contributor Author

Thanks! @cobya I added unit tests since I saw the codecov comments.

@cobya cobya added the type:feature Feature (new functionality) label Dec 19, 2023
@cobya cobya merged commit ce76f5d into microsoft:main Dec 19, 2023
23 checks passed
tarun06 pushed a commit to tarun06/component-detection that referenced this pull request Jan 12, 2024
…rosoft#936)

* Add Author/License to LinuxComponent

* Add method to scan that returns a ScanResult Object

* Revert "Add Author/License to LinuxComponent"

This reverts commit 643dc09.

* Add unit tests

---------

Co-authored-by: Sebastian Gomez <segomez@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature Feature (new functionality)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants