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

Add supplier/license info for cargo and pip #479

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

sebasgomez238
Copy link
Collaborator

@sebasgomez238 sebasgomez238 commented Jan 12, 2024

Requires #476 to be merged for it's changes in ServiceCollectionExtensions as well as v4.0.12 of component-detection to be released

Edit: all requirements have been met.

@@ -78,6 +78,7 @@ public abstract class ComponentDetectionBaseWalker
// Enable SPDX22 and ConanLock detector which is disabled by default.
cliArgumentBuilder.AddDetectorArg("SPDX22SBOM", "EnableIfDefaultOff");
cliArgumentBuilder.AddDetectorArg("ConanLock", "EnableIfDefaultOff");
cliArgumentBuilder.AddDetectorArg("RustCli", "EnableIfDefaultOff");
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

RustCli detector is not enabled by default. Must be enabled manually here.

@@ -29,6 +29,8 @@ protected override IEnumerable<ScannedComponent> FilterScannedComponents(ScanRes
return result
.ComponentsFound
.Where(component => !(component.Component is SpdxComponent)) // We exclude detected SBOMs from packages section and reference them as an ExternalReference
.GroupBy(component => component.Component.Id)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Now that both the RustCrateDetector and the RustCli detector are both running we may have duplicates. In this scenario we always want to take the one that came from the RustCli as this one contains Author and Supplier information.

@sebasgomez238 sebasgomez238 marked this pull request as ready for review January 24, 2024 14:22
@sebasgomez238 sebasgomez238 requested a review from a team as a code owner January 24, 2024 14:22
@codecov-commenter
Copy link

codecov-commenter commented Feb 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 59.85%. Comparing base (ad9b9c0) to head (f06b4e3).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #479      +/-   ##
==========================================
+ Coverage   59.82%   59.85%   +0.03%     
==========================================
  Files         268      268              
  Lines        8249     8256       +7     
  Branches      972      973       +1     
==========================================
+ Hits         4935     4942       +7     
  Misses       2886     2886              
  Partials      428      428              

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

Copy link
Member

@sfoslund sfoslund left a comment

Choose a reason for hiding this comment

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

It would be nice to add some test coverage around these changes, but otherwise looks good.

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