Skip to content

Commit

Permalink
Add example on how to use --DirectoryExclusionList (#416)
Browse files Browse the repository at this point in the history
* Remove unnecessary line from docs

* Add example on how to use --DirectoryExclusionList

* Add new arguments to docs

* Fix spacing

---------

Co-authored-by: Sebastian Gomez <[email protected]>
  • Loading branch information
sebasgomez238 and sebasgomez238 authored Oct 5, 2023
1 parent ddebd02 commit d2627c0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docs/sbom-tool-arguments.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Actions
ValidateSignature (-s) If set, will validate the manifest using the signed catalog file.
IgnoreMissing (-im) If set, will not fail validation on the files presented in Manifest but missing on
the disk.
FailIfNoPackages (-n) If set to true, validation will fail if there are no packages detected in the sbom.
RootPathFilter (-r) If you're downloading only a part of the drop using the '-r' or 'root' parameter in
the drop client, specify the same string value here in order to skip validating
paths that are not downloaded.
Expand Down Expand Up @@ -86,6 +87,8 @@ DeleteManifestDirIfPresent (-D) If set to true, we will delete any pre
already present in the ManifestDirPath without asking the user for
confirmation. The new manifest directory will then be created at this
location and the generated SBOM will be stored there.
FetchLicenseInformation (-li) If set to true, we will attempt to fetch license information of packages
detected in the SBOM from the ClearlyDefinedApi.
Verbosity (-V) Display this amount of detail in the logging output.
Verbose
Debug
Expand All @@ -101,4 +104,4 @@ FollowSymlinks (-F) If set to false, we will not follow sy
ManifestInfo (-mi) A list of the name and version of the manifest format that we are using.
```
```
9 changes: 9 additions & 0 deletions docs/sbom-tool-cli-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,15 @@ In order to scan a path to populate the files section of the SBOM, the user can
./sbom-tool-win-x64.exe generate -b c:\outputDrop -m c:\outputPath -pn TestProject -pv 1.0.0 -ps MyCompany -nsb http://mycompany.com -di testImage:0.0.1
```

### Excluding Directories from Component Scan

You can exclude directories from the component scan by specifying the `-cd` parameter you can pass arguments directly to Component Detection. One of these arguments is `--DirectoryExclusionList` Filters out specific directories following a minimatch pattern from the component scan which will leave
the contents of these directories out of the packages section of the SBOM. For example, if you wanted to exclude the `bin` directory from the component scan you would run the following command

```
./sbom-tool-win-x64.exe generate -b c:\outputDrop -bc c:\Users\test\TestProject -pn TestProject -pv 1.0.0 -ps MyCompany -nsb http://mycompany.com -cd "--DirectoryExclusionList **/bin/**"
```

### Write telemetry to a file

By default, users commonly log telemetry to the console output. In order to log the telemetry as part of the SBOM file, specify the `-t` parameter:
Expand Down

0 comments on commit d2627c0

Please sign in to comment.