-
-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regex support for scanConfigurations and skipConfigurations #22
Comments
What are these configurations? I looked into documentation in http://jeremylong.github.io/DependencyCheck/dependency-check-gradle/configuration.html but could not find info about what those configurations mean. Can you somehow configure from which path(s) to scan with them? I'm trying to use your OWASP Gradle plugin to scan my NodeJS dependencies but it can not find any dependencies and I can't find how to tell to the plugin where to find the dependencies. |
@roikonen sorry for the extremely delayed response. Dependency-check-gradle uses the gradle dependency management system. There are many built in configurations (test, compile, testRuntime, somethingMadeUpByAnotherPlugin, etc.) each represent a collection of artifacts and their dependencies. The skip configurations allows one to explicitly tell the gradle plugin which set of dependencies to scan. For Node.js my guess is gradle is not managing the dependencies and they are subsequently being managed by another system (likely npm). Take a look at the node security project or the CLI version of dependency-check when 2.0.0 is released (hopefully this weekend). Other enhancements are in the works for the gradle (and Maven) plugin so that it can also scan specific directories for dependencies rather then just the dependencies managed by the build tool. |
@jeremylong Is there a way to skip the sub projects inside a project using skipConfigurations or something? We are using gradle plugin. Thanks. |
@nlassai apply the plugin to the rootProject instead of |
@nlassai did you ever find a way to skip the sub projects? |
Is this enhancement very far down in the backlog?
The ability to just say "Ignore all configurations starting with |
For a multiproject scenario, the fix for #99 worked good (have the ability to skip projects). However a fix for this issue will be what developers will use the most in my opinion. Please let @Thorbear and me @jrodguitar know. |
dependencyCheck {
allprojects {
configurations.all {
if ((it.name.startsWith('kapt')) && !(it.name in skipConfigurations)) {
skipConfigurations << it.name
}
}
}
} |
@nlassai & @jrodguitar though it is not documented, since 5.0.0 there is |
@Vampire
|
Is it necessary to make separate (e.g. |
The solution to the problem is the above comment: #22 (comment) |
Not really, it is just a work-around. |
To make selecting which configurations are being scanned more robust regular expressions should be added to
scanConfigurations
andskipConfigurations
. For backward compatability we should leave the current scan/skip configuration options but I suggest we add:The
scanConfigurations
can be removed from the documentation and a warning about a deprecated property can be issued (same forskipConfigurations
). With the proposed changes the originalskipConfigurations
andscanConfigurations
should be treated as a deprecated short cut toconfigurations { skip: []. scan: [] }
respectively.Lastly, the scan and skip configurations were mutually exclusive - I do not believe this is necessary with the addition of regular expressions. Skip should take precedence over scan.
The text was updated successfully, but these errors were encountered: