mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-01-14 15:53:36 +01:00
include checking for maven scope COMPILE_PLUS_RUNTIME on artifact omission predicate
This commit is contained in:
@@ -19,6 +19,8 @@ package org.owasp.dependencycheck.maven;
|
||||
|
||||
import org.owasp.dependencycheck.utils.Filter;
|
||||
|
||||
import static org.apache.maven.artifact.Artifact.SCOPE_RUNTIME_PLUS_SYSTEM;
|
||||
|
||||
/**
|
||||
* Tests is the artifact should be included in the scan (i.e. is the
|
||||
* dependency in a scope that is being scanned).
|
||||
@@ -55,6 +57,9 @@ public class ArtifactScopeExcluded extends Filter<String> {
|
||||
if (skipRuntimeScope && org.apache.maven.artifact.Artifact.SCOPE_RUNTIME.equals(scope)) {
|
||||
return true;
|
||||
}
|
||||
if (skipRuntimeScope && skipSystemScope && org.apache.maven.artifact.Artifact.SCOPE_COMPILE_PLUS_RUNTIME.equals(SCOPE_RUNTIME_PLUS_SYSTEM)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user