-
Notifications
You must be signed in to change notification settings - Fork 187
Include only directly referenced packages #1237
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
base: main
Are you sure you want to change the base?
Conversation
|
This PR changes files in the API project. Does it change any of the API interfaces in any way? Please note that this includes the following types of changes:
Because any of these changes can potentially break a downstream consumer with customized interface implementations, these changes need to be treated as breaking changes. Please do one of the following: Option 1 - Publish this as a breaking change
Option 2 - Refactor the changes to be non-breaking
|
1 similar comment
|
This PR changes files in the API project. Does it change any of the API interfaces in any way? Please note that this includes the following types of changes:
Because any of these changes can potentially break a downstream consumer with customized interface implementations, these changes need to be treated as breaking changes. Please do one of the following: Option 1 - Publish this as a breaking change
Option 2 - Refactor the changes to be non-breaking
|
|
/azp run |
1 similar comment
|
/azp run |
KalleOlaviNiemitalo
left a comment
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.
we are making the default behavior to just include directly referenced packages
That being the "default" behavior, is there a way to choose a different behavior?
| var scanResult = await componentDetector.ScanAsync(scanSettings) as DefaultGraphScanResult; | ||
|
|
||
| if (scanResult.ResultCode != ProcessingResultCode.Success) |
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.
Because this does bot tolerate scanResult being null, you should just cast rather than use as; so that if the type does not match, you get an InvalidCastException that shows which type it is, rather than NullReferenceException.
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.
I've added a null check, so this should no longer be an issue
| } | ||
|
|
||
| uniqueComponents = uniqueComponents | ||
| .Where(component => explicitComponentIds.Contains(component.Component.Id)); |
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.
Not sure how this will behave if the uniqueComponents are SbomComponents. Perhaps this logic should move inside PackagesWalker.FilterScannedComponents?
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.
Since FilterScannedComponents is an abstract method, I'd have to duplicate the logic amongst PackagesWalker and SbomComponentsWalker, so I chose to add the code here instead, to avoid repetition. I did refactor into a separate method which is called after the FilterScannedComponents though, so now we are getting explicit components after filtering for SpdxComponents.
|
/azp run |
|
/azp run |
…/microsoft/sbom-tool into ppandrate_topLevelPackageDepTree
|
This PR changes files in the API project. Does it change any of the API interfaces in any way? Please note that this includes the following types of changes:
Because any of these changes can potentially break a downstream consumer with customized interface implementations, these changes need to be treated as breaking changes. Please do one of the following: Option 1 - Publish this as a breaking change
Option 2 - Refactor the changes to be non-breaking
|
|
This PR changes files in the API project. Does it change any of the API interfaces in any way? Please note that this includes the following types of changes:
Because any of these changes can potentially break a downstream consumer with customized interface implementations, these changes need to be treated as breaking changes. Please do one of the following: Option 1 - Publish this as a breaking change
Option 2 - Refactor the changes to be non-breaking
|
|
This PR changes files in the API project. Does it change any of the API interfaces in any way? Please note that this includes the following types of changes:
Because any of these changes can potentially break a downstream consumer with customized interface implementations, these changes need to be treated as breaking changes. Please do one of the following: Option 1 - Publish this as a breaking change
Option 2 - Refactor the changes to be non-breaking
|
|
This PR changes files in the API project. Does it change any of the API interfaces in any way? Please note that this includes the following types of changes:
Because any of these changes can potentially break a downstream consumer with customized interface implementations, these changes need to be treated as breaking changes. Please do one of the following: Option 1 - Publish this as a breaking change
Option 2 - Refactor the changes to be non-breaking
|
Compliance requirements have led us to simplify the package dependency tree that is reported in SBOMs. There were issues in the original implementation of how transitive package dependencies were being represented in SBOMs, therefore we are making the default behavior to just include directly referenced packages. This means that the packages and relationships sections of SBOMs will be impacted, and will now only represent explicitly referenced packages.
In summary the goals are: