Skip to content

fix: add caps when parsing the jar#515

Open
pohanhuang wants to merge 2 commits into
neuvector:mainfrom
pohanhuang:fix/support-automate-module-name
Open

fix: add caps when parsing the jar#515
pohanhuang wants to merge 2 commits into
neuvector:mainfrom
pohanhuang:fix/support-automate-module-name

Conversation

@pohanhuang

@pohanhuang pohanhuang commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Description

Add new parsing capability for JAR manifest to ensure backward-compatible behavior across scanner versions.
Previously, reverting neuvector/neuvector#2294 (via neuvector/neuvector#2571) exposed a gap: the Automatic-Module-Name field in MANIFEST.MF was not consistently handled, causing module name resolution to differ between scanner versions.

This fix adds explicit parsing caps so the behavior stays stable regardless of whether neuvector/neuvector#2294 is present or not.

Related PR

#2294, #2571

Test

Scan docker.io/pohanhuangtw/demo-java-service:latest, verify:

No false positive CVE-2024-46985
No false positive CVE-2024-46997

[pre adding parsing cap: 5.5.2]
Screenshot 2026-07-08 at 1 50 05 PM
Screenshot 2026-07-08 at 2 00 58 PM

[After adding caps]
Screenshot 2026-07-08 at 2 06 55 PM
Screenshot 2026-07-08 at 2 12 36 PM

@holyspectral

Copy link
Copy Markdown
Contributor

Similar to what I mentioned in neuvector/neuvector#2574, I don't think neuvector/neuvector#2571 broke the existing behavior, did it? It reverted a PR that has unintended side effect in 5.4 and 5.5.

@pohanhuang

Copy link
Copy Markdown
Contributor Author

Yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants