Skip to content

Commit 2325b8d

Browse files
Phanindra899sbp
authored andcommitted
Add SBOM workflows documentation
1 parent d3a654a commit 2325b8d

5 files changed

Lines changed: 182 additions & 2 deletions

File tree

atr/docs/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ NOTE: This documentation is a work in progress.
1313
* `2.3.` [Checks](checks)
1414
* `2.4.` [License checks](license-checks)
1515
* `2.5.` [Trusted Publishing](trusted-publishing)
16+
* `2.6.` [SBOM workflows](sbom-workflows)
1617
* `3.` [Developer guide](developer-guide)
1718
* `3.1.` [Running the server](running-the-server)
1819
* `3.2.` [Overview of the code](overview-of-the-code)

atr/docs/running-the-server.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
**Up**: `3.` [Developer guide](developer-guide)
44

5-
**Prev**: `2.5.` [Trusted Publishing](trusted-publishing)
5+
**Prev**: `2.6.` [SBOM workflows](sbom-workflows)
66

77
**Next**: `3.2.` [Overview of the code](overview-of-the-code)
88

atr/docs/sbom-workflows.md

Lines changed: 178 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
# 2.6. SBOM workflows
2+
3+
**Up**: `2.` [User guide](user-guide)
4+
5+
**Prev**: `2.5.` [Trusted Publishing](trusted-publishing)
6+
7+
**Next**: `3.1.` [Running the server](running-the-server)
8+
9+
**Sections**:
10+
11+
* [Overview](#overview)
12+
* [Supported SBOM operations](#supported-sbom-operations)
13+
* [Convert XML SBOM to JSON](#convert-xml-sbom-to-json)
14+
* [CycloneDX validation](#cyclonedx-validation)
15+
* [SBOM scoring and validation](#sbom-scoring-and-validation)
16+
* [Vulnerability scanning](#vulnerability-scanning)
17+
* [SBOM augmentation](#sbom-augmentation)
18+
* [Related interfaces](#related-interfaces)
19+
* [Related documentation](#related-documentation)
20+
21+
## Overview
22+
23+
ATR provides multiple Software Bill of Materials (SBOM) workflows based on the CycloneDX specification. These workflows help projects generate, validate, augment, convert, and analyze SBOM files for release artifacts.
24+
25+
ATR integrates several external tools including:
26+
27+
* syft
28+
* CycloneDX CLI
29+
* sbomqs
30+
* OSV
31+
32+
These workflows are primarily implemented in the `atr/tasks/sbom.py` module and exposed through draft and report interfaces.
33+
34+
## Supported SBOM operations
35+
36+
ATR supports several SBOM workflows for generation, conversion, analysis, and augmentation.
37+
38+
### Generate CycloneDX SBOM
39+
40+
ATR can generate a CycloneDX JSON SBOM from supported release artifacts including:
41+
42+
* `.tar.gz`
43+
* `.tgz`
44+
* `.zip`
45+
* `.jar`
46+
47+
SBOM generation uses the `syft` tool and produces `.cdx.json` files.
48+
49+
Generation tasks are queued through:
50+
51+
* `atr/post/draft.py`
52+
* `atr/storage/writers/sbom.py`
53+
54+
Core implementation:
55+
56+
* `generate_cyclonedx`
57+
* `_generate_cyclonedx_core`
58+
59+
## Convert XML SBOM to JSON
60+
61+
ATR can convert CycloneDX XML SBOM files into JSON format.
62+
63+
Supported input:
64+
65+
* `.cdx.xml`
66+
67+
Generated output:
68+
69+
* `.cdx.json`
70+
71+
Core implementation:
72+
73+
* `convert_cyclonedx`
74+
* `_convert_cyclonedx_core`
75+
76+
## CycloneDX validation
77+
78+
ATR validates CycloneDX SBOM files using both the CycloneDX CLI and Python validation tooling.
79+
80+
Validation workflows detect:
81+
82+
* schema violations
83+
* malformed SBOM structures
84+
* invalid metadata
85+
* specification compatibility issues
86+
87+
Related modules include:
88+
89+
* `atr/sbom/cyclonedx.py`
90+
91+
## SBOM scoring and validation
92+
93+
ATR performs several validation and scoring operations for CycloneDX SBOM files.
94+
95+
These include:
96+
97+
* CycloneDX CLI validation
98+
* NTIA 2021 conformance checks
99+
* license analysis
100+
* vulnerability analysis
101+
* SBOM QS scoring
102+
* tool version analysis
103+
104+
The scoring workflow is implemented through:
105+
106+
* `score_tool`
107+
* `score_qs`
108+
109+
Related modules include:
110+
111+
* `atr/sbom/conformance.py`
112+
* `atr/sbom/licenses.py`
113+
* `atr/sbom/cyclonedx.py`
114+
* `atr/sbom/sbomqs.py`
115+
116+
## Vulnerability scanning
117+
118+
ATR supports vulnerability analysis through OSV integration.
119+
120+
The OSV workflow:
121+
122+
* scans CycloneDX SBOM files
123+
* identifies known vulnerabilities
124+
* augments SBOM files with vulnerability information
125+
126+
Core implementation:
127+
128+
* `osv_scan`
129+
* `bundle_to_vuln_patch`
130+
131+
Related modules:
132+
133+
* `atr/sbom/osv.py`
134+
135+
## SBOM augmentation
136+
137+
ATR can augment existing SBOM files with additional metadata and NTIA-related properties.
138+
139+
Augmentation workflows may generate updated revisions containing modified SBOM files.
140+
141+
Core implementation:
142+
143+
* `augment`
144+
* `bundle_to_ntia_patch`
145+
146+
## Related interfaces
147+
148+
SBOM functionality is exposed through several application layers.
149+
150+
Task handlers:
151+
152+
* `atr/tasks/sbom.py`
153+
154+
POST endpoints:
155+
156+
* `atr/post/sbom.py`
157+
* `atr/post/draft.py`
158+
159+
GET interfaces:
160+
161+
* `atr/get/sbom.py`
162+
163+
Storage writers:
164+
165+
* `atr/storage/writers/sbom.py`
166+
167+
Templates:
168+
169+
* `atr/templates/draft-tools.html`
170+
* `atr/templates/check-selected-path-table.html`
171+
172+
## Related documentation
173+
174+
Additional SBOM-related behavior is described in:
175+
176+
* [Checks](checks)
177+
* [Running the server](running-the-server)
178+
* [Overview of the code](overview-of-the-code)

atr/docs/trusted-publishing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
**Prev**: `2.4.` [License checks](license-checks)
66

7-
**Next**: `3.1.` [Running the server](running-the-server)
7+
**Next**: `2.6.` [SBOM workflows](sbom-workflows)
88

99
**Sections**:
1010

atr/docs/user-guide.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* `2.3.` [Checks](checks)
1414
* `2.4.` [License checks](license-checks)
1515
* `2.5.` [Trusted Publishing](trusted-publishing)
16+
* `2.6.` [SBOM workflows](sbom-workflows)
1617

1718
**Sections**:
1819

0 commit comments

Comments
 (0)