You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| `vuln-output-format` | Format for the vulnerability report (HTML or JSON) when `vuln` is enabled | `json` |
41
+
| `vuln-output-format` | Format for the vulnerability report when `vuln` is enabled (supports `json`, `html`, `csv`, `table`, or comma-separated values like `html,json`) | `cyclonedx-json` |
40
42
| `vuln-output-file` | A specific file location to store the vulnerability report | |
41
43
42
44
## Example Usage
@@ -46,18 +48,32 @@ The main [SBOM action](action.yaml) is responsible for generating SBOMs.
46
48
Use the `output-format` and `vuln-output-format` parameters to choose the SBOM and vulnerability report formats:
47
49
48
50
```yaml
49
-
- uses: scality/sbom@v2.0.0
51
+
- uses: scality/sbom@v2
50
52
with:
51
53
target: ./artifacts
52
54
output-format: cyclonedx-json # SBOM format
53
-
vuln: true # Enable vulnerability scanning
54
-
vuln-output-format: html # Vulnerability report format
55
+
vuln: true # Enable vulnerability scanning
56
+
vuln-output-format: html # Generate HTML vulnerability report
57
+
```
58
+
59
+
The HTML format provides an interactive report with a dynamic table for better visualization of vulnerabilities, allowing for easier filtering and sorting.
60
+
61
+
### Multiple vulnerability report formats
62
+
63
+
You can generate multiple formats simultaneously by using comma-separated values:
64
+
65
+
```yaml
66
+
- uses: scality/sbom@v2
67
+
with:
68
+
target: ./artifacts
69
+
vuln: true
70
+
vuln-output-format: html,json # Generate both HTML and JSON reports
55
71
```
56
72
57
73
### Specify target type explicitly
58
74
59
75
```yaml
60
-
- uses: scality/sbom@v2.0.0
76
+
- uses: scality/sbom@v2
61
77
with:
62
78
target: myimage.tar
63
79
target-type: image
@@ -68,7 +84,7 @@ Use the `output-format` and `vuln-output-format` parameters to choose the SBOM a
68
84
For images (like those built using Oras) that use custom mediatypes not supported by Skopeo:
69
85
70
86
```yaml
71
-
- uses: scality/sbom@v2.0.0
87
+
- uses: scality/sbom@v2
72
88
with:
73
89
target: ./images
74
90
target-type: image
@@ -78,7 +94,7 @@ For images (like those built using Oras) that use custom mediatypes not supporte
@@ -211,10 +230,6 @@ In the generated SBOM files, you will find CycloneDX metadata. Examples include:
211
230
}
212
231
```
213
232
214
-
## References
215
-
216
-
HTML template for **Grype** vulnerability reports was modified from [Grype Contrib](https://github.com/opt-nc/grype-contribs).
217
-
218
233
## Core Workflow
219
234
220
235
```mermaid
@@ -343,3 +358,77 @@ flowchart TD
343
358
344
359
1. If `vuln` is enabled, the provider’s `vuln()` method uses Grype to scan the SBOM.
345
360
2. Grype generates a vulnerability report saved as: `{target_type}_{name}_{version}_vuln.json`.
361
+
362
+
## Merge Explanation
363
+
364
+
The merge is per default not hierarchical for the `components` field of a `component`. This means that components that were contained in the `components` of an already present component will just be added as new components under the SBOMs’ `components` sections. The `--hierarchical` flag allows for hierarchical merges. This affects only the top level components of the merged SBOM. The structured of nested components is preserved in both cases (except the removal of already present components), as shown for *component 4* in the image below.
0 commit comments