-
-
Notifications
You must be signed in to change notification settings - Fork 596
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 Packagist security advisories parser #798
Comments
DT should use OSS Index (if enabled) for the analysis of PHP Composer components. I said should because I've never actually tested it. But the logic is that if a component has a PURL, the component will be analyzed with OSS Index. But agree, this would be a nice enhancement to have. Let's target all the PHP enhancements for 4.1. |
@stevespringett thank you for the information, it is much appreciated. I will check if the OSS Index is used for Composer components. |
@Szasza @stevespringett It is, my org already had a few findings pop up in the past. It would be interesting to know though if OSS Index already includes the advisories from packagist. |
Good. Yes, regardless, I think having more analyzers is a good thing as it gives the community choice and reduces the reliance on a single source. |
Moving this out from 4.1. Will target a future release. One issue I see with supporting Packagist advisories is they all lack severity. If the advisory contains a CVE, the severity can be retrieved from that, but if the advisory doesn't contain a CVE, severity will be unknown. |
really love to see this feature. example: currently seeing a lot of issues with https://packagist.org/packages/typo3/cms-core Security API: https://packagist.org/api/security-advisories/?packages[]=typo3/cms-core |
Hello @Szasza , you wrote
#796 was merged. Did I understand you right, that the code for this very issue was created, but the PR is not opened, yet? appreciate your work very much. If SBOM generated by cyclonedx-php-composer needs to include additional information, feel free to reach out to me or open an issue for cyclonedx-php-composer, |
@stevespringett wrote in #798 (comment)
Questions:
example for CVE in API response |
DT supports severity of critical, high, medium, low, info, and unassigned. Since Packagist advisories do not support severity, then for advisories with a CVE the severity can be derived from the CVE. For advisories without a CVE, the severity will be unassigned. Unassigned severity has the same risk score as high severity. The UI will not be impacted. It already supports unassigned severity. |
Hello @stevespringett, any updates on this feature? |
Any updates on this? |
feature request: Strip background & examples:
conclusion: the implementation should strip the |
The "affectedVersions" returned from that API is not a list of versions but a "composer constraint". |
The
Current Behaviour
section assumes that #796 is already merged.Current Behaviour:
When a BOM is parsed which contains Composer-type packages, there is no check if there is a reported vulnerability for the given package versions in Packagist.
Proposed Behaviour:
As per https://packagist.org/apidoc#list-security-advisories (bottom of the page) Packagist exposes an API endpoint which could be used to check if there are any security advisories for the packages in the BOM. This API could be utilised similarly to the NPM audit advisories which is already implemented. The difference to NPM is that specific package names need to be used with Packagist, so the security advisories would only be pulled when a BOM/dependency is added.
Additional note:
This is already being implemented but a PR will only be opened when #796 actually gets merged.
The text was updated successfully, but these errors were encountered: