Skip to content

fix: support automate module name with parsing cap#2574

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

fix: support automate module name with parsing cap#2574
pohanhuang wants to merge 3 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 #2294 (via #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 #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

Signed-off-by: pohanhuang <pohan.huang@suse.com>
Signed-off-by: pohanhuang <pohan.huang@suse.com>
Signed-off-by: pohanhuang <pohan.huang@suse.com>
@holyspectral

Copy link
Copy Markdown
Collaborator

Thanks! Before jumping into review, I don't think #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

@holyspectral exactly, using this new caps would ensure even if the scanner update, the behavior stays the same.

@holyspectral

Copy link
Copy Markdown
Collaborator

@pohanhuang okay then perhaps you want to modify the case description a little bit? It was worded like the revert PR caused the issue.

@pohanhuang

Copy link
Copy Markdown
Contributor Author

@holyspectral Done.
Also update in neuvector/scanner#515

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