-
Notifications
You must be signed in to change notification settings - Fork 506
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
Full set of bom READMEs and documentation #2109
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
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 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 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,77 @@ | ||
# bom (Bill of Materials) | ||
## A utility to generate SPDX compliant Bill of Materials manifests. | ||
|
||
`bom` is a tiny utility that leverages the code written for the Kubernetes | ||
Bill of Materials project. It enables software authors to generate an | ||
SBOM for their projects in a simple, yet powerful way. | ||
puerco marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
![terminal demo](../../docs/bom/cast.svg "Terminal demo") | ||
|
||
|
||
`bom` is a general-purpose tool that can generate SPDX packages from | ||
directories, container images, single files, and other sources. The utility | ||
has a built-in license classifier that recognizes the 400+ licenses in | ||
the SPDX catalog. | ||
|
||
Other features include Golang dependency analysis and full `.gitignore` | ||
support when scanning git repositories. | ||
|
||
## Generate your own Bill of Materials | ||
|
||
If you are looking for a way to create a bill of materials for your project, we | ||
have created a | ||
[HOWTO guide to generating an SBOM](../../docs/bom/create-a-bill-of-materials.md). | ||
|
||
The guide includes information about | ||
[what a Bill of Materials is](../../docs/bom/create-a-bill-of-materials.md#what-is-a-bill-of-materials), | ||
[the SPDX standard](../../docs/bom/create-a-bill-of-materials.md#spdx-software-package-data-exchange), | ||
and instructions to add files, images, directories, and | ||
other sources to your BOM. | ||
|
||
## Compiling bom | ||
|
||
To compile bom, clone the Kubernetes Release Engineering repository and | ||
run the `compile-tools` script: | ||
|
||
``` | ||
git clone [email protected]:kubernetes/release.git | ||
cd release | ||
./compile-release-tools | ||
``` | ||
|
||
## Examples | ||
|
||
The following examples show how bom can process different sources to generate | ||
an SPDX Bill of Materials. Multiple sources can be combined to get a document | ||
describing different packages. | ||
|
||
### Generate an SBOM from the Current Directory: | ||
|
||
To process a directory as a source for your SBOM, use the `-d` flag or simply pass | ||
the path as the first argument to `bom`: | ||
|
||
```bash | ||
bom generate -n http://example.com/ . | ||
``` | ||
|
||
### Process a Container Image | ||
|
||
This example pulls the kube-apiserver image, analyzes it, and describes in the | ||
SBOM. Each of its layers are then expressed as a subpackage in the resulting | ||
document: | ||
|
||
``` | ||
bom generate -n http://example.com/ --image k8s.gcr.io/kube-apiserver:v1.21.0 | ||
``` | ||
|
||
### Generate a BOM to describe files | ||
|
||
You can create an SBOM with just files in the manifest. For that, use `-f`: | ||
|
||
``` | ||
bom generate -n http://example.com/ \ | ||
-f Makefile \ | ||
-f file1.exe \ | ||
-f document.md \ | ||
-f other/file.txt | ||
``` |
This file contains 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 |
---|---|---|
|
@@ -25,6 +25,7 @@ RELEASE_TOOLS=( | |
krel | ||
kubepkg | ||
schedule-builder | ||
bom | ||
) | ||
|
||
setup_env() { | ||
|
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency, we should clarify how we want to spell the abbreviation, like:
bom
when referring to the binaryThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've seen that as of late SBOM has been gaining more traction and BOM is getting left behind. I used SBOM to abbreviate a generic bill of materials. I will set all instances of
bom
in backticks to refer to the binary