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

Add support for reading ELF package notes with section header #2939

Merged
merged 2 commits into from
Jun 7, 2024

Conversation

wagoodman
Copy link
Contributor

@wagoodman wagoodman commented Jun 7, 2024

Closes #2713

Adds the ability to detect ELF .note.package sections that have json encapsulated by an ELF section header. Today binaries with the section header within the notes section are not valid JSON, thus, are dropped entirely -- this PR will address this and allow them to be added to the SBOM . The section header will be dropped and the remaining JSON will be parsed, resulting in additional ELF packages discovered.

Note there is already existing code in place to remove ELF packages that are already covered by another OS package type (e.g. RPM). This PR allows syft to raise up these ELF packages when the RPM DB has been removed even (useful in distroless cases).

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
@github-actions github-actions bot added the json-schema Changes the json schema label Jun 7, 2024
@wagoodman wagoodman marked this pull request as ready for review June 7, 2024 18:10
@wagoodman wagoodman requested a review from a team June 7, 2024 18:10
@wagoodman wagoodman merged commit 254a562 into main Jun 7, 2024
11 checks passed
@wagoodman wagoodman deleted the fedora-elf-packages branch June 7, 2024 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
json-schema Changes the json schema
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Detect ELF package notes from fedora binaries
2 participants