diff --git a/cmd/compliance.go b/cmd/compliance.go index 747aab8..64776f5 100644 --- a/cmd/compliance.go +++ b/cmd/compliance.go @@ -28,6 +28,20 @@ var complianceCmd = &cobra.Command{ Long: `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. `, + Example: ` sbomqs compliance --bsi|--oct [--basic|--json] + + # 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 OpenChain Telco compliance against a SBOM in a table output + sbomqs compliance --oct samples/sbomqs-spdx-syft.json + + # Check a OpenChain Telco compliance against a SBOM in a JSON output + sbomqs compliance --oct --json samples/sbomqs-spdx-syft.json +`, Args: func(cmd *cobra.Command, args []string) error { if err := cobra.ExactArgs(1)(cmd, args); err != nil { return fmt.Errorf("compliance requires a single argument, the path to an SBOM file") diff --git a/cmd/score.go b/cmd/score.go index df2ec34..363185d 100644 --- a/cmd/score.go +++ b/cmd/score.go @@ -64,6 +64,24 @@ var scoreCmd = &cobra.Command{ Use: "score", Short: "comprehensive quality score for your sbom", SilenceUsage: true, + Example: ` sbomqs score [--category ] [--feature ] [--basic|--json] + + # 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 +`, + Args: func(cmd *cobra.Command, args []string) error { if len(args) <= 0 { if len(inFile) <= 0 && len(inDirPath) <= 0 { @@ -187,8 +205,8 @@ func init() { scoreCmd.Flags().StringP("configpath", "", "", "scoring based on config path") // Filter Control - scoreCmd.Flags().StringP("category", "c", "", "filter by category") - scoreCmd.Flags().StringP("feature", "f", "", "filter by feature") + scoreCmd.Flags().StringP("category", "c", "", "filter by category (e.g. 'NTIA-minimum-elements', 'Quality', 'Semantic', 'Sharing', 'Structural')") + scoreCmd.Flags().StringP("feature", "f", "", "filter by feature (e.g. 'sbom_authors', 'comp_with_name', 'sbom_creation_timestamp') ") // Spec Control scoreCmd.Flags().BoolP("spdx", "", false, "limit scoring to spdx sboms")