Versions in this module Expand all Collapse all v0 v0.9.2 Feb 11, 2023 v0.9.1 Feb 6, 2023 v0.9.0 Feb 1, 2023 Changes in this version + const AND + const CMD_LICENSE + const CMD_QUERY + const CMD_RESOURCE + const CMD_SCHEMA + const CMD_USAGE_LICENSE_LIST + const CMD_USAGE_QUERY + const CMD_USAGE_RESOURCE_LIST + const CMD_USAGE_SCHEMA_LIST + const CMD_USAGE_VALIDATE + const CMD_VALIDATE + const CMD_VERSION + const CONJUNCTION_UNDEFINED + const DEFAULT_CUSTOM_VALIDATION_CONFIG + const DEFAULT_LICENSE_POLICIES + const DEFAULT_SCHEMA_CONFIG + const DEFAULT_TRUNCATE_LENGTH + const ERROR_APPLICATION + const ERROR_VALIDATION + const ERR_FORMAT_DETAIL_SEP + const ERR_TYPE_INVALID_JSON_MAP + const ERR_TYPE_INVALID_QUERY + const ERR_TYPE_INVALID_SBOM + const ERR_TYPE_SBOM_COMPONENT + const ERR_TYPE_SBOM_COMPOSITION + const ERR_TYPE_SBOM_LICENSE + const ERR_TYPE_SBOM_METADATA + const ERR_TYPE_SBOM_METADATA_PROPERTY + const ERR_TYPE_UNEXPECTED_ERROR + const FLAG_CONFIG_CUSTOM_VALIDATION + const FLAG_CONFIG_LICENSE_POLICY + const FLAG_CONFIG_SCHEMA + const FLAG_CUSTOM_VALIDATION + const FLAG_DEBUG + const FLAG_DEBUG_SHORT + const FLAG_FILENAME_INPUT + const FLAG_FILENAME_INPUT_SHORT + const FLAG_FILENAME_OUTPUT + const FLAG_FILENAME_OUTPUT_SHORT + const FLAG_FILE_OUTPUT_FORMAT + const FLAG_LICENSE_LIST_OUTPUT_FORMAT_HELP + const FLAG_LICENSE_LIST_POLICY_HELP + const FLAG_LICENSE_LIST_SUMMARY_HELP + const FLAG_LICENSE_POLICY + const FLAG_LICENSE_SUMMARY + const FLAG_LOG_OUTPUT_INDENT + const FLAG_OUTPUT_FORMAT + const FLAG_POLICY_OUTPUT_FORMAT_HELP + const FLAG_QUERY_FROM + const FLAG_QUERY_FROM_HELP + const FLAG_QUERY_ORDER_BY + const FLAG_QUERY_ORDER_BY_HELP + const FLAG_QUERY_OUTPUT_FORMAT_HELP + const FLAG_QUERY_SELECT + const FLAG_QUERY_SELECT_HELP + const FLAG_QUERY_WHERE + const FLAG_QUERY_WHERE_HELP + const FLAG_QUIET_MODE + const FLAG_QUIET_MODE_SHORT + const FLAG_RESOURCE_OUTPUT_FORMAT_HELP + const FLAG_RESOURCE_TYPE + const FLAG_RESOURCE_TYPE_HELP + const FLAG_RESOURCE_WHERE + const FLAG_RESOURCE_WHERE_HELP + const FLAG_SCHEMA_FORCE + const FLAG_SCHEMA_OUTPUT_FORMAT_HELP + const FLAG_SCHEMA_VARIANT + const FLAG_TRACE + const FLAG_TRACE_SHORT + const FORMAT_ANY + const FORMAT_CSV + const FORMAT_DEFAULT + const FORMAT_JSON + const FORMAT_MARKDOWN + const FORMAT_TEXT + const INVALID + const LC_LOC_COMPONENTS + const LC_LOC_METADATA + const LC_LOC_METADATA_COMPONENT + const LC_LOC_SERVICES + const LC_LOC_UNKNOWN + const LC_TYPE_EXPRESSION + const LC_TYPE_ID + const LC_TYPE_INVALID + const LC_TYPE_NAME + const LEFT_PARENS + const LEFT_PARENS_WITH_SEPARATOR + const LICENSE_LIST_NOT_APPLICABLE + const LICENSE_LIST_TITLE_ROW_SEPARATOR + const LICENSE_NONE + const MD_ALIGN_CENTER + const MD_ALIGN_LEFT + const MD_ALIGN_RIGHT + const MD_COLUMN_SEPARATOR + const MSG_APP_DESCRIPTION + const MSG_APP_NAME + const MSG_FLAG_CONFIG_LICENSE + const MSG_FLAG_CONFIG_SCHEMA + const MSG_FLAG_CUSTOM_VALIDATION + const MSG_FLAG_DEBUG + const MSG_FLAG_INPUT + const MSG_FLAG_LOG_INDENT + const MSG_FLAG_LOG_QUIET + const MSG_FLAG_OUTPUT + const MSG_FLAG_TRACE + const MSG_FORMAT_TYPE + const MSG_INVALID_METADATA_COMPONENT + const MSG_INVALID_METADATA_COMPONENT_COMPONENTS + const MSG_INVALID_METADATA_PROPERTIES + const MSG_LICENSES_NOT_FOUND + const MSG_LICENSE_EXPRESSION_INVALID_CONJUNCTION + const MSG_LICENSE_INVALID_DATA + const MSG_LICENSE_INVALID_EXPRESSION + const MSG_LICENSE_INVALID_POLICY + const MSG_OUTPUT_NO_LICENSES_FOUND + const MSG_OUTPUT_NO_RESOURCES_FOUND + const MSG_OUTPUT_NO_SCHEMAS_FOUND + const MSG_PROPERTY_NOT_FOUND + const MSG_PROPERTY_NOT_UNIQUE + const MSG_PROPERTY_REGEX_FAILED + const MSG_QUERY_CLAUSE_NOT_FOUND + const MSG_QUERY_ERROR_FROM_KEY_INVALID_OBJECT + const MSG_QUERY_ERROR_FROM_KEY_NOT_FOUND + const MSG_QUERY_ERROR_FROM_KEY_SLICE_DEREFERENCE + const MSG_QUERY_ERROR_SELECT_WILDCARD + const MSG_QUERY_INVALID_DATATYPE + const MSG_QUERY_INVALID_FROM_CLAUSE + const MSG_QUERY_INVALID_ORDER_BY_CLAUSE + const MSG_QUERY_INVALID_REQUEST + const MSG_QUERY_INVALID_RESPONSE + const MSG_QUERY_INVALID_SELECT_CLAUSE + const MSG_QUERY_INVALID_WHERE_CLAUSE + const MSG_SCHEMA_ERRORS + const MSG_SCHEMA_FORCE + const MSG_SCHEMA_VARIANT + const MSG_SUPPORTED_OUTPUT_FORMATS_HELP + const MSG_SUPPORTED_OUTPUT_FORMATS_SUMMARY_HELP + const OR + const PLUS_OPERATOR + const POLICY_ALLOW + const POLICY_CONFLICT + const POLICY_DENY + const POLICY_NEEDS_REVIEW + const POLICY_UNDEFINED + const PROTOCOL_PREFIX_FILE + const QUERY_FROM_CLAUSE_SEP + const QUERY_SELECT_CLAUSE_SEP + const QUERY_TOKEN_WILDCARD + const QUERY_WHERE_EXPRESSION_SEP + const QUERY_WHERE_OPERAND_EQUALS + const REGEX_VALID_SPDX_ID + const RESOURCE_FILTER_KEY_BOMREF + const RESOURCE_FILTER_KEY_NAME + const RESOURCE_FILTER_KEY_TYPE + const RESOURCE_FILTER_KEY_VALUE + const RESOURCE_TYPE_COMPONENT + const RESOURCE_TYPE_DEFAULT + const RESOURCE_TYPE_SERVICE + const RIGHT_PARENS + const RIGHT_PARENS_WITH_SEPARATOR + const SUBCOMMAND_LICENSE_LIST + const SUBCOMMAND_LICENSE_POLICY + const SUBCOMMAND_RESOURCE_LIST + const VALID + const WITH + var CDX_LICENSE_LOCATION_NAMES = map[int]string + var LC_TYPE_NAMES = [...]string + var LICENSE_LIST_SUMMARY_SUPPORTED_FORMATS = ... + var LICENSE_LIST_SUPPORTED_FORMATS = ... + var LICENSE_LIST_TITLES_LICENSE_CHOICE = []string + var LICENSE_LIST_TITLES_SUMMARY = []string + var LICENSE_LIST_TITLE_POLICY = []string + var LICENSE_POLICY_SUMMARY_TITLES = []string + var LICENSE_POLICY_SUPPORTED_FORMATS = ... + var ProjectLogger *log.MiniLogger + var QUERY_SUPPORTED_FORMATS = ... + var RESOURCE_LIST_SUPPORTED_FORMATS = ... + var RESOURCE_LIST_TITLES = []string + var SCHEMA_LIST_SUPPORTED_FORMATS = ... + var SCHEMA_LIST_TITLES = []string + var SchemaFiles embed.FS + var VALID_FILTER_KEYS = []string + var VALID_RESOURCE_TYPES = []string + var VALID_RESOURCE_WHERE_FILTER_KEYS = []string + var VALID_SUBCOMMANDS_LICENSE = []string + var VALID_SUBCOMMANDS_RESOURCE = []string + var VALID_USAGE_POLICIES = []string + func AppendLicenseInfo(key string, licenseInfo LicenseInfo) + func ClearGlobalLicenseData() + func ClearGlobalResourceData() + func DisplayLicenseListCSV(output io.Writer) (err error) + func DisplayLicenseListJson(output io.Writer) + func DisplayLicenseListMarkdown(output io.Writer) + func DisplayLicenseListSummaryCSV(output io.Writer) (err error) + func DisplayLicenseListSummaryMarkdown(output io.Writer) + func DisplayLicenseListSummaryText(output io.Writer) + func DisplayLicensePoliciesCSV(output io.Writer) (err error) + func DisplayLicensePoliciesMarkdown(output io.Writer) (err error) + func DisplayLicensePoliciesTabbedText(output io.Writer) (err error) + func DisplayResourceListCSV(output io.Writer) (err error) + func DisplayResourceListMarkdown(output io.Writer) (err error) + func DisplayResourceListText(output io.Writer) + func DisplaySchemasCSV(output io.Writer) (err error) + func DisplaySchemasMarkdown(output io.Writer) (err error) + func DisplaySchemasTabbedText(output io.Writer) (err error) + func ErrorTypesMatch(err error, expected error) bool + func Execute() + func FinalizeCompoundPolicy(expression *CompoundExpression) (err error) + func FormatSchemaErrors(errs []gojsonschema.ResultError) string + func HasLogicalConjunctionOrPreposition(value string) bool + func IsInvalidSBOMError(err error) bool + func IsValidFamilyKey(key string) bool + func IsValidPolicyEntry(policy LicensePolicy) bool + func IsValidSpdxId(id string) bool + func IsValidUsagePolicy(usagePolicy string) bool + func ListLicenses(output io.Writer, format string, summary bool) (err error) + func ListPolicies(writer io.Writer) (err error) + func ListResources(output io.Writer, format string, resourceType string, ...) (err error) + func ListSchemas(writer io.Writer) (err error) + func LoadInputSbomFileAndDetectSchema() (document *schema.Sbom, err error) + func NewCommandLicense() *cobra.Command + func NewCommandList() *cobra.Command + func NewCommandPolicy() *cobra.Command + func NewCommandQuery() *cobra.Command + func NewCommandResource() *cobra.Command + func NewCommandSchema() *cobra.Command + func NewCommandValidate() *cobra.Command + func NewCommandVersion() *cobra.Command + func RootCmdImpl(cmd *cobra.Command, args []string) error + func Validate() (valid bool, document *schema.Sbom, schemaErrors []gojsonschema.ResultError, ...) + func VerifyPoliciesMatch(testPolicy LicensePolicy, policies []interface{}) bool + type BaseError struct + Command string + Details string + Flags string + InnerError error + InputFile string + Message string + Type string + func (base BaseError) AppendMessage(addendum string) + func (err BaseError) Error() string + type CompoundExpression struct + CompoundLeft *CompoundExpression + CompoundRight *CompoundExpression + CompoundUsagePolicy string + Conjunction string + LeftPolicy LicensePolicy + LeftUsagePolicy string + PrepLeft string + PrepRight string + RightPolicy LicensePolicy + RightUsagePolicy string + SimpleLeft string + SimpleLeftHasPlus bool + SimpleRight string + SimpleRightHasPlus bool + func NewCompoundExpression() *CompoundExpression + type InvalidSBOMError struct + FieldKeys []string + SBOM *schema.Sbom + SchemaErrors []gojsonschema.ResultError + func NewInvalidSBOMError(sbom *schema.Sbom, m string, errIn error, ...) *InvalidSBOMError + type LicenseComplianceConfig struct + Annotations map[string]string + PolicyList []LicensePolicy + func (config *LicenseComplianceConfig) GetFamilyNameMap() (hashmap *slicemultimap.MultiMap, err error) + func (config *LicenseComplianceConfig) GetLicenseIdMap() (hashmap *slicemultimap.MultiMap, err error) + func (config *LicenseComplianceConfig) HashLicensePolicies() error + func (config *LicenseComplianceConfig) LoadLicensePolicies(filename string) (err error) + type LicenseInfo struct + Component schema.CDXComponent + EntityName string + EntityRef string + LicenseChoice schema.CDXLicenseChoice + LicenseChoiceType int + LicenseKey string + LicenseLocation int + Policy LicensePolicy + Service schema.CDXService + type LicensePolicy struct + AnnotationRefs []string + Children []string + Family string + Id string + Name string + Notes []string + Urls []string + UsagePolicy string + func FindPolicy(licenseInfo LicenseInfo) (matchedPolicy LicensePolicy, err error) + func FindPolicyByFamilyName(name string) (policyValue string, matchedPolicy LicensePolicy) + func FindPolicyBySpdxId(id string) (policyValue string, matchedPolicy LicensePolicy) + type QueryError struct + func NewQueryError(qr *QueryRequest, m string, d string) *QueryError + func NewQueryFromClauseError(qr *QueryRequest, detail string) *QueryError + func NewQuerySelectClauseError(qr *QueryRequest, detail string) *QueryError + func NewQueryWhereClauseError(qr *QueryRequest, detail string) *QueryError + func (err QueryError) Error() string + type QueryRequest struct + func (qr *QueryRequest) String() string + type QueryResponse struct + func NewQueryResponse() *QueryResponse + type ResourceInfo struct + BomRef string + Component schema.CDXComponent + Name string + Properties []schema.CDXProperty + Service schema.CDXService + SupplierProvider schema.CDXOrganizationalEntity + Type string + Version string + type SBOMCompositionError struct + func NewSBOMCompositionError(m string, sbom *schema.Sbom, fields []string) *SBOMCompositionError + func (err SBOMCompositionError) Error() string + type SBOMLicenseError struct + func IsSBOMLicenseError(err error) (*SBOMLicenseError, bool) + func NewSbomLicenseDataError() *SBOMLicenseError + func NewSbomLicenseNotFoundError(sbom *schema.Sbom) *SBOMLicenseError + type SBOMMetadataError struct + Metadata schema.CDXMetadata + func NewSBOMMetadataError(sbom *schema.Sbom, m string, metadata schema.CDXMetadata) *SBOMMetadataError + type SBOMMetadataPropertyError struct + Actual []schema.CDXProperty + Expected *schema.CustomValidationProperty + func NewSbomMetadataPropertyError(sbom *schema.Sbom, m string, expected *schema.CustomValidationProperty, ...) *SBOMMetadataPropertyError + type UtilityError struct + func NewUtilityError(t string, m string, f string, errIn error) *UtilityError + type WhereFilter struct + Operand string + Value string + ValueRegEx *regexp.Regexp + func (filter *WhereFilter) GetNormalizeKey() (normalizedKey string)