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

Re-introduce linux kernel cataloger #2526

Merged
merged 3 commits into from
Jan 22, 2024
Merged

Conversation

wagoodman
Copy link
Contributor

It seems that the linux kernel cataloger was inadvertently dropped from the list of catalogers to use when cataloging. This PR re-introduces that cataloger as well as adds two integration tests to defend against future regressions similar to this:

  • a test that looks for package constructor definitions in source code and correlates them in the single package_tasks.go location where they are wired
  • another test that correlates constructed tasks names with the length of known package constructors

Each test by itself has tradeoffs/assumptions (e.g. hard coded file paths, looking for function conventions by glob, etc.) but adding both helps reduce the risk of those assumptions.

Fixes #2524

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
@wagoodman wagoodman marked this pull request as draft January 22, 2024 16:11
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
@wagoodman wagoodman marked this pull request as ready for review January 22, 2024 16:22
@wagoodman wagoodman enabled auto-merge (squash) January 22, 2024 16:29
@wagoodman wagoodman merged commit 4c77783 into main Jan 22, 2024
11 checks passed
@wagoodman wagoodman deleted the add-linux-kernel-cataloger branch January 22, 2024 16:31
GijsCalis pushed a commit to GijsCalis/syft that referenced this pull request Feb 19, 2024
* re-add linux kernel cataloger

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* ensure there is at least a directory or image tag on each task

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* fix CLI tests to account for kernel finding (+2)

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

---------

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
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.

Syft missing linux kernel archives from SBOM results
2 participants