sonatype-nexus-community / bach

Dependency vulnerability auditor for PHP
Apache License 2.0
14 stars 15 forks source link

OSS Index Package Limit (128 max) #15

Closed RicoFactset closed 3 years ago

RicoFactset commented 3 years ago

Hello,

OSS Index does not allow scanning more than 128 packages at a time.

Expected behavior Sends 128 packages at a time Error Message {"code":400,"message":"Request for more than 128 components"}

Output: GuzzleHttp\Exception\ClientException : Client error: POST https://ossindex.sonatype.org/api/v3/component-report resulted in a 400 Bad Request response: {"code":400,"message":"Request for more than 128 components"}

Same issue is fixed here: https://github.com/digitalcoyote/NuGetDefense/issues/37

Thanks!

DarthHater commented 3 years ago

@RicoFactset that is correct, what we tend to do (and I believe we've done in newer versions), is batch requests if there are more than 128 components.

PlesnikJakub commented 3 years ago

Hi @DarthHater this seems to be still an issue. Is there anything that can be done?

DarthHater commented 3 years ago

@PlesnikJakub https://github.com/sonatype-nexus-community/bach/pull/20 sorry! Been having fun writing too much Java lately, if you can give that a shot, it SHOULD fix things for you.

PlesnikJakub commented 3 years ago

@DarthHater I tested it on my project with 140+ dependencies and it solved the issue 👍 good job and thank you 😊

DarthHater commented 3 years ago

No problem! Glad it helped @PlesnikJakub , in the nearish future we should have some more cool work to do on Bach.