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
This section explains the flags relevant to the packages search feature.
164
184
The packages search takes only a single argument, either a file or a directory. There are man flags which can be specified to control its behaviour.
165
185
166
-
#### *Match Criteria*
186
+
#### _Match Criteria_
187
+
167
188
---
189
+
168
190
- `-N` or `--name` used for package/component name search.
169
191
- `-C` or `--cpe` used for package/component cpe search.
170
192
- `-P` or `--purl` used for pacakge/component purl search.
171
193
- `-H` or `--checksum` used for package/component checksum value search.
172
194
173
195
all of these match criteria are exclusive to each other.
174
196
175
-
#### *Patter Matching*
176
-
---------
197
+
#### _Patter Matching_
198
+
199
+
---
200
+
177
201
- `-E` or `--extended-regexp` flag can be used to indicate if the match criteria is a regular expression. Syntax supported is https://github.com/google/re2/wiki/Syntax.
178
202
179
-
#### *Matching Control*
180
-
-----
203
+
#### _Matching Control_
204
+
205
+
---
206
+
181
207
- `-i` or `--ignore-case`case insensitive matching.
182
208
183
-
#### *Output Control*
184
-
----
209
+
#### _Output Control_
210
+
211
+
---
212
+
185
213
- `-l` or `--license` this includes the license of the package/component in the output.
186
214
- `-q` or `--quiet` this suppresses all output of the tool, the return value of the tool is 0 indicating success, if it finds the search criteria.
187
215
- `--no-filename` removes the filename from the output.
@@ -191,32 +219,40 @@ all of these match criteria are exclusive to each other.
191
219
- `filen` - filepath
192
220
- `tooln` - tool with which sbom was generated, only prints the first one
193
221
- `toolv` - tool version
194
-
- `docn`- sbom document name
195
-
- `docv`- sbom document version
196
-
- `cpe`- package cpe, only prints the first one, indicates how many cpe's exists.
197
-
- `purl` - package purl
198
-
- `pkgn` - package name
199
-
- `pkgv` - package version
200
-
- `pkgl` - package licenses
222
+
- `docn` - sbom document name
223
+
- `docv` - sbom document version
224
+
- `cpe` - package cpe, only prints the first one, indicates how many cpe's exists.
225
+
- `purl` - package purl
226
+
- `pkgn` - package name
227
+
- `pkgv` - package version
228
+
- `pkgl` - package licenses
201
229
- `specn` - spec of the sbom document, spdx or cdx.
202
-
- `chkn` - checksum name
203
-
- `chkv` - checksum value
204
-
- `repo` - repository url
230
+
- `chkn` - checksum name
231
+
- `chkv` - checksum value
232
+
- `repo` - repository url
233
+
- `direct` - package is a direct dependency
234
+
235
+
#### _Stats Control_
236
+
237
+
---
205
238
206
-
#### *Stats Control*
207
-
----
208
239
- `-c` or `--count` suppresses the normal output and print matching counts of sbom filenames and packages.
209
240
210
-
#### *Directory Control*
211
-
----
241
+
#### _Directory Control_
242
+
243
+
---
244
+
212
245
- `-r` or `--recurse` when set, recursively scans all sub directories.
213
246
214
-
#### *Spec Control*
215
-
----
247
+
#### _Spec Control_
248
+
249
+
---
250
+
216
251
- `--spdx` searches only files which are SPDX.
217
252
- `--cdx` searches only files which are CycloneDX.
218
253
219
254
# Future work
255
+
220
256
- Search using files.
221
257
- Search using tool metadata.
222
258
- Search using CVE-ID.
@@ -225,6 +261,7 @@ all of these match criteria are exclusive to each other.
225
261
- Provide a list of malicious packages
226
262
227
263
# SBOM Samples
264
+
228
265
- A sample set of SBOM is present in the [samples](https://github.com/interlynk-io/sbomgr/tree/main/samples) directory above.
229
266
- [SBOM Benchmark](https://www.sbombenchmark.dev) is a repository of SBOM and quality score for most popular containers and repositories
230
267
- [SBOM Explorer](https://github.com/interlynk-io/sbomex) is a command line utility to search and pull SBOMs
0 commit comments