For information on what can be included in an SPDX serialization and how they are structured, please refer to the Serialization information section in the "Model and serializations" chapter of the SPDX specification.
The specification Markdown files describing rules for each serialization format will contain an SpdxDocument section describing how each of the properties of SpdxDocument are serialized for the given serialization format.
The specification and examples are numbered for easier referencing -- the order is not significant.
Current supported formats are:
Examples of how to serialize the following cases:
AgentAnnotationBundleBundleof twoPersons
FilePackagePackagewithExternalIdentifierPackagewithExternalRef
PersonPersonwith fullCreationInfoPersonwith noCreationInfoPersonwith minimalCreationInfo- Two
Persons
RelationshipRelationshipwithPackagecontains twoFilesRelationshipwith time properties
Sbomwith twoFilesSpdxDocumentSpdxDocumentwithExternalMapSpdxDocumentwithNamespaceMapSpdxDocumentwith twoFiles
- Single
Artifactunder oneListedLicense - Single
Artifactunder oneCustomLicense - Single
Artifactunder license expression ofListedLicenses - Single
Artifactunder license expression ofListedLicenseandCustomLicense - Two
Artifacts under same license expression ofListedLicenseandCustomLicense
The following list begins with base examples and sequentially adds expositional elements and relationships step-by-step:
- An initial set of vulnerability elements
- Adding vulnerability elements with security external reference types
including
securityFix,vulnerabilityDisclosureReport, andvulnerabilityExploitabilityAssessment - Adding
hasAssociatedVulnerabilityrelationship between a vulnerability element and a software profile element - Adding multiple
hasAssessmentForrelationships for vulnerability assessment relationships between vulnerability element and package element for VEX, CVSS, etc. to communicate, e.g.,- Changes to a vulnerability element’s status affecting a specific package element using VEX (Vulnerability Exploitability eXchange) (see the serialized examples listed in Example under each vulnerability assessment relationship class definition)
- How a vulnerability element may be fixed for a particular software package element
- Results of a vulnerability scan or audit
- Adding
foundBy,publishedBy,reportedByrelationships between an agent element and a vulnerability element