Skip to content

Commit 27f35ce

Browse files
committed
docs(advisor): Clarify an OSV API peculiarity
While it is recommended to specify the PURL [1], it must not be specified together with the ecosystem [2]. As the ecosystem is the OSV-native way to identify packages, and OSV seems to have some data problems with PURLs [3], add a reminder not to use PURLs in queries. [1]: https://ossf.github.io/osv-schema/#affectedpackage-field [2]: google/osv.dev#1443 [3]: google/osv.dev#1234 Signed-off-by: Sebastian Schuberth <[email protected]>
1 parent bc0d706 commit 27f35ce

File tree

1 file changed

+1
-0
lines changed
  • advisor/src/main/kotlin/advisors

1 file changed

+1
-0
lines changed

advisor/src/main/kotlin/advisors/Osv.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ private fun createRequest(pkg: Package): VulnerabilitiesForPackageRequest? {
154154

155155
if (name.isNotBlank() && pkg.id.version.isNotBlank() && !ecosystem.isNullOrBlank()) {
156156
return VulnerabilitiesForPackageRequest(
157+
// Do not specify the purl here as it is mutually exclusive with the ecosystem.
157158
pkg = org.ossreviewtoolkit.clients.osv.Package(
158159
name = name,
159160
ecosystem = ecosystem

0 commit comments

Comments
 (0)