sbom-cyclonedx 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +15 -0
- data/.gitlab-ci.yml +49 -0
- data/.rspec +3 -0
- data/.rubocop.yml +72 -0
- data/.vscode/settings.json +6 -0
- data/CHANGELOG.md +9 -0
- data/CODE_OF_CONDUCT.md +132 -0
- data/Gemfile +26 -0
- data/Gemfile.lock +179 -0
- data/LICENSE.txt +21 -0
- data/README.md +39 -0
- data/Rakefile +36 -0
- data/Steepfile +14 -0
- data/bin/console +11 -0
- data/bin/rbs_spec +9 -0
- data/bin/setup +8 -0
- data/bom-1.6.schema.json +7334 -0
- data/lib/email_address_extension.rb +26 -0
- data/lib/sbom/cyclone_dx/enum.rb +2178 -0
- data/lib/sbom/cyclone_dx/field.rb +404 -0
- data/lib/sbom/cyclone_dx/pattern.rb +43 -0
- data/lib/sbom/cyclone_dx/record/advisory.rb +17 -0
- data/lib/sbom/cyclone_dx/record/annotation.rb +46 -0
- data/lib/sbom/cyclone_dx/record/attachment.rb +21 -0
- data/lib/sbom/cyclone_dx/record/base.rb +244 -0
- data/lib/sbom/cyclone_dx/record/cipher_suite.rb +23 -0
- data/lib/sbom/cyclone_dx/record/co2_measure.rb +18 -0
- data/lib/sbom/cyclone_dx/record/command.rb +18 -0
- data/lib/sbom/cyclone_dx/record/commit.rb +25 -0
- data/lib/sbom/cyclone_dx/record/component.rb +126 -0
- data/lib/sbom/cyclone_dx/record/component_data.rb +46 -0
- data/lib/sbom/cyclone_dx/record/component_evidence.rb +68 -0
- data/lib/sbom/cyclone_dx/record/component_identity_evidence.rb +36 -0
- data/lib/sbom/cyclone_dx/record/composition.rb +33 -0
- data/lib/sbom/cyclone_dx/record/condition.rb +20 -0
- data/lib/sbom/cyclone_dx/record/copyright.rb +16 -0
- data/lib/sbom/cyclone_dx/record/crypto_properties.rb +137 -0
- data/lib/sbom/cyclone_dx/record/data_governance.rb +21 -0
- data/lib/sbom/cyclone_dx/record/data_governance_responsible_party.rb +22 -0
- data/lib/sbom/cyclone_dx/record/declarations.rb +193 -0
- data/lib/sbom/cyclone_dx/record/definitions.rb +17 -0
- data/lib/sbom/cyclone_dx/record/dependency.rb +21 -0
- data/lib/sbom/cyclone_dx/record/diff.rb +18 -0
- data/lib/sbom/cyclone_dx/record/energy_consumption.rb +31 -0
- data/lib/sbom/cyclone_dx/record/energy_measure.rb +18 -0
- data/lib/sbom/cyclone_dx/record/energy_provider.rb +31 -0
- data/lib/sbom/cyclone_dx/record/environmental_consideration.rb +20 -0
- data/lib/sbom/cyclone_dx/record/event.rb +31 -0
- data/lib/sbom/cyclone_dx/record/external_reference.rb +25 -0
- data/lib/sbom/cyclone_dx/record/fairness_assessment.rb +22 -0
- data/lib/sbom/cyclone_dx/record/formula.rb +29 -0
- data/lib/sbom/cyclone_dx/record/graphic.rb +19 -0
- data/lib/sbom/cyclone_dx/record/graphics_collection.rb +19 -0
- data/lib/sbom/cyclone_dx/record/hash_data.rb +18 -0
- data/lib/sbom/cyclone_dx/record/identifiable_action.rb +21 -0
- data/lib/sbom/cyclone_dx/record/input.rb +34 -0
- data/lib/sbom/cyclone_dx/record/input_output_ml_parameter.rb +17 -0
- data/lib/sbom/cyclone_dx/record/issue.rb +36 -0
- data/lib/sbom/cyclone_dx/record/license.rb +90 -0
- data/lib/sbom/cyclone_dx/record/license_choice.rb +35 -0
- data/lib/sbom/cyclone_dx/record/metadata.rb +55 -0
- data/lib/sbom/cyclone_dx/record/model_card.rb +89 -0
- data/lib/sbom/cyclone_dx/record/note.rb +20 -0
- data/lib/sbom/cyclone_dx/record/organizational_contact.rb +26 -0
- data/lib/sbom/cyclone_dx/record/organizational_entity.rb +28 -0
- data/lib/sbom/cyclone_dx/record/output.rb +34 -0
- data/lib/sbom/cyclone_dx/record/parameter.rb +20 -0
- data/lib/sbom/cyclone_dx/record/patch.rb +23 -0
- data/lib/sbom/cyclone_dx/record/performance_metric.rb +30 -0
- data/lib/sbom/cyclone_dx/record/postal_address.rb +34 -0
- data/lib/sbom/cyclone_dx/record/property.rb +18 -0
- data/lib/sbom/cyclone_dx/record/rating.rb +27 -0
- data/lib/sbom/cyclone_dx/record/release_notes.rb +44 -0
- data/lib/sbom/cyclone_dx/record/resource_reference_choice.rb +22 -0
- data/lib/sbom/cyclone_dx/record/risk.rb +18 -0
- data/lib/sbom/cyclone_dx/record/root.rb +63 -0
- data/lib/sbom/cyclone_dx/record/secured_by.rb +20 -0
- data/lib/sbom/cyclone_dx/record/service.rb +54 -0
- data/lib/sbom/cyclone_dx/record/service_data.rb +32 -0
- data/lib/sbom/cyclone_dx/record/signature.rb +85 -0
- data/lib/sbom/cyclone_dx/record/standard.rb +72 -0
- data/lib/sbom/cyclone_dx/record/step.rb +24 -0
- data/lib/sbom/cyclone_dx/record/swid.rb +29 -0
- data/lib/sbom/cyclone_dx/record/task.rb +56 -0
- data/lib/sbom/cyclone_dx/record/tools.rb +20 -0
- data/lib/sbom/cyclone_dx/record/trigger.rb +48 -0
- data/lib/sbom/cyclone_dx/record/version.rb +24 -0
- data/lib/sbom/cyclone_dx/record/volume.rb +33 -0
- data/lib/sbom/cyclone_dx/record/vulnerability.rb +119 -0
- data/lib/sbom/cyclone_dx/record/vulnerability_source.rb +20 -0
- data/lib/sbom/cyclone_dx/record/workflow.rb +59 -0
- data/lib/sbom/cyclone_dx/record/workspace.rb +45 -0
- data/lib/sbom/cyclone_dx/record.rb +12 -0
- data/lib/sbom/cyclone_dx/validator/array_validator.rb +66 -0
- data/lib/sbom/cyclone_dx/validator/base_validator.rb +43 -0
- data/lib/sbom/cyclone_dx/validator/boolean_validator.rb +16 -0
- data/lib/sbom/cyclone_dx/validator/date_time_validator.rb +29 -0
- data/lib/sbom/cyclone_dx/validator/email_address_validator.rb +31 -0
- data/lib/sbom/cyclone_dx/validator/float_validator.rb +30 -0
- data/lib/sbom/cyclone_dx/validator/integer_validator.rb +30 -0
- data/lib/sbom/cyclone_dx/validator/record_validator.rb +26 -0
- data/lib/sbom/cyclone_dx/validator/string_validator.rb +33 -0
- data/lib/sbom/cyclone_dx/validator/union_validator.rb +39 -0
- data/lib/sbom/cyclone_dx/validator/uri_validator.rb +32 -0
- data/lib/sbom/cyclone_dx/validator.rb +32 -0
- data/lib/sbom/cyclone_dx/version.rb +7 -0
- data/lib/sbom/cyclone_dx.rb +39 -0
- data/rbs_collection.lock.yaml +288 -0
- data/rbs_collection.yaml +31 -0
- data/sbom-cyclone_dx.gemspec +32 -0
- data/sig/email_address_extension.rbs +14 -0
- data/sig/sbom/cyclone_dx/enum.rbs +93 -0
- data/sig/sbom/cyclone_dx/field.rbs +434 -0
- data/sig/sbom/cyclone_dx/pattern.rbs +24 -0
- data/sig/sbom/cyclone_dx/record/advisory.rbs +19 -0
- data/sig/sbom/cyclone_dx/record/annotation.rbs +63 -0
- data/sig/sbom/cyclone_dx/record/attachment.rbs +24 -0
- data/sig/sbom/cyclone_dx/record/base.rbs +62 -0
- data/sig/sbom/cyclone_dx/record/cipher_suite.rbs +24 -0
- data/sig/sbom/cyclone_dx/record/co2_measure.rbs +14 -0
- data/sig/sbom/cyclone_dx/record/command.rbs +19 -0
- data/sig/sbom/cyclone_dx/record/commit.rbs +34 -0
- data/sig/sbom/cyclone_dx/record/component.rbs +203 -0
- data/sig/sbom/cyclone_dx/record/component_data.rbs +73 -0
- data/sig/sbom/cyclone_dx/record/component_evidence.rbs +115 -0
- data/sig/sbom/cyclone_dx/record/component_identity_evidence.rbs +53 -0
- data/sig/sbom/cyclone_dx/record/composition.rbs +39 -0
- data/sig/sbom/cyclone_dx/record/condition.rbs +24 -0
- data/sig/sbom/cyclone_dx/record/copyright.rbs +14 -0
- data/sig/sbom/cyclone_dx/record/crypto_properties.rbs +268 -0
- data/sig/sbom/cyclone_dx/record/data_governance.rbs +24 -0
- data/sig/sbom/cyclone_dx/record/data_governance_responsible_party.rbs +19 -0
- data/sig/sbom/cyclone_dx/record/declarations.rbs +352 -0
- data/sig/sbom/cyclone_dx/record/definitions.rbs +14 -0
- data/sig/sbom/cyclone_dx/record/dependency.rbs +24 -0
- data/sig/sbom/cyclone_dx/record/diff.rbs +19 -0
- data/sig/sbom/cyclone_dx/record/energy_consumption.rbs +39 -0
- data/sig/sbom/cyclone_dx/record/energy_measure.rbs +14 -0
- data/sig/sbom/cyclone_dx/record/energy_provider.rbs +39 -0
- data/sig/sbom/cyclone_dx/record/environmental_consideration.rbs +19 -0
- data/sig/sbom/cyclone_dx/record/event.rbs +44 -0
- data/sig/sbom/cyclone_dx/record/external_reference.rbs +29 -0
- data/sig/sbom/cyclone_dx/record/fairness_assessment.rbs +29 -0
- data/sig/sbom/cyclone_dx/record/formula.rbs +34 -0
- data/sig/sbom/cyclone_dx/record/graphic.rbs +19 -0
- data/sig/sbom/cyclone_dx/record/graphics_collection.rbs +19 -0
- data/sig/sbom/cyclone_dx/record/hash_data.rbs +19 -0
- data/sig/sbom/cyclone_dx/record/identifiable_action.rbs +24 -0
- data/sig/sbom/cyclone_dx/record/input.rbs +44 -0
- data/sig/sbom/cyclone_dx/record/input_output_ml_parameter.rbs +14 -0
- data/sig/sbom/cyclone_dx/record/issue.rbs +53 -0
- data/sig/sbom/cyclone_dx/record/license.rbs +134 -0
- data/sig/sbom/cyclone_dx/record/license_choice.rbs +39 -0
- data/sig/sbom/cyclone_dx/record/metadata.rbs +82 -0
- data/sig/sbom/cyclone_dx/record/model_card.rbs +143 -0
- data/sig/sbom/cyclone_dx/record/note.rbs +19 -0
- data/sig/sbom/cyclone_dx/record/organizational_contact.rbs +29 -0
- data/sig/sbom/cyclone_dx/record/organizational_entity.rbs +34 -0
- data/sig/sbom/cyclone_dx/record/output.rbs +44 -0
- data/sig/sbom/cyclone_dx/record/parameter.rbs +24 -0
- data/sig/sbom/cyclone_dx/record/patch.rbs +24 -0
- data/sig/sbom/cyclone_dx/record/performance_metric.rbs +43 -0
- data/sig/sbom/cyclone_dx/record/postal_address.rbs +44 -0
- data/sig/sbom/cyclone_dx/record/property.rbs +19 -0
- data/sig/sbom/cyclone_dx/record/rating.rbs +39 -0
- data/sig/sbom/cyclone_dx/record/release_notes.rbs +64 -0
- data/sig/sbom/cyclone_dx/record/resource_reference_choice.rbs +19 -0
- data/sig/sbom/cyclone_dx/record/risk.rbs +19 -0
- data/sig/sbom/cyclone_dx/record/root.rbs +84 -0
- data/sig/sbom/cyclone_dx/record/secured_by.rbs +19 -0
- data/sig/sbom/cyclone_dx/record/service.rbs +99 -0
- data/sig/sbom/cyclone_dx/record/service_data.rbs +44 -0
- data/sig/sbom/cyclone_dx/record/signature.rbs +130 -0
- data/sig/sbom/cyclone_dx/record/standard.rbs +132 -0
- data/sig/sbom/cyclone_dx/record/step.rbs +29 -0
- data/sig/sbom/cyclone_dx/record/swid.rbs +44 -0
- data/sig/sbom/cyclone_dx/record/task.rbs +84 -0
- data/sig/sbom/cyclone_dx/record/tools.rbs +19 -0
- data/sig/sbom/cyclone_dx/record/trigger.rbs +69 -0
- data/sig/sbom/cyclone_dx/record/version.rbs +24 -0
- data/sig/sbom/cyclone_dx/record/volume.rbs +49 -0
- data/sig/sbom/cyclone_dx/record/vulnerability.rbs +209 -0
- data/sig/sbom/cyclone_dx/record/vulnerability_source.rbs +19 -0
- data/sig/sbom/cyclone_dx/record/workflow.rbs +94 -0
- data/sig/sbom/cyclone_dx/record/workspace.rbs +69 -0
- data/sig/sbom/cyclone_dx/record.rbs +161 -0
- data/sig/sbom/cyclone_dx/type.rbs +16 -0
- data/sig/sbom/cyclone_dx/validator/array_validator.rbs +31 -0
- data/sig/sbom/cyclone_dx/validator/base_validator.rbs +21 -0
- data/sig/sbom/cyclone_dx/validator/boolean_validator.rbs +9 -0
- data/sig/sbom/cyclone_dx/validator/date_time_validator.rbs +10 -0
- data/sig/sbom/cyclone_dx/validator/email_address_validator.rbs +10 -0
- data/sig/sbom/cyclone_dx/validator/float_validator.rbs +12 -0
- data/sig/sbom/cyclone_dx/validator/integer_validator.rbs +12 -0
- data/sig/sbom/cyclone_dx/validator/record_validator.rbs +12 -0
- data/sig/sbom/cyclone_dx/validator/string_validator.rbs +14 -0
- data/sig/sbom/cyclone_dx/validator/union_validator.rbs +24 -0
- data/sig/sbom/cyclone_dx/validator/uri_validator.rbs +10 -0
- data/sig/sbom/cyclone_dx/validator.rbs +66 -0
- data/sig/sbom/cyclone_dx.rbs +13 -0
- data/sig/types.rbs +45 -0
- data/spec/email_address_extension_spec.rb +27 -0
- data/spec/factories/factory_helper.rb +78 -0
- data/spec/factories/record/advisory_factory.rb +11 -0
- data/spec/factories/record/annotation_factory.rb +63 -0
- data/spec/factories/record/attachment_factory.rb +9 -0
- data/spec/factories/record/cipher_suite_factory.rb +26 -0
- data/spec/factories/record/co2_measure_factory.rb +9 -0
- data/spec/factories/record/command_factory.rb +10 -0
- data/spec/factories/record/commit_factory.rb +13 -0
- data/spec/factories/record/component_data_factory.rb +28 -0
- data/spec/factories/record/component_evidence_factory.rb +44 -0
- data/spec/factories/record/component_factory.rb +102 -0
- data/spec/factories/record/component_identity_evidence_factory.rb +25 -0
- data/spec/factories/record/composition_factory.rb +20 -0
- data/spec/factories/record/condition_factory.rb +11 -0
- data/spec/factories/record/copyright_factory.rb +9 -0
- data/spec/factories/record/crypto_properties_factory.rb +191 -0
- data/spec/factories/record/data_governance_factory.rb +11 -0
- data/spec/factories/record/data_governance_responsible_party_factory.rb +31 -0
- data/spec/factories/record/declarations_factory.rb +145 -0
- data/spec/factories/record/definitions_factory.rb +9 -0
- data/spec/factories/record/dependency_factory.rb +12 -0
- data/spec/factories/record/diff_factory.rb +24 -0
- data/spec/factories/record/energy_consumption_factory.rb +15 -0
- data/spec/factories/record/energy_measure_factory.rb +9 -0
- data/spec/factories/record/energy_provider_factory.rb +15 -0
- data/spec/factories/record/environmental_consideration_factory.rb +10 -0
- data/spec/factories/record/event_factory.rb +15 -0
- data/spec/factories/record/external_reference_factory.rb +13 -0
- data/spec/factories/record/fairness_assessment_factory.rb +12 -0
- data/spec/factories/record/formula_factory.rb +13 -0
- data/spec/factories/record/graphic_factory.rb +10 -0
- data/spec/factories/record/graphics_collection_factory.rb +10 -0
- data/spec/factories/record/hash_data_factory.rb +10 -0
- data/spec/factories/record/identifiable_action_factory.rb +11 -0
- data/spec/factories/record/input_factory.rb +36 -0
- data/spec/factories/record/input_output_ml_parameter_factory.rb +9 -0
- data/spec/factories/record/issue_factory.rb +22 -0
- data/spec/factories/record/license_choice_factory.rb +23 -0
- data/spec/factories/record/license_factory.rb +99 -0
- data/spec/factories/record/metadata_factory.rb +38 -0
- data/spec/factories/record/model_card_factory.rb +59 -0
- data/spec/factories/record/note_factory.rb +11 -0
- data/spec/factories/record/organizational_contact_factory.rb +12 -0
- data/spec/factories/record/organizational_entity_factory.rb +13 -0
- data/spec/factories/record/output_factory.rb +32 -0
- data/spec/factories/record/parameter_factory.rb +11 -0
- data/spec/factories/record/patch_factory.rb +12 -0
- data/spec/factories/record/performance_metric_factory.rb +20 -0
- data/spec/factories/record/postal_address_factory.rb +14 -0
- data/spec/factories/record/property_factory.rb +11 -0
- data/spec/factories/record/rating_factory.rb +14 -0
- data/spec/factories/record/release_notes_factory.rb +20 -0
- data/spec/factories/record/resource_reference_choice_factory.rb +27 -0
- data/spec/factories/record/risk_factory.rb +10 -0
- data/spec/factories/record/root_factory.rb +23 -0
- data/spec/factories/record/secured_by_factory.rb +10 -0
- data/spec/factories/record/service_data_factory.rb +16 -0
- data/spec/factories/record/service_factory.rb +27 -0
- data/spec/factories/record/signature_factory.rb +50 -0
- data/spec/factories/record/standard_factory.rb +37 -0
- data/spec/factories/record/step_factory.rb +12 -0
- data/spec/factories/record/swid_factory.rb +16 -0
- data/spec/factories/record/task_factory.rb +24 -0
- data/spec/factories/record/tools_factory.rb +10 -0
- data/spec/factories/record/trigger_factory.rb +21 -0
- data/spec/factories/record/version_factory.rb +19 -0
- data/spec/factories/record/volume_factory.rb +16 -0
- data/spec/factories/record/vulnerability_factory.rb +70 -0
- data/spec/factories/record/vulnerability_source_factory.rb +10 -0
- data/spec/factories/record/workflow_factory.rb +26 -0
- data/spec/factories/record/workspace_factory.rb +21 -0
- data/spec/factories/record_factory.rb +159 -0
- data/spec/fixtures/cipher_info.yml +948 -0
- data/spec/fixtures/purl_data.yml +0 -0
- data/spec/sbom/cyclone_dx/enum_spec.rb +30 -0
- data/spec/sbom/cyclone_dx/field_spec.rb +104 -0
- data/spec/sbom/cyclone_dx/pattern_spec.rb +18 -0
- data/spec/sbom/cyclone_dx/record/advisory_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/annotation_spec.rb +31 -0
- data/spec/sbom/cyclone_dx/record/attachment_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/base_spec.rb +363 -0
- data/spec/sbom/cyclone_dx/record/cipher_suite_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/co2_measure_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/command_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/commit_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/component_data_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/component_evidence_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/component_identity_evidence_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/component_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/composition_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/condition_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/copyright_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/crypto_properties_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/data_governance_responsible_party_spec.rb +19 -0
- data/spec/sbom/cyclone_dx/record/data_governance_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/declarations_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/definitions_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/dependency_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/diff_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/energy_consumption_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/energy_measure_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/energy_provider_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/environmental_consideration_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/event_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/external_reference_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/fairness_assessment_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/formula_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/graphic_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/graphics_collection_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/hash_data_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/identifiable_action_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/input_output_ml_parameter_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/input_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/issue_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/license_choice_spec.rb +26 -0
- data/spec/sbom/cyclone_dx/record/license_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/metadata_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/model_card_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/note_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/organizational_contact_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/organizational_entity_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/output_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/parameter_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/patch_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/performance_metric_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/postal_address_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/property_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/rating_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/release_notes_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/resource_reference_choice_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/risk_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/root_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/secured_by_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/service_data_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/service_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/signature_spec.rb +26 -0
- data/spec/sbom/cyclone_dx/record/standard_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/step_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/swid_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/task_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/tools_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/trigger_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/version_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/volume_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/vulnerability_source_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/vulnerability_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/workflow_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record/workspace_spec.rb +14 -0
- data/spec/sbom/cyclone_dx/record_spec.rb +7 -0
- data/spec/sbom/cyclone_dx/validator/array_validator_spec.rb +184 -0
- data/spec/sbom/cyclone_dx/validator/base_validator_spec.rb +71 -0
- data/spec/sbom/cyclone_dx/validator/boolean_validator_spec.rb +26 -0
- data/spec/sbom/cyclone_dx/validator/date_time_validator_spec.rb +28 -0
- data/spec/sbom/cyclone_dx/validator/email_address_validator_spec.rb +23 -0
- data/spec/sbom/cyclone_dx/validator/float_validator_spec.rb +71 -0
- data/spec/sbom/cyclone_dx/validator/integer_validator_spec.rb +71 -0
- data/spec/sbom/cyclone_dx/validator/record_validator_spec.rb +35 -0
- data/spec/sbom/cyclone_dx/validator/string_validator_spec.rb +94 -0
- data/spec/sbom/cyclone_dx/validator/union_validator_spec.rb +65 -0
- data/spec/sbom/cyclone_dx/validator/uri_validator_spec.rb +21 -0
- data/spec/sbom/cyclone_dx/validator_spec.rb +38 -0
- data/spec/sbom/cyclone_dx/version_spec.rb +9 -0
- data/spec/sbom/cyclone_dx_spec.rb +7 -0
- data/spec/spec_helper.rb +39 -0
- metadata +377 -6
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "base"
|
4
|
+
|
5
|
+
# Condition - A condition that was used to determine a trigger should be activated.
|
6
|
+
module SBOM
|
7
|
+
module CycloneDX
|
8
|
+
module Record
|
9
|
+
# Schema name: Condition
|
10
|
+
class Condition < Base
|
11
|
+
# Description - Describes the set of conditions which cause the trigger to activate.
|
12
|
+
prop :description, :string
|
13
|
+
# Expression - The logical expression that was evaluated that determined the trigger should be fired.
|
14
|
+
prop :expression, :string
|
15
|
+
# Properties - Provides the ability to document properties in a name-value store. This provides flexibility to include data not officially supported in the standard without having to use additional namespaces or create extensions. Unlike key-value stores, properties support duplicate names, each potentially having different values. Property names of interest to the general public are encouraged to be registered in the [CycloneDX Property Taxonomy](https://github.com/CycloneDX/cyclonedx-property-taxonomy). Formal registration is optional.
|
16
|
+
prop :properties, :array, items: Property
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "base"
|
4
|
+
|
5
|
+
# Copyright - A copyright notice informing users of the underlying claims to copyright ownership in a published work.
|
6
|
+
module SBOM
|
7
|
+
module CycloneDX
|
8
|
+
module Record
|
9
|
+
# Schema name: Copyright
|
10
|
+
class Copyright < Base
|
11
|
+
# Copyright Text - The textual content of the copyright.
|
12
|
+
prop :text, :string, required: true
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,137 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "../enum"
|
4
|
+
require_relative "../pattern"
|
5
|
+
require_relative "base"
|
6
|
+
require_relative "cipher_suite"
|
7
|
+
require_relative "secured_by"
|
8
|
+
|
9
|
+
# Cryptographic Properties - Cryptographic assets have properties that uniquely define them and that make them actionable for further reasoning. As an example, it makes a difference if one knows the algorithm family (e.g. AES) or the specific variant or instantiation (e.g. AES-128-GCM). This is because the security level and the algorithm primitive (authenticated encryption) are only defined by the definition of the algorithm variant. The presence of a weak cryptographic algorithm like SHA1 vs. HMAC-SHA1 also makes a difference.
|
10
|
+
module SBOM
|
11
|
+
module CycloneDX
|
12
|
+
module Record
|
13
|
+
# Schema name: CryptoProperties
|
14
|
+
class CryptoProperties < Base
|
15
|
+
# Schema name: AlgorithmProperties
|
16
|
+
class AlgorithmProperties < Base
|
17
|
+
# primitive - Cryptographic building blocks used in higher-level cryptographic systems and protocols. Primitives represent different cryptographic routines: deterministic random bit generators (drbg, e.g. CTR_DRBG from NIST SP800-90A-r1), message authentication codes (mac, e.g. HMAC-SHA-256), blockciphers (e.g. AES), streamciphers (e.g. Salsa20), signatures (e.g. ECDSA), hash functions (e.g. SHA-256), public-key encryption schemes (pke, e.g. RSA), extended output functions (xof, e.g. SHAKE256), key derivation functions (e.g. pbkdf2), key agreement algorithms (e.g. ECDH), key encapsulation mechanisms (e.g. ML-KEM), authenticated encryption (ae, e.g. AES-GCM) and the combination of multiple algorithms (combiner, e.g. SP800-56Cr2).
|
18
|
+
prop :primitive, :string, enum: Enum::PRIMITIVE
|
19
|
+
# Parameter Set Identifier - An identifier for the parameter set of the cryptographic algorithm. Examples: in AES128, '128' identifies the key length in bits, in SHA256, '256' identifies the digest length, '128' in SHAKE128 identifies its maximum security level in bits, and 'SHA2-128s' identifies a parameter set used in SLH-DSA (FIPS205).
|
20
|
+
prop :parameter_set_identifier, :string
|
21
|
+
# Elliptic Curve - The specific underlying Elliptic Curve (EC) definition employed which is an indicator of the level of security strength, performance and complexity. Absent an authoritative source of curve names, CycloneDX recommends using curve names as defined at [https://neuromancer.sk/std/](https://neuromancer.sk/std/), the source of which can be found at [https://github.com/J08nY/std-curves](https://github.com/J08nY/std-curves).
|
22
|
+
prop :curve, :string
|
23
|
+
# Execution Environment - The target and execution environment in which the algorithm is implemented in.
|
24
|
+
prop :execution_environment, :string, enum: Enum::EXECUTION_ENVIRONMENT
|
25
|
+
# Implementation platform - The target platform for which the algorithm is implemented. The implementation can be 'generic', running on any platform or for a specific platform.
|
26
|
+
prop :implementation_platform, :string, enum: Enum::IMPLEMENTATION_PLATFORM
|
27
|
+
# Certification Level - The certification that the implementation of the cryptographic algorithm has received, if any. Certifications include revisions and levels of FIPS 140 or Common Criteria of different Extended Assurance Levels (CC-EAL).
|
28
|
+
prop :certification_level, :array, items: [:string, enum: Enum::CERTIFICATION_LEVEL]
|
29
|
+
# Mode - The mode of operation in which the cryptographic algorithm (block cipher) is used.
|
30
|
+
prop :mode, :string, enum: Enum::ALGORITHM_MODE
|
31
|
+
# Padding - The padding scheme that is used for the cryptographic algorithm.
|
32
|
+
prop :padding, :string, enum: Enum::PADDING
|
33
|
+
# Cryptographic functions - The cryptographic functions implemented by the cryptographic algorithm.
|
34
|
+
prop :crypto_functions, :array, items: [:string, enum: Enum::CRYPTO_FUNCTION]
|
35
|
+
# classical security level - The classical security level that a cryptographic algorithm provides (in bits).
|
36
|
+
prop :classical_security_level, :integer, minimum: 0
|
37
|
+
# NIST security strength category - The NIST security strength category as defined in https://csrc.nist.gov/projects/post-quantum-cryptography/post-quantum-cryptography-standardization/evaluation-criteria/security-(evaluation-criteria). A value of 0 indicates that none of the categories are met.
|
38
|
+
prop :nist_quantum_security_level, :integer, minimum: 0, maximum: 6
|
39
|
+
end
|
40
|
+
|
41
|
+
# Schema name: CertificateProperties
|
42
|
+
class CertificateProperties < Base
|
43
|
+
# Subject Name - The subject name for the certificate
|
44
|
+
prop :subject_name, :string
|
45
|
+
# Issuer Name - The issuer name for the certificate
|
46
|
+
prop :issuer_name, :string
|
47
|
+
# Not Valid Before - The date and time according to ISO-8601 standard from which the certificate is valid
|
48
|
+
prop :not_valid_before, :date_time
|
49
|
+
# Not Valid After - The date and time according to ISO-8601 standard from which the certificate is not valid anymore
|
50
|
+
prop :not_valid_after, :date_time
|
51
|
+
# Algorithm Reference - The bom-ref to signature algorithm used by the certificate
|
52
|
+
prop :signature_algorithm_ref, :string, pattern: Pattern::REF_LINK
|
53
|
+
# Key reference - The bom-ref to the public key of the subject
|
54
|
+
prop :subject_public_key_ref, :string, pattern: Pattern::REF_LINK
|
55
|
+
# Certificate Format - The format of the certificate
|
56
|
+
# Examples: "X.509", "PEM", "DER", "CVC"
|
57
|
+
prop :certificate_format, :string
|
58
|
+
# Certificate File Extension - The file extension of the certificate
|
59
|
+
# Examples: "crt", "pem", "cer", "der", "p12"
|
60
|
+
prop :certificate_extension, :string
|
61
|
+
end
|
62
|
+
|
63
|
+
# Schema name: ProtocolProperties
|
64
|
+
class ProtocolProperties < Base
|
65
|
+
# Schema name: IKEv2TransformType
|
66
|
+
class IKEv2TransformType < Base
|
67
|
+
# Encryption Algorithm (ENCR) - Transform Type 1: encryption algorithms
|
68
|
+
prop :encr, :array, items: [:string, pattern: Pattern::REF_LINK]
|
69
|
+
# Pseudorandom Function (PRF) - Transform Type 2: pseudorandom functions
|
70
|
+
prop :prf, :array, items: [:string, pattern: Pattern::REF_LINK]
|
71
|
+
# Integrity Algorithm (INTEG) - Transform Type 3: integrity algorithms
|
72
|
+
prop :integ, :array, items: [:string, pattern: Pattern::REF_LINK]
|
73
|
+
# Key Exchange Method (KE) - Transform Type 4: Key Exchange Method (KE) per [RFC 9370](https://www.ietf.org/rfc/rfc9370.html), formerly called Diffie-Hellman Group (D-H).
|
74
|
+
prop :ke, :array, items: [:string, pattern: Pattern::REF_LINK]
|
75
|
+
# Extended Sequence Numbers (ESN) - Specifies if an Extended Sequence Number (ESN) is used.
|
76
|
+
prop :esn, :boolean
|
77
|
+
# IKEv2 Authentication method - IKEv2 Authentication method
|
78
|
+
prop :auth, :array, items: [:string, pattern: Pattern::REF_LINK]
|
79
|
+
end
|
80
|
+
|
81
|
+
# Type - The concrete protocol type.
|
82
|
+
prop :type, :string, enum: Enum::PROTOCOL_TYPE
|
83
|
+
# Protocol Version - The version of the protocol.
|
84
|
+
# Examples: "1.0", "1.2", "1.99"
|
85
|
+
prop :version, :string
|
86
|
+
# Cipher Suites - A list of cipher suites related to the protocol.
|
87
|
+
prop :cipher_suites, :array, items: CipherSuite
|
88
|
+
# IKEv2 Transform Types - The IKEv2 transform types supported (types 1-4), defined in [RFC 7296 section 3.3.2](https://www.ietf.org/rfc/rfc7296.html#section-3.3.2), and additional properties.
|
89
|
+
prop :ikev2_transform_types, IKEv2TransformType
|
90
|
+
# Cryptographic References - A list of protocol-related cryptographic assets
|
91
|
+
prop :crypto_ref_array, :array, items: [:string, pattern: Pattern::REF_LINK]
|
92
|
+
end
|
93
|
+
|
94
|
+
# Schema name: RelatedCryptoMaterialProperties
|
95
|
+
class RelatedCryptoMaterialProperties < Base
|
96
|
+
# relatedCryptoMaterialType - The type for the related cryptographic material
|
97
|
+
prop :type, :string, enum: Enum::RELATED_CRYPTO_MATERIAL_TYPE
|
98
|
+
# ID - The optional unique identifier for the related cryptographic material.
|
99
|
+
prop :id, :string
|
100
|
+
# State - The key state as defined by NIST SP 800-57.
|
101
|
+
prop :state, :string, enum: Enum::RELATED_CRYPTO_MATERIAL_STATE
|
102
|
+
# Algorithm Reference - The bom-ref to the algorithm used to generate the related cryptographic material.
|
103
|
+
prop :algorithm_ref, :string, pattern: Pattern::REF_LINK
|
104
|
+
# Creation Date - The date and time (timestamp) when the related cryptographic material was created.
|
105
|
+
prop :creation_date, :date_time
|
106
|
+
# Activation Date - The date and time (timestamp) when the related cryptographic material was activated.
|
107
|
+
prop :activation_date, :date_time
|
108
|
+
# Update Date - The date and time (timestamp) when the related cryptographic material was updated.
|
109
|
+
prop :update_date, :date_time
|
110
|
+
# Expiration Date - The date and time (timestamp) when the related cryptographic material expires.
|
111
|
+
prop :expiration_date, :date_time
|
112
|
+
# Value - The associated value of the cryptographic material.
|
113
|
+
prop :value, :string
|
114
|
+
# Size - The size of the cryptographic asset (in bits).
|
115
|
+
prop :asset_size, :integer, json_name: "size"
|
116
|
+
# Format - The format of the related cryptographic material (e.g. P8, PEM, DER).
|
117
|
+
prop :format, :string
|
118
|
+
# Secured By - The mechanism by which the cryptographic asset is secured by.
|
119
|
+
prop :secured_by, SecuredBy
|
120
|
+
end
|
121
|
+
|
122
|
+
# Asset Type - Cryptographic assets occur in several forms. Algorithms and protocols are most commonly implemented in specialized cryptographic libraries. They may, however, also be 'hardcoded' in software components. Certificates and related cryptographic material like keys, tokens, secrets or passwords are other cryptographic assets to be modelled.
|
123
|
+
prop :asset_type, :string, enum: Enum::ASSET_TYPE, required: true
|
124
|
+
# Algorithm Properties - Additional properties specific to a cryptographic algorithm.
|
125
|
+
prop :algorithm_properties, AlgorithmProperties
|
126
|
+
# Certificate Properties - Properties for cryptographic assets of asset type 'certificate'
|
127
|
+
prop :certificate_properties, CertificateProperties
|
128
|
+
# Related Cryptographic Material Properties - Properties for cryptographic assets of asset type: `related-crypto-material`
|
129
|
+
prop :related_crypto_material_properties, RelatedCryptoMaterialProperties
|
130
|
+
# Protocol Properties - Properties specific to cryptographic assets of type: `protocol`.
|
131
|
+
prop :protocol_properties, ProtocolProperties
|
132
|
+
# OID - The object identifier (OID) of the cryptographic asset.
|
133
|
+
prop :oid, :string
|
134
|
+
end
|
135
|
+
end
|
136
|
+
end
|
137
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "base"
|
4
|
+
require_relative "data_governance_responsible_party"
|
5
|
+
|
6
|
+
# Data Governance - Data governance captures information regarding data ownership, stewardship, and custodianship, providing insights into the individuals or entities responsible for managing, overseeing, and safeguarding the data throughout its lifecycle.
|
7
|
+
module SBOM
|
8
|
+
module CycloneDX
|
9
|
+
module Record
|
10
|
+
# Schema name: DataGovernance
|
11
|
+
class DataGovernance < Base
|
12
|
+
# Data Custodians - Data custodians are responsible for the safe custody, transport, and storage of data.
|
13
|
+
prop :custodians, :array, items: DataGovernanceResponsibleParty
|
14
|
+
# Data Stewards - Data stewards are responsible for data content, context, and associated business rules.
|
15
|
+
prop :stewards, :array, items: DataGovernanceResponsibleParty
|
16
|
+
# Data Owners - Data owners are concerned with risk and appropriate access to data.
|
17
|
+
prop :owners, :array, items: DataGovernanceResponsibleParty
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "base"
|
4
|
+
require_relative "organizational_entity"
|
5
|
+
require_relative "organizational_contact"
|
6
|
+
|
7
|
+
# Anonymous class from DataGovernanceResponsibleParty
|
8
|
+
module SBOM
|
9
|
+
module CycloneDX
|
10
|
+
module Record
|
11
|
+
# Schema name: DataGovernanceResponsibleParty
|
12
|
+
class DataGovernanceResponsibleParty < Base
|
13
|
+
# Organization - The organization that is responsible for specific data governance role(s).
|
14
|
+
prop :organization, OrganizationalEntity
|
15
|
+
# Individual - The individual that is responsible for specific data governance role(s).
|
16
|
+
prop :contact, OrganizationalContact
|
17
|
+
|
18
|
+
validate :organization, :contact, presence: :any
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,193 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "../pattern"
|
4
|
+
require_relative "base"
|
5
|
+
|
6
|
+
# Declarations - The list of declarations which describe the conformance to standards. Each declaration may include attestations, claims, and evidence.
|
7
|
+
module SBOM
|
8
|
+
module CycloneDX
|
9
|
+
module Record
|
10
|
+
# Schema name: Declarations
|
11
|
+
class Declarations < Base
|
12
|
+
# Schema name: Affirmation
|
13
|
+
class Affirmation < Base
|
14
|
+
# Schema name: Signatory
|
15
|
+
class Signatory < Base
|
16
|
+
# Name - The signatory's name.
|
17
|
+
prop :name, :string
|
18
|
+
# Role - The signatory's role within an organization.
|
19
|
+
prop :role, :string
|
20
|
+
# Signature - Enveloped signature in [JSON Signature Format (JSF)](https://cyberphone.github.io/doc/security/jsf.html).
|
21
|
+
prop :signature, :union, of: Signature::UNION_TYPE
|
22
|
+
# Organization - The signatory's organization.
|
23
|
+
prop :organization, OrganizationalEntity
|
24
|
+
# External Reference - External references provide a way to document systems, sites, and information that may be relevant but are not included with the BOM. They may also establish specific relationships within or external to the BOM.
|
25
|
+
prop :external_reference, ExternalReference
|
26
|
+
|
27
|
+
validate(
|
28
|
+
:signature,
|
29
|
+
:organization,
|
30
|
+
:external_reference,
|
31
|
+
message: "must specify organization and external_reference if signature is not provided"
|
32
|
+
) do |signature, organization, external_reference|
|
33
|
+
signature.nil? && (organization.nil? || external_reference.nil?)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
# Statement - The brief statement affirmed by an individual regarding all declarations.\n*- Notes This could be an affirmation of acceptance by a third-party auditor or receiving individual of a file.
|
38
|
+
# Example: "I certify, to the best of my knowledge, that all information is correct."
|
39
|
+
prop :statement, :string
|
40
|
+
# Signatories - The list of signatories authorized on behalf of an organization to assert validity of this document.
|
41
|
+
prop :signatories, :array, items: Signatory
|
42
|
+
# Signature - Enveloped signature in [JSON Signature Format (JSF)](https://cyberphone.github.io/doc/security/jsf.html).
|
43
|
+
prop :signature, :union, of: Signature::UNION_TYPE
|
44
|
+
end
|
45
|
+
|
46
|
+
# Schema name: Assessor
|
47
|
+
class Assessor < Base
|
48
|
+
# BOM Reference - An optional identifier which can be used to reference the object elsewhere in the BOM. Every bom-ref must be unique within the BOM.
|
49
|
+
prop :bom_ref, :string, pattern: Pattern::REF_LINK, json_name: "bom-ref"
|
50
|
+
# Third Party - The boolean indicating if the assessor is outside the organization generating claims. A value of false indicates a self assessor.
|
51
|
+
prop :third_party, :boolean
|
52
|
+
# Organization - The entity issuing the assessment.
|
53
|
+
prop :organization, OrganizationalEntity
|
54
|
+
end
|
55
|
+
|
56
|
+
# Schema name: Attestation
|
57
|
+
class Attestation < Base
|
58
|
+
# Schema name: Map
|
59
|
+
class Map < Base
|
60
|
+
# Schema name: Confidence
|
61
|
+
class Confidence < Base
|
62
|
+
# Score - The confidence of the claim between and inclusive of 0 and 1, where 1 is 100% confidence.
|
63
|
+
prop :score, :float, minimum: 0, maximum: 1
|
64
|
+
# Rationale - The rationale for the confidence score.
|
65
|
+
prop :rationale, :string
|
66
|
+
end
|
67
|
+
|
68
|
+
# Schema name: Conformance
|
69
|
+
class Conformance < Base
|
70
|
+
# Score - The conformance of the claim between and inclusive of 0 and 1, where 1 is 100% conformance.
|
71
|
+
prop :score, :float, minimum: 0, maximum: 1
|
72
|
+
# Rationale - The rationale for the conformance score.
|
73
|
+
prop :rationale, :string
|
74
|
+
# Mitigation Strategies - The list of `bom-ref` to the evidence provided describing the mitigation strategies.
|
75
|
+
prop :mitigation_strategies, :array, items: [:string, pattern: Pattern::REF_LINK]
|
76
|
+
end
|
77
|
+
|
78
|
+
# Requirement - The `bom-ref` to the requirement being attested to.
|
79
|
+
prop :requirement, :string, pattern: Pattern::REF_LINK
|
80
|
+
# Claims - The list of `bom-ref` to the claims being attested to.
|
81
|
+
prop :claims, :array, items: [:string, pattern: Pattern::REF_LINK]
|
82
|
+
# Counter Claims - The list of `bom-ref` to the counter claims being attested to.
|
83
|
+
prop :counter_claims, :array, items: [:string, pattern: Pattern::REF_LINK]
|
84
|
+
# Conformance - The conformance of the claim meeting a requirement.
|
85
|
+
prop :conformance, Conformance
|
86
|
+
# Confidence - The confidence of the claim meeting the requirement.
|
87
|
+
prop :confidence, Confidence
|
88
|
+
end
|
89
|
+
|
90
|
+
# Summary - The short description explaining the main points of the attestation.
|
91
|
+
prop :summary, :string
|
92
|
+
# Assessor - The `bom-ref` to the assessor asserting the attestation.
|
93
|
+
prop :assessor, :string, pattern: Pattern::REF_LINK
|
94
|
+
# Map - The grouping of requirements to claims and the attestors declared conformance and confidence thereof.
|
95
|
+
prop :requirements_map, :array, items: Map, json_name: "map"
|
96
|
+
# Signature - Enveloped signature in [JSON Signature Format (JSF)](https://cyberphone.github.io/doc/security/jsf.html).
|
97
|
+
prop :signature, :union, of: Signature::UNION_TYPE
|
98
|
+
end
|
99
|
+
|
100
|
+
# Schema name: Claim
|
101
|
+
class Claim < Base
|
102
|
+
# BOM Reference - An optional identifier which can be used to reference the object elsewhere in the BOM. Every bom-ref must be unique within the BOM.
|
103
|
+
prop :bom_ref, :string, pattern: Pattern::REF_LINK, json_name: "bom-ref"
|
104
|
+
# Target - The `bom-ref` to a target representing a specific system, application, API, module, team, person, process, business unit, company, etc... that this claim is being applied to.
|
105
|
+
prop :target, :string, pattern: Pattern::REF_LINK
|
106
|
+
# Predicate - The specific statement or assertion about the target.
|
107
|
+
prop :predicate, :string
|
108
|
+
# Mitigation Strategies - The list of `bom-ref` to the evidence provided describing the mitigation strategies. Each mitigation strategy should include an explanation of how any weaknesses in the evidence will be mitigated.
|
109
|
+
prop :mitigation_strategies, :array, items: [:string, pattern: Pattern::REF_LINK]
|
110
|
+
# Reasoning - The written explanation of why the evidence provided substantiates the claim.
|
111
|
+
prop :reasoning, :string
|
112
|
+
# Evidence - The list of `bom-ref` to evidence that supports this claim.
|
113
|
+
prop :evidence, :array, items: [:string, pattern: Pattern::REF_LINK]
|
114
|
+
# Counter Evidence - The list of `bom-ref` to counterEvidence that supports this claim.
|
115
|
+
prop :counter_evidence, :array, items: [:string, pattern: Pattern::REF_LINK]
|
116
|
+
# External References - External references provide a way to document systems, sites, and information that may be relevant but are not included with the BOM. They may also establish specific relationships within or external to the BOM.
|
117
|
+
prop :external_references, :array, items: ExternalReference
|
118
|
+
# Signature - Enveloped signature in [JSON Signature Format (JSF)](https://cyberphone.github.io/doc/security/jsf.html).
|
119
|
+
prop :signature, :union, of: Signature::UNION_TYPE
|
120
|
+
end
|
121
|
+
|
122
|
+
# Schema name: Evidence
|
123
|
+
class Evidence < Base
|
124
|
+
# Schema name: EvidenceData
|
125
|
+
class EvidenceData < Base
|
126
|
+
# Schema name: Contents
|
127
|
+
class Contents < Base
|
128
|
+
# Data Attachment - An optional way to include textual or encoded data.
|
129
|
+
prop :attachment, Attachment
|
130
|
+
# Data URL - The URL to where the data can be retrieved.
|
131
|
+
prop :url, :uri
|
132
|
+
end
|
133
|
+
|
134
|
+
# Data Name - The name of the data.
|
135
|
+
prop :name, :string
|
136
|
+
# Data Contents - The contents or references to the contents of the data being described.
|
137
|
+
prop :contents, Contents
|
138
|
+
# Data Classification - Data classification tags data according to its type, sensitivity, and value if altered, stolen, or destroyed.
|
139
|
+
prop :classification, :string
|
140
|
+
# Sensitive Data - A description of any sensitive data included.
|
141
|
+
prop :sensitive_data, :array, items: :string
|
142
|
+
# Data Governance - Data governance information.
|
143
|
+
prop :governance, DataGovernance
|
144
|
+
end
|
145
|
+
|
146
|
+
# BOM Reference - An optional identifier which can be used to reference the object elsewhere in the BOM. Every bom-ref must be unique within the BOM.
|
147
|
+
prop :bom_ref, :string, pattern: Pattern::REF_LINK, json_name: "bom-ref"
|
148
|
+
# Property Name - The reference to the property name as defined in the [CycloneDX Property Taxonomy](https://github.com/CycloneDX/cyclonedx-property-taxonomy/).
|
149
|
+
prop :property_name, :string
|
150
|
+
# Description - The written description of what this evidence is and how it was created.
|
151
|
+
prop :description, :string
|
152
|
+
# Data - The output or analysis that supports claims.
|
153
|
+
prop :data, :array, items: EvidenceData
|
154
|
+
# Created - The date and time (timestamp) when the evidence was created.
|
155
|
+
prop :created, :date_time
|
156
|
+
# Expires - The optional date and time (timestamp) when the evidence is no longer valid.
|
157
|
+
prop :expires, :date_time
|
158
|
+
# Author - The author of the evidence.
|
159
|
+
prop :author, OrganizationalContact
|
160
|
+
# Reviewer - The reviewer of the evidence.
|
161
|
+
prop :reviewer, OrganizationalContact
|
162
|
+
# Signature - Enveloped signature in [JSON Signature Format (JSF)](https://cyberphone.github.io/doc/security/jsf.html).
|
163
|
+
prop :signature, :union, of: Signature::UNION_TYPE
|
164
|
+
end
|
165
|
+
|
166
|
+
# Schema name: Target
|
167
|
+
class Target < Base
|
168
|
+
# Organizations - The list of organizations which claims are made against.
|
169
|
+
prop :organizations, :array, items: OrganizationalEntity
|
170
|
+
# Components - The list of components which claims are made against.
|
171
|
+
prop :components, :array, items: Component
|
172
|
+
# Services - The list of services which claims are made against.
|
173
|
+
prop :services, :array, items: Service
|
174
|
+
end
|
175
|
+
|
176
|
+
# Assessors - The list of assessors evaluating claims and determining conformance to requirements and confidence in that assessment.
|
177
|
+
prop :assessors, :array, items: Assessor
|
178
|
+
# Attestations - The list of attestations asserted by an assessor that maps requirements to claims.
|
179
|
+
prop :attestations, :array, items: Attestation
|
180
|
+
# Claims - The list of claims.
|
181
|
+
prop :claims, :array, items: Claim
|
182
|
+
# Evidence - The list of evidence
|
183
|
+
prop :evidence, :array, items: Evidence
|
184
|
+
# Targets - The list of targets which claims are made against.
|
185
|
+
prop :targets, :array, items: Target
|
186
|
+
# Affirmation - A concise statement affirmed by an individual regarding all declarations, often used for third-party auditor acceptance or recipient acknowledgment. It includes a list of authorized signatories who assert the validity of the document on behalf of the organization.
|
187
|
+
prop :affirmation, Affirmation
|
188
|
+
# Signature - Enveloped signature in [JSON Signature Format (JSF)](https://cyberphone.github.io/doc/security/jsf.html)
|
189
|
+
prop :signature, :union, of: Signature::UNION_TYPE
|
190
|
+
end
|
191
|
+
end
|
192
|
+
end
|
193
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "base"
|
4
|
+
require_relative "standard"
|
5
|
+
|
6
|
+
# Definitions - A collection of reusable objects that are defined and may be used elsewhere in the BOM.
|
7
|
+
module SBOM
|
8
|
+
module CycloneDX
|
9
|
+
module Record
|
10
|
+
# Schema name: Definitions
|
11
|
+
class Definitions < Base
|
12
|
+
# Standards - The list of standards which may consist of regulations, industry or organizational-specific standards, maturity models, best practices, or any other requirements which can be evaluated against or attested to.
|
13
|
+
prop :standards, :array, items: Standard
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "../pattern"
|
4
|
+
require_relative "base"
|
5
|
+
|
6
|
+
# Dependency - Defines the direct dependencies of a component, service, or the components provided/implemented by a given component. Components or services that do not have their own dependencies must be declared as empty elements within the graph. Components or services that are not represented in the dependency graph may have unknown dependencies. It is recommended that implementations assume this to be opaque and not an indicator of an object being dependency-free. It is recommended to leverage compositions to indicate unknown dependency graphs.
|
7
|
+
module SBOM
|
8
|
+
module CycloneDX
|
9
|
+
module Record
|
10
|
+
# Schema name: Dependency
|
11
|
+
class Dependency < Base
|
12
|
+
# Reference - References a component or service by its bom-ref attribute
|
13
|
+
prop :ref, :string, pattern: Pattern::REF_LINK, required: true
|
14
|
+
# Depends On - The bom-ref identifiers of the components or services that are dependencies of this dependency object.
|
15
|
+
prop :depends_on, :array, items: [:string, pattern: Pattern::REF_LINK], unique: true
|
16
|
+
# Provides - The bom-ref identifiers of the components or services that define a given specification or standard, which are provided or implemented by this dependency object. For example, a cryptographic library which implements a cryptographic algorithm. A component which implements another component does not imply that the implementation is in use.
|
17
|
+
prop :provides, :array, items: [:string, pattern: Pattern::REF_LINK], unique: true
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "base"
|
4
|
+
|
5
|
+
# Diff - The patch file (or diff) that shows changes. Refer to https://en.wikipedia.org/wiki/Diff
|
6
|
+
module SBOM
|
7
|
+
module CycloneDX
|
8
|
+
module Record
|
9
|
+
# Schema name: Diff
|
10
|
+
class Diff < Base
|
11
|
+
# Diff text - Specifies the optional text of the diff
|
12
|
+
prop :text, Attachment
|
13
|
+
# URL - Specifies the URL to the diff
|
14
|
+
prop :url, :uri
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "../enum"
|
4
|
+
require_relative "base"
|
5
|
+
require_relative "energy_provider"
|
6
|
+
require_relative "energy_measure"
|
7
|
+
require_relative "co2_measure"
|
8
|
+
require_relative "property"
|
9
|
+
|
10
|
+
# Energy consumption - Describes energy consumption information incurred for the specified lifecycle activity.
|
11
|
+
module SBOM
|
12
|
+
module CycloneDX
|
13
|
+
module Record
|
14
|
+
# Schema name: EnergyConsumption
|
15
|
+
class EnergyConsumption < Base
|
16
|
+
# Activity - The type of activity that is part of a machine learning model development or operational lifecycle.
|
17
|
+
prop :activity, :string, enum: Enum::ACTIVITY, required: true
|
18
|
+
# Energy Providers - The provider(s) of the energy consumed by the associated model development lifecycle activity.
|
19
|
+
prop :energy_providers, :array, items: EnergyProvider, required: true
|
20
|
+
# Activity Energy Cost - The total energy cost associated with the model lifecycle activity.
|
21
|
+
prop :activity_energy_cost, EnergyMeasure, required: true
|
22
|
+
# CO2 Equivalent Cost - The CO2 cost (debit) equivalent to the total energy cost.
|
23
|
+
prop :co2_cost_equivalent, CO2Measure
|
24
|
+
# CO2 Cost Offset - The CO2 offset (credit) for the CO2 equivalent cost.
|
25
|
+
prop :co2_cost_offset, CO2Measure
|
26
|
+
# Properties - Provides the ability to document properties in a name-value store. This provides flexibility to include data not officially supported in the standard without having to use additional namespaces or create extensions. Unlike key-value stores, properties support duplicate names, each potentially having different values. Property names of interest to the general public are encouraged to be registered in the [CycloneDX Property Taxonomy](https://github.com/CycloneDX/cyclonedx-property-taxonomy). Formal registration is optional.
|
27
|
+
prop :properties, :array, items: Property
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "base"
|
4
|
+
|
5
|
+
# Energy Measure - A measure of energy.
|
6
|
+
module SBOM
|
7
|
+
module CycloneDX
|
8
|
+
module Record
|
9
|
+
# Schema name: EnergyMeasure
|
10
|
+
class EnergyMeasure < Base
|
11
|
+
# Value - Quantity of energy.
|
12
|
+
prop :value, :float, required: true
|
13
|
+
# Unit - Unit of energy, currently specified as a const "kWh".
|
14
|
+
const :unit, :string, "kWh"
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "../enum"
|
4
|
+
require_relative "../pattern"
|
5
|
+
require_relative "base"
|
6
|
+
require_relative "external_reference"
|
7
|
+
require_relative "energy_measure"
|
8
|
+
require_relative "organizational_entity"
|
9
|
+
|
10
|
+
# Energy Provider - Describes the physical provider of energy used for model development or operations.
|
11
|
+
module SBOM
|
12
|
+
module CycloneDX
|
13
|
+
module Record
|
14
|
+
# Schema name: EnergyProvider
|
15
|
+
class EnergyProvider < Base
|
16
|
+
# BOM Reference - An optional identifier which can be used to reference the energy provider elsewhere in the BOM. Every bom-ref must be unique within the BOM. Value SHOULD not start with the BOM-Link intro 'urn:cdx:' to avoid conflicts with BOM-Links.
|
17
|
+
prop :bom_ref, :string, pattern: Pattern::REF_LINK, json_name: "bom-ref"
|
18
|
+
# Description - A description of the energy provider.
|
19
|
+
prop :description, :string
|
20
|
+
# Organization - The organization that provides energy.
|
21
|
+
prop :organization, OrganizationalEntity, required: true
|
22
|
+
# Energy Source - The energy source for the energy provider.
|
23
|
+
prop :energy_source, :string, enum: Enum::ENERGY_SOURCE, required: true
|
24
|
+
# Energy Provided - The energy provided by the energy source for an associated activity.
|
25
|
+
prop :energy_provided, EnergyMeasure, required: true
|
26
|
+
# External References - External references provide a way to document systems, sites, and information that may be relevant but are not included with the BOM. They may also establish specific relationships within or external to the BOM.
|
27
|
+
prop :external_references, :array, items: ExternalReference
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "base"
|
4
|
+
require_relative "energy_consumption"
|
5
|
+
require_relative "property"
|
6
|
+
|
7
|
+
# Environmental Considerations - Describes various environmental impact metrics.
|
8
|
+
module SBOM
|
9
|
+
module CycloneDX
|
10
|
+
module Record
|
11
|
+
# Schema name: EnvironmentalConsideration
|
12
|
+
class EnvironmentalConsideration < Base
|
13
|
+
# Energy Consumptions - Describes energy consumption information incurred for one or more component lifecycle activities.
|
14
|
+
prop :energy_consumptions, :array, items: EnergyConsumption
|
15
|
+
# Properties - Provides the ability to document properties in a name-value store. This provides flexibility to include data not officially supported in the standard without having to use additional namespaces or create extensions. Unlike key-value stores, properties support duplicate names, each potentially having different values. Property names of interest to the general public are encouraged to be registered in the [CycloneDX Property Taxonomy](https://github.com/CycloneDX/cyclonedx-property-taxonomy). Formal registration is optional.
|
16
|
+
prop :properties, :array, items: Property
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "base"
|
4
|
+
require_relative "attachment"
|
5
|
+
require_relative "property"
|
6
|
+
require_relative "resource_reference_choice"
|
7
|
+
|
8
|
+
# Event - Represents something that happened that may trigger a response.
|
9
|
+
module SBOM
|
10
|
+
module CycloneDX
|
11
|
+
module Record
|
12
|
+
# Schema name: Event
|
13
|
+
class Event < Base
|
14
|
+
# Unique Identifier (UID) - The unique identifier of the event.
|
15
|
+
prop :uid, :string
|
16
|
+
# Description - A description of the event.
|
17
|
+
prop :description, :string
|
18
|
+
# Time Received - The date and time (timestamp) when the event was received.
|
19
|
+
prop :time_received, :date_time
|
20
|
+
# Data - Encoding of the raw event data.
|
21
|
+
prop :data, Attachment
|
22
|
+
# Source - References the component or service that was the source of the event
|
23
|
+
prop :source, ResourceReferenceChoice
|
24
|
+
# Target - References the component or service that was the target of the event
|
25
|
+
prop :target, ResourceReferenceChoice
|
26
|
+
# Properties - Provides the ability to document properties in a name-value store. This provides flexibility to include data not officially supported in the standard without having to use additional namespaces or create extensions. Unlike key-value stores, properties support duplicate names, each potentially having different values. Property names of interest to the general public are encouraged to be registered in the [CycloneDX Property Taxonomy](https://github.com/CycloneDX/cyclonedx-property-taxonomy). Formal registration is optional.
|
27
|
+
prop :properties, :array, items: Property
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "../enum"
|
4
|
+
require_relative "../pattern"
|
5
|
+
require_relative "base"
|
6
|
+
require_relative "hash_data"
|
7
|
+
|
8
|
+
# External Reference - External references provide a way to document systems, sites, and information that may be relevant but are not included with the BOM. They may also establish specific relationships within or external to the BOM.
|
9
|
+
module SBOM
|
10
|
+
module CycloneDX
|
11
|
+
module Record
|
12
|
+
# Schema name: ExternalReference
|
13
|
+
class ExternalReference < Base
|
14
|
+
# URL - The URI (URL or URN) to the external reference. External references are URIs and therefore can accept any URL scheme including https ([RFC-7230](https://www.ietf.org/rfc/rfc7230.txt)), mailto ([RFC-2368](https://www.ietf.org/rfc/rfc2368.txt)), tel ([RFC-3966](https://www.ietf.org/rfc/rfc3966.txt)), and dns ([RFC-4501](https://www.ietf.org/rfc/rfc4501.txt)). External references may also include formally registered URNs such as [CycloneDX BOM-Link](https://cyclonedx.org/capabilities/bomlink/) to reference CycloneDX BOMs or any object within a BOM. BOM-Link transforms applicable external references into relationships that can be expressed in a BOM or across BOMs.
|
15
|
+
prop :url, :union, of: [:uri, [:string, pattern: Pattern::CDX_URN]], required: true
|
16
|
+
# Comment - An optional comment describing the external reference
|
17
|
+
prop :comment, :string
|
18
|
+
# Type - Specifies the type of external reference.
|
19
|
+
prop :type, :string, enum: Enum::EXTERNAL_REFERENCE_TYPE, required: true
|
20
|
+
# Hashes - The hashes of the external reference (if applicable).
|
21
|
+
prop :hashes, :array, items: HashData
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|