Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Native Image SBOM: support extracting symbols in .dynsym section #3647

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rudsberg
Copy link
Contributor

@rudsberg rudsberg commented Feb 6, 2025

Description

This PR adds support for extracting SBOMs embedded in native images where the SBOM symbols are saved in the .dynsym section of ELF files. Newer versions of GraalVM Native Image saves the SBOM symbols in the .dynsym section while older versions saves them in the .symtab section. This PR ensures SBOM extraction works in both cases.

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist:

  • I have added unit tests that cover changed behavior*

*No additional tests were added. The new getSymbols function is exercised via TestParseNativeImage that calls fetchPkgs. This is a negative test testing that an error is thrown when SBOM extraction is attempted on a native image that wasn't created with an embedded SBOM.

  • I have tested my code in common scenarios and confirmed there are no regressions
  • I have added comments to my code, particularly in hard-to-understand sections

@rudsberg rudsberg force-pushed the main branch 2 times, most recently from c5128b8 to cdc3db8 Compare February 6, 2025 14:05
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.

1 participant