trivy
trivy copied to clipboard
bug(pom): incorrect inheritance of properties from pom fields for nested parents.
Description
Trivy fills fields from pom.xml file as properties (e.g. project.version, project.parent.version, etc.)
But when there are nested parents - Trivy takes incorrect values.
Example
- Current logic - Trivy detects
parent.versioninparent2(empty value) and uses this value for other pom files (parent1, scanned pom.xml). - Correct logic - use first non empty value (
1.0.0from scanned pom.xml file).
See test example here - https://github.com/DmitriyLewen/trivy/commit/3f5f6975e26496f1ffb28c09ae069215cbab7d62#r160365412