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

use dockerfile-add-scanner to make kernel sbom #3241

Merged
merged 1 commit into from
May 29, 2023

Conversation

deitch
Copy link
Contributor

@deitch deitch commented May 25, 2023

Also does a bit of cleanup on redundant calls in the Makefile, but those are minor with no functional change.

The way this works is as follows.

Before:

  1. Build rootfs.tar
  2. Expand rootfs.tar
  3. Run syft scanner, save results

This run either creates hundreds of packages for kernel (if you turn that scanner on), or none (if you turn it off). Neither of those matches the 5 files we source for building the kernel.

After:

  1. Build rootfs.tar
  2. Expand rootfs.tar
  3. Run dockerfile-add-scanner to create an spdx.json just for the kernel, saved in the expanded rootfs.tar **<--- new step **
  4. Run syft scanner, with kernel cataloger disabled.

Because the kernel cataloger is disabled, it will not create any packages or file entries for the kernel. Because there is a properly named kernel.spdx.json, syft automatically will include it into its generated sbom.

Signed-off-by: Avi Deitcher <avi@deitcher.net>
@deitch deitch requested review from eriknordmark and rvs as code owners May 25, 2023 12:52
@eriknordmark eriknordmark requested a review from yash-zededa May 26, 2023 14:50
Copy link
Contributor

@eriknordmark eriknordmark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@eriknordmark eriknordmark merged commit 3a5201f into lf-edge:master May 29, 2023
@deitch deitch deleted the sbom-kernel branch May 30, 2023 07:28
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.

2 participants