-
Notifications
You must be signed in to change notification settings - Fork 8
feat: add missing tools to SBOM #1346
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
Merged
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
2249054
feat: add docs flavor
rjaegers d55f5fc
Merge commit '208b6c9cda90925b83db838a9dc7748096cc25e7' into feature/…
rjaegers f9ce339
docs: minor re-word of README
rjaegers 1541a88
chore: make Dockerfiles more consistent
rjaegers 01c1e83
chore: apply suggestions from code review
rjaegers 70c09a4
test: fix graphviz version test
rjaegers 543f843
chore: fix test
rjaegers a05c911
chore: process review comments
rjaegers bfc6434
chore: updated out of date comment
rjaegers c0be0ce
Merge branch 'main' into feature/add-docs-flavor
rjaegers eeb3ead
feat: add missing tools to sbom for rust
rjaegers 6ce35b5
Merge branch 'main' into feature/add-missing-tools-to-sbom
rjaegers e60b452
feat: add missing tools to sbom for base and cpp flavors
rjaegers fc9ce0e
Merge branch 'feature/add-missing-tools-to-sbom' of https://github.co…
rjaegers c370943
feat: add tool inventory
rjaegers c2e28c2
refactor: reduce duplication
rjaegers 4f81c68
feat: roll-out to other flavors
rjaegers 52d0b6a
docs: update release notes with tool inventory
rjaegers 4022d60
feat: uploade tool-inventory as release asset
rjaegers 5b6832f
chore: add sbom helper to base image
rjaegers 4694f0d
chore: add tests for add-sbom-note
rjaegers 2dfeff2
chore: process review comments
rjaegers 7748c80
docs: add a manual PR sign-off for image size
rjaegers 2a6b72d
chore: add sbom annotations in the same layer as tool installation
rjaegers f4cb804
chore: remove missed continuation
rjaegers 39151da
chore: enable prettier formatting for yaml and json
rjaegers File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| #!/usr/bin/env bash | ||
| # Annotate ELF binaries with a systemd `.note.package` section so that Syft | ||
| # includes them in the generated SBOM (see https://systemd.io/ELF_PACKAGE_METADATA/). | ||
| # | ||
| # This is used for tools that are installed outside of a package manager (e.g. | ||
| # downloaded release binaries) and that Syft cannot otherwise detect. Binaries | ||
| # that do not exist are skipped; if none of the given binaries exist the script | ||
| # fails so that a renamed or dropped tool becomes a hard build error. | ||
| # | ||
| # Usage: add-sbom-note.sh <name> <version> <purl> <binary>... | ||
| set -Eeuo pipefail | ||
|
|
||
| name="${1:?tool name required}" | ||
| version="${2:?tool version required}" | ||
| purl="${3:?tool purl required}" | ||
| shift 3 | ||
|
|
||
| note="$(mktemp)" | ||
| trap 'rm -f "${note}"' EXIT | ||
| jq -n --arg name "${name}" --arg version "${version}" --arg purl "${purl}" '{name: $name, version: $version, purl: $purl}' > "${note}" | ||
|
|
||
| tagged=0 | ||
| for binary in "$@"; do | ||
| if [ -x "${binary}" ]; then | ||
| objcopy --add-section .note.package="${note}" \ | ||
| --set-section-flags .note.package=noload,readonly "${binary}" | ||
| tagged=1 | ||
| fi | ||
|
rjaegers marked this conversation as resolved.
|
||
| done | ||
|
|
||
| [ "${tagged}" -eq 1 ] || { echo "no binaries found to annotate for ${name}" >&2; exit 1; } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ["bats", "bats-assert", "bats-support", "git", "gnupg2", "wget"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| [ | ||
| "ccache", | ||
| "clang-22", | ||
| "clang-format-22", | ||
| "clang-tidy-22", | ||
| "clang-tools-22", | ||
| "clangd-22", | ||
| "cmake", | ||
| "conan", | ||
| "g++-15", | ||
| "gcovr", | ||
| "gdb-multiarch", | ||
| "include-what-you-use", | ||
| "lld-22", | ||
| "llvm-22", | ||
| "mull-22", | ||
| "ninja-build", | ||
| "xwin" | ||
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ["graphviz", "plantuml", "sbdl"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| [ | ||
| "arm-gnu-toolchain", | ||
| "ccache", | ||
| "clang-22", | ||
| "clang-format-22", | ||
| "clang-tidy-22", | ||
| "clang-tools-22", | ||
| "clangd-22", | ||
| "cmake", | ||
| "conan", | ||
| "g++-15", | ||
| "gcovr", | ||
| "gdb-multiarch", | ||
| "include-what-you-use", | ||
| "lld-22", | ||
| "llvm-22", | ||
| "mull-22", | ||
| "ninja-build", | ||
| "xwin" | ||
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.