Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

407
Views
How can I check if my Java project uses Log4j and which version?

Due to the Log4Shell vulnerability I would like to search and find out if my Java project is implementing Log4j directly or by dependencies, and which version.

I have, for example, projects with these dependency management tools:

  1. Maven project
  2. Apache Ivy project
  3. Old legacy project without any dependency management

How can I do this on these types of dependency management tools?

Details about the vulnerability (including mitigation steps):

CVE-2021-44228

Apache Log4j Security Vulnerabilities

over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

You may run Maven dependency tree from the command line inside your project:

mvn dependency:tree

In the output do a search for log4j. If you find it, it might mean that your project is either directly including log4j, or another dependency is including log4j as a transitive dependency.

over 4 years ago · Santiago Trujillo Report

0

So far I'm satisfied what Syft and Grype provide. These tools list all code dependencies of a given Docker image or a directory containing code - independent of the stack! Easy setup and quick execution.

It's Java-independent though and more generic than your specific question for a Maven-based solution. So it is up to you if it's of use or not.

over 4 years ago · Santiago Trujillo Report

0

If you use Maven and Linux, you can run:

mvn dependency:tree | grep log4j

This will check your dependencies and show results only if you have Log4j as a dependency.

And if it is a transitive dependency, and you want to check the dependency it came from, you can use:

mvn dependency: tree | grep -B20 log4j

It will show 20 lines before Log4j on the screen. If you still can't see the main dependency where it comes from, you can increase from 20 to 50, and so on until you find it.

KKKK
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!