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

feat(spec1-5): add new component types #100

Merged
merged 1 commit into from
Jun 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,8 @@ func (sv SpecVersion) supportsComponentType(cType ComponentType) bool {
return sv >= SpecVersion1_1
case ComponentTypeContainer, ComponentTypeFirmware:
return sv >= SpecVersion1_2
case ComponentTypeData, ComponentTypeDeviceDriver, ComponentTypeMachineLearningModel, ComponentTypePlatform:
return sv >= SpecVersion1_5
}

return false
Expand Down
20 changes: 12 additions & 8 deletions cyclonedx.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,18 @@ type BOMReference string
type ComponentType string

const (
ComponentTypeApplication ComponentType = "application"
ComponentTypeContainer ComponentType = "container"
ComponentTypeDevice ComponentType = "device"
ComponentTypeFile ComponentType = "file"
ComponentTypeFirmware ComponentType = "firmware"
ComponentTypeFramework ComponentType = "framework"
ComponentTypeLibrary ComponentType = "library"
ComponentTypeOS ComponentType = "operating-system"
ComponentTypeApplication ComponentType = "application"
ComponentTypeContainer ComponentType = "container"
ComponentTypeData ComponentType = "data"
ComponentTypeDevice ComponentType = "device"
ComponentTypeDeviceDriver ComponentType = "device-driver"
ComponentTypeFile ComponentType = "file"
ComponentTypeFirmware ComponentType = "firmware"
ComponentTypeFramework ComponentType = "framework"
ComponentTypeLibrary ComponentType = "library"
ComponentTypeMachineLearningModel ComponentType = "machine-learning-model"
ComponentTypeOS ComponentType = "operating-system"
ComponentTypePlatform ComponentType = "platform"
)

type Commit struct {
Expand Down