From 0b4db48ca4f235cb75d9deaff2e094f710d55b2d Mon Sep 17 00:00:00 2001 From: Sarah Oslund Date: Wed, 22 May 2024 11:28:13 -0700 Subject: [PATCH] Add redact documentation (#582) * Add redact documentation * PR feedback --- README.md | 14 ++++++++++++++ docs/sbom-tool-arguments.md | 14 ++++++++++++++ src/Microsoft.Sbom.Api/Config/SbomToolCmdRunner.cs | 1 - 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8ef40ad7..ff9d1ce1 100644 --- a/README.md +++ b/README.md @@ -115,6 +115,20 @@ This sample command provides the minimum mandatory arguments required to validat Currently only SPDX2.2 is supported. +### SBOM Redact + +Use the tool to redact any references to files from a given SBOM or set of SBOMs with either of the following commands: + +``` +sbom-tool redact -sd -o +``` + +``` +sbom-tool redact -sp -o +``` + +This command will generate a mirrored set of SBOMs in the output directory, but with the file references removed. Note that the SBOM directory and output path arguments can not reference the same directory and the output path should point to an existing, empty directory. + ## Integrating SBOM tool to your CI/CD pipelines. You can follow these guides to integrate the SBOM tool into your CI/CD pipelines diff --git a/docs/sbom-tool-arguments.md b/docs/sbom-tool-arguments.md index 274550ed..e2ff3a48 100644 --- a/docs/sbom-tool-arguments.md +++ b/docs/sbom-tool-arguments.md @@ -81,5 +81,19 @@ Actions FollowSymlinks (-F) If set to false, we will not follow symlinks while traversing the build drop folder. Default is set to 'true'. ManifestInfo (-mi) A list of the name and version of the manifest format that we are using. + Redact -options - Redact file information from given SBOM(s). + + Option Description + SbomPath (-sp) The file path of the SBOM to redact. + SbomDir (-sd) The directory containing the sbom(s) to redact. + OutputPath (-o) Gets or sets the directory where the redacted SBOM file(s) will be generated. + Verbosity (-V) Display this amount of detail in the logging output. + Verbose + Debug + Information + Warning + Error + Fatal + Version - Displays the version of the tool being used. Can be used as '--version' ``` diff --git a/src/Microsoft.Sbom.Api/Config/SbomToolCmdRunner.cs b/src/Microsoft.Sbom.Api/Config/SbomToolCmdRunner.cs index 2b99bd2c..035e2b42 100644 --- a/src/Microsoft.Sbom.Api/Config/SbomToolCmdRunner.cs +++ b/src/Microsoft.Sbom.Api/Config/SbomToolCmdRunner.cs @@ -73,7 +73,6 @@ public GenerationArgs Generate(GenerationArgs generationArgs) /// [ArgActionMethod] [ArgDescription("Redact file information from given SBOM(s).")] - [OmitFromUsageDocs] public RedactArgs Redact(RedactArgs redactArgs) { return redactArgs;