spdx / spdx/spec-parser

Class constraint for Extension class is no longer generated

Open
#207 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
11
Forks
13
PR merge metrics
No merged PRs in 30d

Description

With the current generation of the extension property constraints, I'm having difficulty determining the type from the model file.

In the 3.0.1 version of the model.ttl file, the following is generated for the Extension class:

[ sh:class <https://spdx.org/rdf/3.0.1/terms/Extension/Extension> ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:path ns1:extension ],

This allowed me to determine the type as Extension.

For the 3.1 model, the class constraint was changed to a not condition, but the Extension constraint was removed.

Can we put back the Extension type as an additional constraint?

Here's the 3.1 generated constraint:

[ sh:message "Class is known to not derive from Extension and cannot be used"@en ;
            sh:not [ sh:or ( [ sh:class ns2:RequirementVerification ] [ sh:class ns2:EvidenceRelationship ] [ sh:class ns2:EvaluationResult ] [ sh:class ns4:SsvcVulnAssessmentRelationship ] [ sh:class ns4:CvssV2VulnAssessmentRelationship ] [ sh:class ns4:ExploitCatalogVulnAssessmentRelationship ] [ sh:class ns4:CvssV4VulnAssessmentRelationship ] [ sh:class ns4:VexAffectedVulnAssessmentRelationship ] [ sh:class ns4:VexNotAffectedVulnAssessmentRelationship ] [ sh:class ns4:CvssV3VulnAssessmentRelationship ] [ sh:class ns4:Vulnerability ] [ sh:class ns4:VexUnderInvestigationVulnAssessmentRelationship ] [ sh:class ns4:EpssVulnAssessmentRelationship ] [ sh:class ns4:VexFixedVulnAssessmentRelationship ] [ sh:class ns1:NamespaceMap ] [ sh:class ns1:LifecycleScopedRelationship ] [ sh:class ns1:ElementMap ] [ sh:class ns1:SupportRelationship ] [ sh:class ns1:Hash ] [ sh:class ns1:Agent ] [ sh:class ns1:MeasureOfLength ] [ sh:class ns1:CreationInfo ] [ sh:class ns1:ContactPointRelationship ] [ sh:class ns1:ExternalRef ] [ sh:class ns1:Specification ] [ sh:class ns1:Bom ] [ sh:class ns1:IndividualElement ] [ sh:class ns1:Relationship ] [ sh:class ns1:UnitOfMeasure ] [ sh:class ns1:PositiveIntegerRange ] [ sh:class ns1:DictionaryEntry ] [ sh:class ns1:ExternalMap ] [ sh:class ns1:Annotation ] [ sh:class ns1:DefinedType ] [ sh:class ns1:SpdxDocument ] [ sh:class ns1:Person ] [ sh:class ns1:Organization ] [ sh:class ns1:MeasureOfMass ] [ sh:class ns1:Bundle ] [ sh:class ns1:Tool ] [ sh:class ns1:Requirement ] [ sh:class ns1:ExternalIdentifier ] [ sh:class ns1:SoftwareAgent ] [ sh:class ns1:PackageVerificationCode ] [ sh:class ns1:PhysicalLocation ] [ sh:class ns1:Regulation ] [ sh:class ns5:AIPackage ] [ sh:class ns5:EnergyConsumptionDescription ] [ sh:class ns5:EnergyConsumption ] [ sh:class <https://spdx.org/rdf/3.1/terms/Build/Build> ] [ sh:class ns3:DatasetPackage ] [ sh:class ns9:CustomLicense ] [ sh:class ns9:OrLaterOperator ] [ sh:class ns9:ListedLicense ] [ sh:class ns9:DisjunctiveLicenseSet ] [ sh:class ns9:ListedLicenseException ] [ sh:class ns9:WithAdditionOperator ] [ sh:class ns9:IndividualLicensingInfo ] [ sh:class ns9:CustomLicenseAddition ] [ sh:class ns9:ConjunctiveLicenseSet ] [ sh:class <https://spdx.org/rdf/3.1/terms/SimpleLicensing/LicenseExpression> ] [ sh:class <https://spdx.org/rdf/3.1/terms/SimpleLicensing/SimpleLicensingText> ] [ sh:class <https://spdx.org/rdf/3.1/terms/Extension/CdxPropertyEntry> ] [ sh:class <https://spdx.org/rdf/3.1/terms/Operations/Project> ] [ sh:class <https://spdx.org/rdf/3.1/terms/Operations/ExportControlClassificationAssessment> ] [ sh:class <https://spdx.org/rdf/3.1/terms/Operations/ExportControlClassification> ] [ sh:class ns7:StateAction ] [ sh:class ns7:State ] [ sh:class ns7:AssemblyAction ] [ sh:class ns7:BoundaryDefinitionProcess ] [ sh:class ns7:DestroyProcess ] [ sh:class ns7:ResponsibilityChangeAction ] [ sh:class ns7:PlanAction ] [ sh:class ns7:DestroyAction ] [ sh:class ns7:ChangeAction ] [ sh:class ns7:TransportProcess ] [ sh:class ns7:ResolutionAction ] [ sh:class ns7:TestProcess ] [ sh:class ns7:DefinedStateProcess ] [ sh:class ns7:StorageProcess ] [ sh:class ns7:StorageAction ] [ sh:class ns7:PlanProcess ] [ sh:class ns7:ReproduceAction ] [ sh:class ns7:ReproduceProcess ] [ sh:class ns7:BoundaryCrossingAction ] [ sh:class ns7:InspectionProcess ] [ sh:class ns7:InstantiateVirtualHardwareProcess ] [ sh:class ns7:AssemblyProcess ] [ sh:class ns7:ManufactureProcess ] [ sh:class ns7:BoundaryDefinitionAction ] [ sh:class ns7:OutOfSpecAction ] [ sh:class ns7:ResponsibilityChangeProcess ] [ sh:class ns7:HarvestProcess ] [ sh:class ns7:InspectionAction ] [ sh:class ns7:ChangeProcess ] [ sh:class ns7:ManufactureAction ] [ sh:class ns7:TransportAction ] [ sh:class ns7:HarvestAction ] [ sh:class ns7:TestAction ] [ sh:class ns8:SoftwareService ] [ sh:class ns6:Package ] [ sh:class ns6:File ] [ sh:class ns6:Sbom ] [ sh:class ns6:Snippet ] [ sh:class ns6:ContentIdentifier ] [ sh:class ns10:VirtualHardware ] [ sh:class ns10:Dimensions ] [ sh:class ns10:ProductSpecification ] [ sh:class ns10:PhysicalHardware ] [ sh:class ns10:BulkHardware ] ) ] ;
            sh:path ns1:extension ],

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how the extension property constraints are generated and compare the 3.0.1 and 3.1 model.ttl output shown in the issue. Done means the generated 3.1 constraint retains the Extension class constraint alongside the existing not condition; the payload names no source file or test to run.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.