lf-edge / lf-edge/eve-kernel

Add native sboms with buildkit

Open
#50 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
2
Forks
23
Avg merge
1d 12h
Merged PRs (30d)
1

Description

We need to have SBoMs on our container images, in order to consume and compose them at a later stage for all of eve. This PR on eve does that for all of the in-eve-repo packages.

For this one, we need to do 2 things:

  1. Do our custom scanner/adder, which places a custom SBoM in the container image (already done earlier)
  2. Run the buildkit scanner with SBoM generation

For 2, it is straightforward. Taking one sample branch Makefile.eve, we already build with docker:

kernel-build-%: sbom Makefile.eve
	@echo "Building kernel version $(BRANCH):$(VERSION)-$* with compiler $*"
	docker buildx build \
	--build-arg="SOURCE_DATE_EPOCH=$(SOURCE_DATE_EPOCH)" \
	--build-arg="KBUILD_BUILD_TIMESTAMP=$(KBUILD_BUILD_TIMESTAMP)" \
	--build-arg="LOCALVERSION=$(VERSION)$(DIRTY)" \
	--platform $(PLATFORM) -t lfedge/eve-kernel:$(BRANCH)-$(VERSION)$(DIRTY)-$* --load -f Dockerfile.$* .

For this to work. we need to ensure we are running at least buildkit v0.11 (actual GA, not an -rc version), and add the flag --sbom=true to the image build.

That should do it. Once it is in place, you can check that it is there, see the blog post

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Makefile.eve kernel-build-% rule and its docker buildx build command, then check how the repository selects or documents its BuildKit version. Done means the build uses BuildKit v0.11 or newer, enables SBOM generation, and the resulting image contains an SBOM that can be verified as described in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker
Domain
build-system
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.