Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add redact verb to CLI #575

Merged
merged 8 commits into from
May 20, 2024
Merged

Add redact verb to CLI #575

merged 8 commits into from
May 20, 2024

Conversation

sfoslund
Copy link
Member

Adding the new redact verb to the sbom tool CLI. For now this verb is excluded from the tool help since the actual redaction logic is not yet present. With these changes running redact simply prints the arguments provided for the command, but redaction logic will be added in a future PR.

Once we turn this feature on it will show up in the help text as follows:

  Redact -options - Redact sensitive 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'

This PR also updates the style linter to be less strict about some comment style rules.

@sfoslund sfoslund requested a review from a team as a code owner May 17, 2024 20:45
@codecov-commenter
Copy link

codecov-commenter commented May 17, 2024

Codecov Report

Attention: Patch coverage is 84.37500% with 10 lines in your changes are missing coverage. Please review.

Project coverage is 58.67%. Comparing base (111282b) to head (13a0f6b).

Files Patch % Lines
src/Microsoft.Sbom.Api/Config/SbomToolCmdRunner.cs 0.00% 3 Missing ⚠️
...rosoft.Sbom.Api/Workflows/SBOMRedactionWorkflow.cs 72.72% 0 Missing and 3 partials ⚠️
src/Microsoft.Sbom.Common/Config/Configuration.cs 66.66% 2 Missing ⚠️
src/Microsoft.Sbom.Api/Config/ConfigSanitizer.cs 66.66% 0 Missing and 1 partial ⚠️
...DependencyInjection/ServiceCollectionExtensions.cs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #575      +/-   ##
==========================================
+ Coverage   58.41%   58.67%   +0.25%     
==========================================
  Files         250      253       +3     
  Lines        7796     7852      +56     
  Branches      916      920       +4     
==========================================
+ Hits         4554     4607      +53     
- Misses       2826     2828       +2     
- Partials      416      417       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@DaveTryon DaveTryon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a couple of questions, but seems OK to me

Copy link
Member

@alisonlomaka alisonlomaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@sfoslund sfoslund merged commit 4eddb7f into main May 20, 2024
6 checks passed
@sfoslund sfoslund deleted the sfoslund/redactVerb branch May 20, 2024 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants