-
Notifications
You must be signed in to change notification settings - Fork 8
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
BUG: SBOM import does not trigger scan of packages #121
Comments
@ghsa-retrieval Could you confirm that the ScanCode.io integration is properly configured on your DejaCode instance?
You need to update the |
@tdruez Yes, it shows both "Configured" and "Available" with a green checkmark. The
Makes sense, that was just a bit unexpected when configuring it through the UI. |
@ghsa-retrieval Thanks for the details. My hunch is that the problem may be located in the async task that is responsible for submitting the scan requests. |
@tdruez Unfortunately no errors are being reported. It looks like DejaCode thinks it has successfully submitted a job, but the ScanCode.io log does not indicate that it is receiving anything nor that it runs into errors. Do you have any other ideas where I should look? |
@ghsa-retrieval Thaks for the log, that's helpful. We can see that the task
My guess is that none of your packages have a Some Download URL could be generated from Package URL using the purl2url library but only a few package types are supported. As a side note, the UI should be improved to warn you about the lack of Dowload URL instead of displaying a success message. |
It seems that you're right, the imported packages from the SBOM only have the "Package URL" and "Inferred URL" populated, but not "Download URL". The SBOM that was uploaded has a
Shouldn't that be working though? Where does DejaCode expect the URL to come from? |
@ghsa-retrieval Unfortunately the CycloneDX does not include a clear field to store download URL for SBOM "components". In ScanCode.io/DejaCode the cdxgen seems to be using the same properties approach with the It would be interesting to have the list of properties generated by cdxgen to implement a mapping for importing those value during the CycloneDX ScanCode.io resolution. |
@tdruez There does not appear to be any documentation as far as I'm aware. The properties can be found in https://github.com/CycloneDX/cdxgen/blob/4a27933ee55914afecbd465ba4ca9a1da62a9cc1/utils.js#L818 being added through Wouldn't it make more sense to derive the URL from the PURL though? I thought that was already uniquely identifying assuming that the PURL is for a package manager such as maven, npm, pypi and so on. That would be a general solution rather then trying to parse the custom properties of a particular SBOM generation tool. Any solution is very much appreciated though! |
Maybe, but in the context of loading an SBOM, generating data that is not present in the SBOM may not always be wanted.
I think in the very short term, we can add support for the |
That is a valid point. The suggested approach would ensure that only information already present in the SBOM would be used.
That would be great! |
@ghsa-retrieval Support for You can update your ScanCode.io instance (no changes on the DejaCode side) and try again the "Load Packages from SBOMs" + "Scan all packages of this product post-import" Keep in mind that only the packages that end up with a value for the |
@tdruez Works like a charm. |
@ghsa-retrieval re:
There is code:
So there are many ways and what we need likely here is likely an explicit action to call the PurlDB to "enrich" an SBOM with these URLs... or do this in ScanCode.io.... a little design needed. #45 |
@pombredanne that is what I suspected. From an outside perspective it would make sense to me if this feature would be in ScanCode.io, given that we already analyze the SBOM and try to do the same for underlying packages there. |
Note progress on deriving a download URL from a PURL when adding a package: #131 |
Describe the bug
On a self-hosted instance of DejaCode, it appears that the current main branch of DejaCode does not scan individual packages after loading the SBOM. This feature seems to work on the public demo instance.
Tested with:
To Reproduce
Configure dataspace:
Steps to reproduce the behavior:
Additional information which may or may not be relevant:
Expected behavior
After loading the packages through the
load_sbom
pipeline in ScanCode.io, each individual package should be analyzed with ascan_single_package
pipeline and the results added to the respective packages in DejaCode.Screenshots
No screenshots, as error is that actions are not happening
Context (OS, Browser, Device, etc.):
Firefox
The text was updated successfully, but these errors were encountered: