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 examples for score and compliance command #299

Merged
merged 3 commits into from
Aug 11, 2024

Conversation

viveksahu26
Copy link
Collaborator

closes #297

Description

Add examples for score and compliance commands. As shown below:

$ go run main.go compliance -h

Check if your SBOM complies with various SBOM standards like NTIA minimum elements, BSI TR-03183-2, OpenChain Telco.
        Generate a compliance report for an SBOM file.

Usage:
  sbomqs compliance <sbom file> [flags]

Examples:
 sbomqs compliance --bsi|--oct  [--basic|--json] <SBOM file>

  # Check a BSI TR-03183-2 v1.1 compliance against a SBOM in a table output
  sbomqs compliance --bsi samples/sbomqs-spdx-syft.json

  # Check a BSI TR-03183-2 v1.1 compliance against a SBOM in a JSON output
  sbomqs compliance --bsi --json samples/sbomqs-spdx-syft.json

  # Check a OpenChainTelco compliance against a SBOM in a table output
  sbomqs compliance --oct samples/sbomqs-spdx-syft.json

  # Check a OpenChainTelco compliance against a SBOM in a JSON output
  sbomqs compliance --oct --json samples/sbomqs-spdx-syft.json


Flags:
  -b, --basic      output in basic format
  -c, --bsi        BSI TR-03183-2 v1.1 compliance
  -D, --debug      enable debug logging
  -d, --detailed   output in detailed format
  -h, --help       help for compliance
  -j, --json       output in json format
  -t, --oct        OpenChainTelco compliance

and

$ go run main.go score -h       
     
comprehensive quality score for your sbom

Usage:
sbomqs score [flags]

Examples:
sbomqs score [--category <category>] [--feature <feature>]  [--basic|--json]  <SBOM file>

# Get a score against a SBOM in a table output
sbomqs score samples/sbomqs-spdx-syft.json

# Get a score against a SBOM in a basic output
sbomqs score --basic samples/sbomqs-spdx-syft.json

# Get a score against a SBOM in a JSON output
sbomqs score --json samples/sbomqs-spdx-syft.json

# Get a score for a 'NTIA-minimum-elements' category against a SBOM in a table output
sbomqs score --category NTIA-minimum-elements samples/sbomqs-spdx-syft.json

# Get a score for a 'NTIA-minimum-elements' category and 'sbom_authors' feature against a SBOM in a table output
sbomqs score --category NTIA-minimum-elements --feature sbom_authors samples/sbomqs-spdx-syft.json


Flags:
-b, --basic               results in single line format
-c, --category string     filter by category (e.g. 'NTIA-minimum-elements', 'Quality', 'Semantic', 'Sharing', 'Structural')
    --configpath string   scoring based on config path
-D, --debug               enable debug logging
-d, --detailed            results in table format, default
-f, --feature string      filter by feature (e.g. 'sbom_authors',  'comp_with_name', 'sbom_creation_timestamp') 
-h, --help                help for score
-j, --json                results in json

riteshnoronha
riteshnoronha previously approved these changes Jul 30, 2024
@riteshnoronha
Copy link
Contributor

@viveksahu26 there is a conflict to resolve here

@viveksahu26
Copy link
Collaborator Author

Similarly on this one.

@riteshnoronha riteshnoronha merged commit a6774a6 into interlynk-io:main Aug 11, 2024
2 checks passed
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.

Improve Help Output for sbomqs score Command
2 participants