diff --git a/model/src/main/kotlin/config/PackageConfiguration.kt b/model/src/main/kotlin/config/PackageConfiguration.kt index 6758f3296553e..3b2b8d47bcee6 100644 --- a/model/src/main/kotlin/config/PackageConfiguration.kt +++ b/model/src/main/kotlin/config/PackageConfiguration.kt @@ -77,6 +77,7 @@ data class PackageConfiguration( is UnknownProvenance -> false is ArtifactProvenance -> sourceArtifactUrl != null && sourceArtifactUrl == provenance.sourceArtifact.url is RepositoryProvenance -> vcs != null && vcs.matches(provenance) + else -> false } } } diff --git a/model/src/main/kotlin/licenses/LicenseInfoResolver.kt b/model/src/main/kotlin/licenses/LicenseInfoResolver.kt index 0c42161e86c1f..01a9fe69b3c2c 100644 --- a/model/src/main/kotlin/licenses/LicenseInfoResolver.kt +++ b/model/src/main/kotlin/licenses/LicenseInfoResolver.kt @@ -265,6 +265,7 @@ class LicenseInfoResolver( when (provenance) { is UnknownProvenance -> return@forEach is RemoteProvenance -> if (!archiver.unarchive(archiveDir, provenance)) return@forEach + else -> return@forEach } val directory = (provenance as? RepositoryProvenance)?.vcsInfo?.path.orEmpty() diff --git a/model/src/main/kotlin/utils/PurlExtensions.kt b/model/src/main/kotlin/utils/PurlExtensions.kt index 52468d0309cd0..14d486f3819d6 100644 --- a/model/src/main/kotlin/utils/PurlExtensions.kt +++ b/model/src/main/kotlin/utils/PurlExtensions.kt @@ -106,6 +106,8 @@ fun Provenance.toPurlExtras(): PurlExtras = } is UnknownProvenance -> PurlExtras() + + else -> PurlExtras() } /** diff --git a/scanner/src/main/kotlin/provenance/NestedProvenanceResolver.kt b/scanner/src/main/kotlin/provenance/NestedProvenanceResolver.kt index 29e537376bc6d..5fc2e9f6a60aa 100644 --- a/scanner/src/main/kotlin/provenance/NestedProvenanceResolver.kt +++ b/scanner/src/main/kotlin/provenance/NestedProvenanceResolver.kt @@ -50,6 +50,7 @@ class DefaultNestedProvenanceResolver( return when (provenance) { is ArtifactProvenance -> NestedProvenance(root = provenance, subRepositories = emptyMap()) is RepositoryProvenance -> resolveNestedRepository(provenance) + else -> NestedProvenance(root = provenance, subRepositories = emptyMap()) } }