Skip to content

Commit

Permalink
feat(spec1-5): add support for adversary-model and `risk-assessment…
Browse files Browse the repository at this point in the history
…` external ref types

Signed-off-by: nscuro <nscuro@protonmail.com>
  • Loading branch information
nscuro committed Jun 17, 2023
1 parent 7be18ae commit cb23c44
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 4 additions & 4 deletions convert.go
Expand Up @@ -323,10 +323,10 @@ func (sv SpecVersion) supportsComponentType(cType ComponentType) bool {

func (sv SpecVersion) supportsExternalReferenceType(ert ExternalReferenceType) bool {
switch ert {
case ERTypeAttestation, ERTypeCertificationReport, ERTypeCodifiedInfrastructure, ERTypeComponentAnalysisReport,
ERTypeDistributionIntake, ERTypeDynamicAnalysisReport, ERTypeExploitabilityStatement, ERTypeMaturityReport,
ERTypePentestReport, ERTypeQualityMetrics, ERTypeRuntimeAnalysisReport, ERTypeStaticAnalysisReport,
ERTypeThreatModel, ERTypeVulnerabilityAssertion:
case ERTypeAdversaryModel, ERTypeAttestation, ERTypeCertificationReport, ERTypeCodifiedInfrastructure,
ERTypeComponentAnalysisReport, ERTypeDistributionIntake, ERTypeDynamicAnalysisReport, ERTypeExploitabilityStatement,
ERTypeMaturityReport, ERTypePentestReport, ERTypeQualityMetrics, ERTypeRiskAssessment, ERTypeRuntimeAnalysisReport,
ERTypeStaticAnalysisReport, ERTypeThreatModel, ERTypeVulnerabilityAssertion:
return sv >= SpecVersion1_5
}

Expand Down
2 changes: 2 additions & 0 deletions cyclonedx.go
Expand Up @@ -214,6 +214,7 @@ type ExternalReference struct {
type ExternalReferenceType string

const (
ERTypeAdversaryModel ExternalReferenceType = "adversary-model"
ERTypeAdvisories ExternalReferenceType = "advisories"
ERTypeAttestation ExternalReferenceType = "attestation"
ERTypeBOM ExternalReferenceType = "bom"
Expand All @@ -236,6 +237,7 @@ const (
ERTypePentestReport ExternalReferenceType = "pentest-report"
ERTypeQualityMetrics ExternalReferenceType = "quality-metrics"
ERTypeReleaseNotes ExternalReferenceType = "release-notes"
ERTypeRiskAssessment ExternalReferenceType = "risk-assessment"
ERTypeRuntimeAnalysisReport ExternalReferenceType = "runtime-analysis-report"
ERTypeSecurityContact ExternalReferenceType = "security-contact"
ERTypeSocial ExternalReferenceType = "social"
Expand Down

0 comments on commit cb23c44

Please sign in to comment.