jeremylong / DependencyCheck

OWASP dependency-check is a software composition analysis utility that detects publicly disclosed vulnerabilities in application dependencies.
https://owasp.org/www-project-dependency-check/
Apache License 2.0
5.93k stars 1.21k forks source link

override central.content.url and analyzer.central.retry.count #6636

Open tadlakha9 opened 2 weeks ago

tadlakha9 commented 2 weeks ago

Is there any way we can override the central.content.url and analyzer.central.retry.count variables.

Didn't find these variables in https://jeremylong.github.io/DependencyCheck/dependency-check-gradle/configuration-aggregate.html

jeremylong commented 2 weeks ago

You should be able to override them with -Danalyzer.central.retry.count=1.

jeremylong commented 2 weeks ago

not sure you can actually use a different central.content.url though... You may have to use the nexus analyzer instead.

tadlakha9 commented 2 weeks ago

we would like to point to 'https://repo1.maven.org/maven2/' instead of default 'https://search.maven.org/' while executing the dependencyCheckAggregate task. To use the nexus analyzer it should be pro version right?

jeremylong commented 2 weeks ago

Not sure if https://repo1.maven.org/maven2/ has the same API endpoints as search.maven.org. Regarding nexus - I'm not sure, I didn't right the integration and I haven't tested it. it might work with the free version.

tadlakha9 commented 1 week ago

i have tried updating the repository url from 'https://search.maven.org/' to 'https://repo1.maven.org/maven2/' while executing the dependencyCheckAggregate task as dependencyCheckAggregate -Dcentral.content.url=http://testing but still it is reaching the https://search.maven.org/, any other way to update the repository url.

aikebah commented 4 days ago

@tadlakha9 The central.content.url is the base URL for the central search API to deliver content pointed to by a file path as obtained from central search search-by-sha API. It should not be exchanged for the base URL for maven central repository itself.