DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Last call! Secure your stack and shape the future! Help dev teams across the globe navigate their software supply chain security challenges.

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Releasing software shouldn't be stressful or risky. Learn how to leverage progressive delivery techniques to ensure safer deployments.

Avoid machine learning mistakes and boost model performance! Discover key ML patterns, anti-patterns, data strategies, and more.

Related

  • Maven Dependency Scope Applied
  • How To Approach Dependency Management in Java [Video]
  • How To Convert Image Files Into GIF or WebP Format Using Java
  • How To Validate Names Using Java

Trending

  • AI Meets Vector Databases: Redefining Data Retrieval in the Age of Intelligence
  • Docker Model Runner: Streamlining AI Deployment for Developers
  • Recurrent Workflows With Cloud Native Dapr Jobs
  • My LLM Journey as a Software Engineer Exploring a New Domain
  1. DZone
  2. Coding
  3. Java
  4. OWASP Dependency-Check Maven Plugin: A Must-Have

OWASP Dependency-Check Maven Plugin: A Must-Have

Though it's tough, this developer admits he hadn't heard of this plugin until recently. If you're in the same boat, read to get an overview of this great security tool.

By 
Bozhidar Bozhanov user avatar
Bozhidar Bozhanov
·
Dec. 30, 17 · Tutorial
Likes (5)
Comment
Save
Tweet
Share
18.9K Views

Join the DZone community and get the full member experience.

Join For Free

I have to admit, with a high degree of shame, that I didn't know about the OWASP dependency check maven plugin. And seems to have been around since 2013. And, apparently, a thousand projects on GitHub are using it already.

In the past, I've gone manually through dependencies to check them against vulnerability databases, or, in many cases, I was just blissfully ignorant about any vulnerabilities that my dependencies had.

The purpose of this post is just that - to recommend the OWASP dependency check maven plugin as a must-have in practically every maven project (there are dependency-check tools for other build systems as well).

When you add the plugin it generates a report. Initially, you can go and manually upgrade the problematic dependencies (I upgraded two of those in my current project), or suppress the false positives (e.g. the Cassandra library is marked as vulnerable, whereas the actual vulnerability is that Cassandra binds an unauthenticated RMI endpoint, which I've addressed via my stack setup, so the library isn't an issue).

Then you can configure a threshold for vulnerabilities and fail the build if new ones appear - either by you adding a vulnerable dependency or in case a vulnerability is discovered in an existing dependency.

All of that is shown on the examples page and is pretty straightforward. I'd suggest adding the plugin immediately, it's a must-have:

<plugin>
    <groupId>org.owasp</groupId>
    <artifactId>dependency-check-maven</artifactId>
    <version>3.0.2</version>
    <executions>
        <execution>
            <goals>
                <goal>check</goal>
            </goals>
        </execution>
    </executions>
</plugin>

It's not all roses, of course. People on Reddit complained that while the plugin caches stuff locally, it can still slow down your build significantly. So it is a good idea to exclude it from your general build and run it nightly in your CI system, and/or in your deployment pipeline.

Now, checking dependencies for vulnerabilities is just one small aspect of having your software secure and it shouldn't give you a false sense of security (a sort-of "I have my dependencies checked, therefore my system is secure" fallacy). But it's an important aspect. And having that check automated is a huge gain.

Apache Maven Dependency

Published at DZone with permission of Bozhidar Bozhanov, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Maven Dependency Scope Applied
  • How To Approach Dependency Management in Java [Video]
  • How To Convert Image Files Into GIF or WebP Format Using Java
  • How To Validate Names Using Java

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!