Skip to content

Commit 40b9280

Browse files
docs: integrate human readable sbom data (intel#2893)
* fixes: intel#2850 this commit adds a build process for SBOM markdown files triggered by the docs build process.
1 parent dc0060a commit 40b9280

File tree

7 files changed

+25
-0
lines changed

7 files changed

+25
-0
lines changed

doc/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,6 @@ help:
2020
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
2121

2222
docs:
23+
# build human readable sboms first
24+
$(MAKE) -C ../sbom
2325
$(SPHINXBUILD) $(SPHINXOPTS) $(SOURCEDIR) $(BUILDDIR)

doc/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ The CVE Binary Tool helps you determine if your system includes known vulnerabil
1919
RELEASE.md
2020
CONTRIBUTING.md
2121
CHECKERS.md
22+
sboms_for_humans/README.md
2223

2324
Indices and tables
2425
==================

doc/requirements.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ vendor,product
22
sphinx-doc_not_in_db,Sphinx
33
ryanfox_not_in_db,sphinx_markdown_tables
44
executablebooks_not_in_db,myst_parser
5+
anthonyharrison_not_in_db,sbom2doc

doc/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
Sphinx==4.4.0
22
sphinx_markdown_tables
33
myst_parser
4+
sbom2doc

doc/sboms_for_humans

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../sbom/sboms_for_humans/

sbom/Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.PHONY: all
2+
3+
SBOMS != ls *.spdx
4+
5+
all: $(SBOMS)
6+
$(foreach file, $(SBOMS), sbom2doc --input-file $(file) --format markdown --output-file "sboms_for_humans/$(basename $(file)).md"; echo "- [$(basename $(file))]($(basename $(file)).md)" >> sboms_for_humans/README.md;)

sbom/sboms_for_humans/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
# SBOMs For Humans
3+
4+
Made possible with [sbom2doc](https://github.com/anthonyharrison/sbom2doc)
5+
6+
These files are automatically generated as part of the `docs/` build process for [cve-bin-tool.readthedocs.io](https://cve-bin-tool.readthedocs.io)
7+
8+
To manually build human readable files:
9+
- install `docs/requirements.txt`
10+
- navigate to the `sbom/` directory in your terminal and run `make`
11+
12+
Generated human readable SBOMs:
13+

0 commit comments

Comments
 (0)