Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

java archive parser incorrectly splitting filenames #2563

Closed
brian-ebarb opened this issue Jan 30, 2024 · 0 comments · Fixed by #2565
Closed

java archive parser incorrectly splitting filenames #2563

brian-ebarb opened this issue Jan 30, 2024 · 0 comments · Fixed by #2565
Labels
bug Something isn't working

Comments

@brian-ebarb
Copy link
Contributor

brian-ebarb commented Jan 30, 2024

What happened:
It appears in the method newJavaArchiveFilename in the archive_filename.go is incorrectly parsing the names of jars when it has an underscore in the name. http4s-crypto_2.12-0.1.0.jar returns "12" as the name isntead of http4s-crypto

What you expected to happen:
I expected "name" to be reported as http4s-crypto

Steps to reproduce the issue:
scan a java archive with a name like http4s-crypto_2.12-0.1.0.jar

Anything else we need to know?:

Environment:

  • Output of syft version:

  • Application: syft
    Version: 0.0.0-SNAPSHOT-9433238b
    BuildDate: 2024-01-03T18:52:10Z
    GitCommit: 9433238b3c4268ae3300718805ecddf7ea3f59e4
    GitDescription: 9433238b-dirty
    Platform: linux/amd64
    GoVersion: go1.21.3 X:boringcrypto
    Compiler: gc

  • OS (e.g: cat /etc/os-release or similar):
    NAME="Rocky Linux"
    VERSION="8.9 (Green Obsidian)"
    ID="rocky"
    ID_LIKE="rhel centos fedora"
    VERSION_ID="8.9"
    PLATFORM_ID="platform:el8"
    PRETTY_NAME="Rocky Linux 8.9 (Green Obsidian)"
    ANSI_COLOR="0;32"
    LOGO="fedora-logo-icon"
    CPE_NAME="cpe:/o:rocky:rocky:8:GA"
    HOME_URL="https://rockylinux.org/"
    BUG_REPORT_URL="https://bugs.rockylinux.org/"
    SUPPORT_END="2029-05-31"
    ROCKY_SUPPORT_PRODUCT="Rocky-Linux-8"
    ROCKY_SUPPORT_PRODUCT_VERSION="8.9"
    REDHAT_SUPPORT_PRODUCT="Rocky Linux"
    REDHAT_SUPPORT_PRODUCT_VERSION="8.9"

@brian-ebarb brian-ebarb added the bug Something isn't working label Jan 30, 2024
@brian-ebarb brian-ebarb changed the title java archve parser incorrectly splitting filenames java archive parser incorrectly splitting filenames Jan 30, 2024
@github-project-automation github-project-automation bot moved this to Done in OSS Jan 31, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant