@@ -110,11 +110,11 @@ Options:
110110 --fail-on-errors Fail on validation errors (return a non-zero exit code)
111111```
112112
113- ## Docker Image
113+ # Docker Image
114114
115115The CycloneDX CLI tool can also be run using docker ` docker run cyclonedx/cyclonedx-cli ` .
116116
117- ## Supported Platforms
117+ # Supported Platforms
118118
119119Officially supported builds are available for these platforms:
120120
@@ -136,3 +136,35 @@ Community supported builds are available for these platforms:
136136For Windows these should be preinstalled.
137137
138138For Ubuntu these are libc6 libgcc1 libgssapi-krb5-2 libicu66 libssl1.1 libstdc++6 zlib1g.
139+
140+ # Using gron for adhoc searching and analysis
141+
142+ gron transforms JSON into discrete assignments to make it easier to grep for what you want and see the absolute 'path' to it.
143+
144+ For convenience, gron is included in the CycloneDX CLI Docker image.
145+
146+ Example usage that lists all component names and versions
147+
148+ ```
149+ $ gron bom-1.2.json | grep -E "(components\[[[:digit:]]*\].name)|(components\[[[:digit:]]*\].version)"
150+
151+ json.components[0].name = "tomcat-catalina";
152+ json.components[0].version = "9.0.14";
153+ json.components[1].name = "mylibrary";
154+ json.components[1].version = "1.0.0";
155+ ```
156+
157+ Or the same using an XML format SBOM
158+
159+ ```
160+ $ cyclonedx convert --input-file bom.xml --output-format json | gron | grep -E "(components\[[[:digit:]]*\].name)|(components\[[[:digit:]]*\].version)"
161+
162+ json.components[0].name = "tomcat-catalina";
163+ json.components[0].version = "9.0.14";
164+ json.components[1].name = "mylibrary";
165+ json.components[1].version = "1.0.0";
166+ ```
167+
168+ For more details on gron usage refer to the [ gron project page] ( https://github.com/TomNomNom/gron ) .
169+
170+ For more details on grep usage refer to the [ grep man page] ( https://www.man7.org/linux/man-pages/man1/grep.1.html ) .
0 commit comments