Skip to content

Conversation

@Umesh042005
Copy link
Contributor

Description of Change

This change adds a small hint to help Dependency-Check correctly
identify the Elastic APM Java agent as apm_java_agent.

Without this hint, the Java agent may be matched to the generic
elastic:apm_agent, which can cause Java-specific CVEs to be missed.

Related issues

Relates to #8008

Have test cases been added to cover the new functionality?

No

@boring-cyborg boring-cyborg bot added the core changes to core label Dec 27, 2025
@chadlwilson
Copy link
Collaborator

Does the change/hint work? What are the results before/after?

@Umesh042005
Copy link
Contributor Author

Thanks @chadlwilson for the question.
I have not been able to fully test this locally yet.
The change is based on the existing hint patterns used to resolve similar false-negative CPE mappings (for example, other language-specific agents).
Before this hint, the Java Elastic APM agent may be identified as the generic elastic:apm_agent, which can cause Java-specific CVEs to be missed.
After applying the hint, the dependency should be identified as
apm_java_agent, allowing the correct CVEs to be matched.
If needed, I can try to validate this further and share concrete
before/after scan results.

@chadlwilson
Copy link
Collaborator

A simple "no" would be enough, if you haven't tested it. (Are your messages AI generated?)

In my opinion, you should demonstrate evidence a non-trivial change actually has the intended effect when proposing it.

@Umesh042005
Copy link
Contributor Author

@chadlwilson sir,
I’m new to open source, so I did take some help while writing the response and
I haven’t tested this yet .
I got it your point that testing is important for this kind of change.
I’ll try to test it and after testing i will share the result here.

@jeremylong jeremylong changed the title Add hint for Elastic APM Java agent CPE mapping fix: add hint for Elastic APM Java agent CPE mapping Dec 28, 2025
@Umesh042005
Copy link
Contributor Author

@chadlwilson Sir, I tested the behavior before and after refining the hint.

Before the hint, the Elastic APM Java agent was resolved only as the generic
apm_agent. After the hint, apm_java_agent is now correctly identified.
I’ve attached screenshots showing the before/after
results and the hint itself.
Screenshot 2025-12-29 023105
Screenshot 2025-12-29 023148
Screenshot 2025-12-29 023206
Since this involved a small change in the hint, I’ll open a new PR with the
updated implementation.
Please let me know if this looks good and if I should proceed with the PR.

@Umesh042005 Umesh042005 reopened this Dec 28, 2025
@Umesh042005
Copy link
Contributor Author

@chadlwilson I tested the behavior before and after refining the hint. can you please check the Screenshots ? so it will help me to clear pov .

@chadlwilson
Copy link
Collaborator

@Umesh042005 thanks Umesh, I'll take a look soon 👍

Copy link
Collaborator

@chadlwilson chadlwilson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (this was a quick one, dont know why I was procrastinating!)

@Umesh042005
Copy link
Contributor Author

Hi @chadlwilson chadlwilson, I have applied the suggested tweak for consistency. Could you please approve the workflows to run the final checks? Thanks

@chadlwilson
Copy link
Collaborator

chadlwilson commented Jan 3, 2026

I’m just a contributor & issue trigger - I don’t have maintenance permissions.

@jeremylong
Copy link
Collaborator

sorry for the delay - I've been extremely busy. I'll try to get a few of the PRs (like this one) merged in the next week and create a new release.

@chadlwilson
Copy link
Collaborator

@Umesh042005 the failing test is not due to your change. If you rebase on current master, or merge from master it should be fixed.

@Umesh042005
Copy link
Contributor Author

"Hi @chadlwilson , @jeremylong , I have merged the latest changes from the master branch as suggested. The previous build failure is now resolved. Could you please approve the workflows to run the final checks? Thank you!"

@jeremylong jeremylong added this to the 12.2.0 milestone Jan 5, 2026
@jeremylong jeremylong merged commit 4f05c69 into dependency-check:main Jan 5, 2026
9 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 5, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

core changes to core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants