Not able to exclude transitive dependencies from a scan?
See original GitHub issueHi,
I am using the ./gradlew dependencyCheckAggregate
command to generate the dependency report HTML file for one of my Gradle projects. It works fine and lists both direct and transitive jar dependencies which are vulnerable as per the NVD database. However, I tried multiple ways but failed to figure out a way wherein I want to only list the direct dependencies? Is there any way through which I can list the direct dependencies only? Below is the build.gradle
file for reference –
File snippet -
plugins {
id 'org.owasp.dependencycheck' version '6.5.3'
}
repositories {
mavenCentral()
}
subprojects {
apply plugin: 'org.owasp.dependencycheck'
dependencyCheck {
outputDirectory = 'security-report'
failOnError = true
}
}
Is this some feature that is missing from this plugin? or something else? Please confirm.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
maven - How to exclude a transitive dependency inside a ...
1 Answer 1 ... It seems like the dependency "jackson databind" is not pulled by Maven, so their is no way to exclude...
Read more >Downgrading versions and excluding dependencies
Transitive dependencies can be excluded on the level of a declared dependency. Exclusions are spelled out as a key/value pair via the attributes...
Read more >Is it possible to exclude transitive dependencies while running ...
This command will not stop transitive dependencies from been found when scanning. Product. Black Duck/Black Duck Hub. Version. 2020.4.1.
Read more >Maven – Optional Dependencies and Dependency Exclusions
The answer is Yes. Project-A has declared that it doesn't need Project-D to run, so it won't be brought in as a transitive...
Read more >Gradle dependencies | IntelliJ IDEA Documentation - JetBrains
Required plugins for adding Gradle dependencies: Maven and Maven ... Besides the transitive dependencies, IntelliJ IDEA also indicates ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I won’t disagree that when using the maven or gradle plugin we could do better about indicating where in the dependency tree the vulnerable component is - however, how much one should worry about the transitive dependencies is complicated.
Used but undeclared dependencies
(see an example dependency-analysis reportYes, upgrading transitive dependencies can be difficult and sometimes impossible unless you are willing to put in a PR to the direct dependency to help them upgrade. However, just ignoring them is likely not the best option.
@aikebah I have been trying to come up with an easier way for Maven and Gradle to display the dependency tree for transitive deps. Something like adding a row above related dependencies that shows the path:
Hierarchy
org.junit.jupiter:junit-jupiter-api -> org.apiguardian:apiguardian-api