include checking for maven scope COMPILE_PLUS_RUNTIME on artifact omission predicate

This commit is contained in:
Josh Cain
2017-06-02 10:57:38 -05:00
parent 69f39d4dfe
commit ed09242cb7

View File

@@ -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;
}