<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:media="http://search.yahoo.com/mrss/"><channel><title>Spdx Security Profile | FirewallSync</title><link>https://firewallsync.com/tags/spdx-security-profile/</link><description>Practical cybersecurity writing for engineering teams that ship fast.</description><language>en-us</language><image><url>https://firewallsync.com/icon-512.png</url><title>FirewallSync</title><link>https://firewallsync.com/</link></image><lastBuildDate>Sun, 29 Nov 2026 04:45:00 +0000</lastBuildDate><atom:link href="https://firewallsync.com/tags/spdx-security-profile/index.xml" rel="self" type="application/rss+xml"/><item><title>SPDX 3.0.1 Security Profile: CVSS, EPSS, KEV, SSVC, VEX</title><link>https://firewallsync.com/posts/spdx-3-security-profile-cvss-epss-kev-ssvc-vex-json-ld/</link><guid>https://firewallsync.com/posts/spdx-3-security-profile-cvss-epss-kev-ssvc-vex-json-ld/</guid><pubDate>Sun, 29 Nov 2026 04:45:00 +0000</pubDate><dc:creator>John Marshall</dc:creator><category>AppSec &amp; APIs</category><description>SPDX 3.0.1 models vulnerability data as typed assessment relationships: CVSS v2/v3/v4, EPSS, an exploit catalog (KEV), SSVC and four VEX states. The required fields for each class, how they serialize in JSON-LD, what the spdx-python-model bindings do and do not check, and why CISA-ADP SSVC data does not fit decisionType.</description><content:encoded><![CDATA[<p><strong>Short answer:</strong> SPDX 3.0.1 does not attach vulnerability data to packages as loose properties. Each signal is a <strong>typed relationship</strong> from a <code>security_Vulnerability</code> element to the software it applies to: <code>CvssV3VulnAssessmentRelationship</code> for a CVSS score, <code>EpssVulnAssessmentRelationship</code> for EPSS, <code>ExploitCatalogVulnAssessmentRelationship</code> for KEV, <code>SsvcVulnAssessmentRelationship</code> for an SSVC decision, and four VEX classes for status. Below are the required fields for each, real JSON-LD built from CVE-2023-3519, and the checks you still need after the official Python bindings accept your document.</p>
<p>If you are new to the signals themselves, start with <a href="/posts/cvss-vs-epss-vs-kev-which-signal-should-decide-what-you-patch-first/">CVSS vs EPSS vs KEV</a> and <a href="/posts/vex-explained-what-a-not-affected-statement-means-and-how-to-read-one/">VEX not_affected statements</a>. This post is about carrying them inside an SBOM, which is the hand-off point in the <a href="/posts/vulnerability-prioritization-workflow-cve-record-to-patch-ticket/">CVE-record-to-ticket workflow</a>.</p>
<h2 id="version-and-sources">Version and sources</h2>
<ul>
<li><strong>Model:</strong> <code>spdx/spdx-3-model</code> at tag <strong>3.0.1</strong> (commit a745f63, December 12, 2024), directory <code>model/Security/</code>. The rendered pages are on the <a href="https://spdx.github.io/spdx-spec/v3.0.1/model/Security/Classes/EpssVulnAssessmentRelationship">SPDX 3.0.1 spec site</a>. A <strong>3.1-rc1</strong> tag exists; <code>main</code> (last commit November 25, 2026) differs mainly in wording (&ldquo;must&rdquo; became &ldquo;shall&rdquo;) and in corrected examples. Nothing below relies on 3.1.</li>
<li><strong>Bindings:</strong> <code>spdx-python-model</code> 0.0.6 from PyPI, module <code>v3_0_1</code>.</li>
<li><strong>Input data:</strong> cvelistV5 record for CVE-2023-3519, KEV catalog 2026.11.27, EPSS daily file for 2026-11-28 (model v2026.06.15) from <code>empiricalsec/epss_scores</code>.</li>
</ul>
<h2 id="the-13-classes-and-what-each-requires">The 13 classes and what each requires</h2>
<p>All assessment classes inherit from <code>VulnAssessmentRelationship</code>, which adds optional <code>assessedElement</code>, <code>suppliedBy</code>, <code>publishedTime</code>, <code>modifiedTime</code> and <code>withdrawnTime</code>. The table lists each class&rsquo;s own properties with their 3.0.1 cardinality.</p>
<table>
  <thead>
      <tr>
          <th>Class</th>
          <th>relationshipType</th>
          <th>Required (1..1)</th>
          <th>Optional</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td><code>CvssV2VulnAssessmentRelationship</code></td>
          <td>hasAssessmentFor</td>
          <td>score, vectorString</td>
          <td></td>
      </tr>
      <tr>
          <td><code>CvssV3VulnAssessmentRelationship</code></td>
          <td>hasAssessmentFor</td>
          <td>score, severity, vectorString</td>
          <td></td>
      </tr>
      <tr>
          <td><code>CvssV4VulnAssessmentRelationship</code></td>
          <td>hasAssessmentFor</td>
          <td>score, severity, vectorString</td>
          <td></td>
      </tr>
      <tr>
          <td><code>EpssVulnAssessmentRelationship</code></td>
          <td>hasAssessmentFor</td>
          <td>probability, percentile, <strong>publishedTime</strong> (restricted to 1)</td>
          <td></td>
      </tr>
      <tr>
          <td><code>ExploitCatalogVulnAssessmentRelationship</code></td>
          <td>hasAssessmentFor</td>
          <td>catalogType, exploited, locator</td>
          <td></td>
      </tr>
      <tr>
          <td><code>SsvcVulnAssessmentRelationship</code></td>
          <td>hasAssessmentFor</td>
          <td>decisionType</td>
          <td></td>
      </tr>
      <tr>
          <td><code>VexAffectedVulnAssessmentRelationship</code></td>
          <td>affects</td>
          <td>actionStatement</td>
          <td>actionStatementTime, vexVersion, statusNotes</td>
      </tr>
      <tr>
          <td><code>VexNotAffectedVulnAssessmentRelationship</code></td>
          <td>doesNotAffect</td>
          <td>one of justificationType / impactStatement (see below)</td>
          <td>impactStatementTime, vexVersion, statusNotes</td>
      </tr>
      <tr>
          <td><code>VexFixedVulnAssessmentRelationship</code></td>
          <td>fixedIn</td>
          <td></td>
          <td>vexVersion, statusNotes</td>
      </tr>
      <tr>
          <td><code>VexUnderInvestigationVulnAssessmentRelationship</code></td>
          <td>underInvestigationFor</td>
          <td></td>
          <td>vexVersion, statusNotes</td>
      </tr>
  </tbody>
</table>
<p>The remaining three are <code>Vulnerability</code> (the CVE itself, with optional published/modified/withdrawn times), and the abstract parents <code>VulnAssessmentRelationship</code> and <code>VexVulnAssessmentRelationship</code>.</p>
<p>Vocabularies are closed:</p>
<ul>
<li><strong>CvssSeverityType:</strong> <code>critical</code>, <code>high</code>, <code>medium</code>, <code>low</code>, <code>none</code>, defined by the usual CVSS score bands (9.0-10.0 critical, and so on).</li>
<li><strong>ExploitCatalogType:</strong> <code>kev</code> (&ldquo;CISA&rsquo;s Known Exploited Vulnerability (KEV) Catalog&rdquo;) and <code>other</code>.</li>
<li><strong>SsvcDecisionType:</strong> <code>act</code>, <code>attend</code>, <code>track</code>, <code>trackStar</code>.</li>
<li><strong>VexJustificationType:</strong> <code>componentNotPresent</code>, <code>vulnerableCodeNotPresent</code>, <code>vulnerableCodeCannotBeControlledByAdversary</code>, <code>vulnerableCodeNotInExecutePath</code>, <code>inlineMitigationsAlreadyExist</code>. These are the same five justifications used by OpenVEX and CSAF, in camelCase (see the <a href="/posts/cyclonedx-vex-analysis-state-justification-openvex-csaf-mapping/">CycloneDX/OpenVEX/CSAF mapping</a>).</li>
</ul>
<p>For not_affected, the model makes both <code>justificationType</code> and <code>impactStatement</code> optional (0..1) but states: &ldquo;to produce a valid VEX not_affected statement, one of them MUST be defined. This is specified in the Minimum Elements for VEX.&rdquo; That rule lives in prose, not in the cardinality.</p>
<h2 id="how-each-feed-maps-and-what-it-loses">How each feed maps, and what it loses</h2>
<p><strong>CVSS.</strong> One relationship per version. The CVE record&rsquo;s <code>baseScore</code>, <code>baseSeverity</code> (lowercased) and <code>vectorString</code> map one to one. There is no place for the metric&rsquo;s source or for CVSS v4 threat or supplemental context beyond what the vector string holds, so if both the CNA and CISA-ADP scored a CVE, emit two relationships and set <code>suppliedBy</code> to tell them apart.</p>
<p><strong>EPSS.</strong> <code>probability</code> and <code>percentile</code> map from the <code>epss</code> and <code>percentile</code> columns, and <code>publishedTime</code> is required, so put the file&rsquo;s <code>score_date</code> there. There is no <code>model_version</code> field. Since EPSS v5 shifted scores across the board (<a href="/posts/epss-v5-score-shift-model-version-v2026-06-15/">EPSS v5 score shift</a>), record the model version in <code>comment</code> or keep the source file.</p>
<p><strong>KEV.</strong> <code>catalogType</code> <code>kev</code>, <code>exploited</code> <code>true</code>, <code>locator</code> a URI. The model describes <code>exploited</code> only as &ldquo;set when a CVE is listed in an exploit catalog&rdquo; and <code>locator</code> as &ldquo;the location of an exploit catalog&rdquo;. KEV&rsquo;s <code>dateAdded</code>, <code>dueDate</code>, <code>knownRansomwareCampaignUse</code> and <code>requiredAction</code> have no properties of their own (field meanings: <a href="/posts/cisa-kev-json-feed-what-each-field-means-and-how-to-match-it-against-a-scanner-export/">KEV JSON feed</a>). We put <code>dateAdded</code> in <code>publishedTime</code>; that is our convention, not the spec&rsquo;s.</p>
<p><strong>SSVC.</strong> The class description says it &ldquo;is intended to communicate the results of using the CISA SSVC Calculator&rdquo;, and its one property is the decision. CISA-ADP does not publish a decision. For CVE-2023-3519 the CISA-ADP container holds only the points <code>Exploitation: active</code>, <code>Automatable: no</code>, <code>Technical Impact: total</code> (SSVC 2.0.3). To fill <code>decisionType</code> you must add your own Mission and Well-being input and run a deployer tree (<a href="/posts/cisa-vulnrichment-how-to-read-ssvc-values-in-a-cve-record-and-turn-them-into-a-patch-decision/">how to read Vulnrichment SSVC</a>, <a href="/posts/bod-26-04-decision-table-ssvc-json-lookup/">the BOD 26-04 decision table</a>). The points themselves cannot be carried in a typed field.</p>
<p><strong>VEX.</strong> <code>from</code> must be the Vulnerability; <code>to</code> points at the products; <code>assessedElement</code> can name the subcomponent where the vulnerability was found. The model also says VEX &ldquo;inherits information from the document level down to its statements&rdquo;: a statement without its own author or date takes the document&rsquo;s <code>CreationInfo</code>.</p>
<h2 id="json-ld-built-from-a-real-cve">JSON-LD built from a real CVE</h2>
<p>The script below reads the CVE-2023-3519 record, KEV and an EPSS file, and writes an SPDX 3.0.1 document with CVSS v3.1, EPSS and KEV assessments. Tested with Python 3.13 and <code>spdx-python-model==0.0.6</code>. The package and its purl are placeholders; replace them with an element from your own SBOM.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-python" data-lang="python"><span style="display:flex;"><span><span style="color:#e6db74">&#34;&#34;&#34;Build SPDX 3.0.1 Security-profile assessments for one CVE from public feeds.
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">Inputs: a cvelistV5 record, the CISA KEV JSON, an EPSS daily CSV (gz). Requires: pip install spdx-python-model==0.0.6
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">Usage: python cve_to_spdx_security.py CVE.json kev.json epss.csv.gz PURL &gt; out.spdx.json&#34;&#34;&#34;</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">import</span> sys<span style="color:#f92672">,</span> json<span style="color:#f92672">,</span> gzip<span style="color:#f92672">,</span> csv<span style="color:#f92672">,</span> io
</span></span><span style="display:flex;"><span><span style="color:#f92672">from</span> datetime <span style="color:#f92672">import</span> datetime, timezone
</span></span><span style="display:flex;"><span><span style="color:#f92672">from</span> spdx_python_model <span style="color:#f92672">import</span> v3_0_1 <span style="color:#66d9ef">as</span> spdx
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>rec_path, kev_path, epss_path, purl <span style="color:#f92672">=</span> sys<span style="color:#f92672">.</span>argv[<span style="color:#ae81ff">1</span>:<span style="color:#ae81ff">5</span>]
</span></span><span style="display:flex;"><span>rec <span style="color:#f92672">=</span> json<span style="color:#f92672">.</span>load(open(rec_path))
</span></span><span style="display:flex;"><span>cve <span style="color:#f92672">=</span> rec[<span style="color:#e6db74">&#34;cveMetadata&#34;</span>][<span style="color:#e6db74">&#34;cveId&#34;</span>]
</span></span><span style="display:flex;"><span>kev <span style="color:#f92672">=</span> {v[<span style="color:#e6db74">&#34;cveID&#34;</span>]: v <span style="color:#66d9ef">for</span> v <span style="color:#f92672">in</span> json<span style="color:#f92672">.</span>load(open(kev_path))[<span style="color:#e6db74">&#34;vulnerabilities&#34;</span>]}
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">with</span> gzip<span style="color:#f92672">.</span>open(epss_path, <span style="color:#e6db74">&#34;rt&#34;</span>) <span style="color:#66d9ef">as</span> f:
</span></span><span style="display:flex;"><span>    header <span style="color:#f92672">=</span> f<span style="color:#f92672">.</span>readline()            <span style="color:#75715e"># &#34;#model_version:...,score_date:...&#34;</span>
</span></span><span style="display:flex;"><span>    score_date <span style="color:#f92672">=</span> header<span style="color:#f92672">.</span>strip()<span style="color:#f92672">.</span>split(<span style="color:#e6db74">&#34;score_date:&#34;</span>)[<span style="color:#ae81ff">1</span>]
</span></span><span style="display:flex;"><span>    epss <span style="color:#f92672">=</span> next((r <span style="color:#66d9ef">for</span> r <span style="color:#f92672">in</span> csv<span style="color:#f92672">.</span>DictReader(f) <span style="color:#66d9ef">if</span> r[<span style="color:#e6db74">&#34;cve&#34;</span>] <span style="color:#f92672">==</span> cve), <span style="color:#66d9ef">None</span>)
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>now <span style="color:#f92672">=</span> datetime<span style="color:#f92672">.</span>now(timezone<span style="color:#f92672">.</span>utc)<span style="color:#f92672">.</span>replace(microsecond<span style="color:#f92672">=</span><span style="color:#ae81ff">0</span>)
</span></span><span style="display:flex;"><span>ci <span style="color:#f92672">=</span> spdx<span style="color:#f92672">.</span>CreationInfo(specVersion<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;3.0.1&#34;</span>, created<span style="color:#f92672">=</span>now, createdBy<span style="color:#f92672">=</span>[<span style="color:#e6db74">&#34;urn:example:agent:secteam&#34;</span>])
</span></span><span style="display:flex;"><span>agent <span style="color:#f92672">=</span> spdx<span style="color:#f92672">.</span>Organization(spdxId<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;urn:example:agent:secteam&#34;</span>, name<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;Example Security Team&#34;</span>, creationInfo<span style="color:#f92672">=</span>ci)
</span></span><span style="display:flex;"><span>ci<span style="color:#f92672">.</span>createdBy <span style="color:#f92672">=</span> [agent]
</span></span><span style="display:flex;"><span>pkg <span style="color:#f92672">=</span> spdx<span style="color:#f92672">.</span>software_Package(spdxId<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;urn:example:pkg:1&#34;</span>, name<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;appliance&#34;</span>, software_packageUrl<span style="color:#f92672">=</span>purl, creationInfo<span style="color:#f92672">=</span>ci)
</span></span><span style="display:flex;"><span>vuln <span style="color:#f92672">=</span> spdx<span style="color:#f92672">.</span>security_Vulnerability(spdxId<span style="color:#f92672">=</span><span style="color:#e6db74">f</span><span style="color:#e6db74">&#34;urn:example:vuln:</span><span style="color:#e6db74">{</span>cve<span style="color:#e6db74">}</span><span style="color:#e6db74">&#34;</span>, name<span style="color:#f92672">=</span>cve, creationInfo<span style="color:#f92672">=</span>ci,
</span></span><span style="display:flex;"><span>    externalIdentifier<span style="color:#f92672">=</span>[spdx<span style="color:#f92672">.</span>ExternalIdentifier(externalIdentifierType<span style="color:#f92672">=</span>spdx<span style="color:#f92672">.</span>ExternalIdentifierType<span style="color:#f92672">.</span>cve, identifier<span style="color:#f92672">=</span>cve)])
</span></span><span style="display:flex;"><span>objs <span style="color:#f92672">=</span> [agent, pkg, vuln]
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">def</span> <span style="color:#a6e22e">assess</span>(cls, suffix, <span style="color:#f92672">**</span>kw):
</span></span><span style="display:flex;"><span>    o <span style="color:#f92672">=</span> cls(spdxId<span style="color:#f92672">=</span><span style="color:#e6db74">f</span><span style="color:#e6db74">&#34;urn:example:</span><span style="color:#e6db74">{</span>suffix<span style="color:#e6db74">}</span><span style="color:#e6db74">:</span><span style="color:#e6db74">{</span>cve<span style="color:#e6db74">}</span><span style="color:#e6db74">&#34;</span>, creationInfo<span style="color:#f92672">=</span>ci, from_<span style="color:#f92672">=</span>vuln, to<span style="color:#f92672">=</span>[pkg],
</span></span><span style="display:flex;"><span>            relationshipType<span style="color:#f92672">=</span>spdx<span style="color:#f92672">.</span>RelationshipType<span style="color:#f92672">.</span>hasAssessmentFor, <span style="color:#f92672">**</span>kw)
</span></span><span style="display:flex;"><span>    objs<span style="color:#f92672">.</span>append(o); <span style="color:#66d9ef">return</span> o
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># CVSS v3.1 from the CNA container (first one found)</span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">for</span> m <span style="color:#f92672">in</span> rec[<span style="color:#e6db74">&#34;containers&#34;</span>][<span style="color:#e6db74">&#34;cna&#34;</span>]<span style="color:#f92672">.</span>get(<span style="color:#e6db74">&#34;metrics&#34;</span>, []):
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">if</span> <span style="color:#e6db74">&#34;cvssV3_1&#34;</span> <span style="color:#f92672">in</span> m:
</span></span><span style="display:flex;"><span>        c <span style="color:#f92672">=</span> m[<span style="color:#e6db74">&#34;cvssV3_1&#34;</span>]
</span></span><span style="display:flex;"><span>        assess(spdx<span style="color:#f92672">.</span>security_CvssV3VulnAssessmentRelationship, <span style="color:#e6db74">&#34;cvss3&#34;</span>, security_score<span style="color:#f92672">=</span>c[<span style="color:#e6db74">&#34;baseScore&#34;</span>],
</span></span><span style="display:flex;"><span>               security_severity<span style="color:#f92672">=</span>getattr(spdx<span style="color:#f92672">.</span>security_CvssSeverityType, c[<span style="color:#e6db74">&#34;baseSeverity&#34;</span>]<span style="color:#f92672">.</span>lower()),
</span></span><span style="display:flex;"><span>               security_vectorString<span style="color:#f92672">=</span>c[<span style="color:#e6db74">&#34;vectorString&#34;</span>]); <span style="color:#66d9ef">break</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">if</span> epss:   <span style="color:#75715e"># publishedTime is required (minCount 1) on EPSS assessments</span>
</span></span><span style="display:flex;"><span>    assess(spdx<span style="color:#f92672">.</span>security_EpssVulnAssessmentRelationship, <span style="color:#e6db74">&#34;epss&#34;</span>, security_probability<span style="color:#f92672">=</span>float(epss[<span style="color:#e6db74">&#34;epss&#34;</span>]),
</span></span><span style="display:flex;"><span>           security_percentile<span style="color:#f92672">=</span>float(epss[<span style="color:#e6db74">&#34;percentile&#34;</span>]),
</span></span><span style="display:flex;"><span>           security_publishedTime<span style="color:#f92672">=</span>datetime<span style="color:#f92672">.</span>fromisoformat(score_date<span style="color:#f92672">.</span>replace(<span style="color:#e6db74">&#34;Z&#34;</span>, <span style="color:#e6db74">&#34;+00:00&#34;</span>)))
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">if</span> cve <span style="color:#f92672">in</span> kev:
</span></span><span style="display:flex;"><span>    assess(spdx<span style="color:#f92672">.</span>security_ExploitCatalogVulnAssessmentRelationship, <span style="color:#e6db74">&#34;kev&#34;</span>,
</span></span><span style="display:flex;"><span>           security_catalogType<span style="color:#f92672">=</span>spdx<span style="color:#f92672">.</span>security_ExploitCatalogType<span style="color:#f92672">.</span>kev, security_exploited<span style="color:#f92672">=</span><span style="color:#66d9ef">True</span>,
</span></span><span style="display:flex;"><span>           security_locator<span style="color:#f92672">=</span><span style="color:#e6db74">f</span><span style="color:#e6db74">&#34;https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=</span><span style="color:#e6db74">{</span>cve<span style="color:#e6db74">}</span><span style="color:#e6db74">&#34;</span>,
</span></span><span style="display:flex;"><span>           security_publishedTime<span style="color:#f92672">=</span>datetime<span style="color:#f92672">.</span>fromisoformat(kev[cve][<span style="color:#e6db74">&#34;dateAdded&#34;</span>] <span style="color:#f92672">+</span> <span style="color:#e6db74">&#34;T00:00:00+00:00&#34;</span>))
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># CISA-ADP publishes SSVC decision *points*, not a decision. SPDX 3.0.1 only stores the decision,</span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># so keep the points as a comment and leave decisionType to your own deployer tree.</span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">for</span> adp <span style="color:#f92672">in</span> rec[<span style="color:#e6db74">&#34;containers&#34;</span>]<span style="color:#f92672">.</span>get(<span style="color:#e6db74">&#34;adp&#34;</span>, []):
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">for</span> m <span style="color:#f92672">in</span> adp<span style="color:#f92672">.</span>get(<span style="color:#e6db74">&#34;metrics&#34;</span>, []):
</span></span><span style="display:flex;"><span>        o <span style="color:#f92672">=</span> m<span style="color:#f92672">.</span>get(<span style="color:#e6db74">&#34;other&#34;</span>, {})
</span></span><span style="display:flex;"><span>        <span style="color:#66d9ef">if</span> o<span style="color:#f92672">.</span>get(<span style="color:#e6db74">&#34;type&#34;</span>) <span style="color:#f92672">==</span> <span style="color:#e6db74">&#34;ssvc&#34;</span>:
</span></span><span style="display:flex;"><span>            pts <span style="color:#f92672">=</span> {k: v <span style="color:#66d9ef">for</span> d <span style="color:#f92672">in</span> o[<span style="color:#e6db74">&#34;content&#34;</span>][<span style="color:#e6db74">&#34;options&#34;</span>] <span style="color:#66d9ef">for</span> k, v <span style="color:#f92672">in</span> d<span style="color:#f92672">.</span>items()}
</span></span><span style="display:flex;"><span>            print(<span style="color:#e6db74">&#34;SSVC points (not stored as decisionType):&#34;</span>, pts, file<span style="color:#f92672">=</span>sys<span style="color:#f92672">.</span>stderr)
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>doc <span style="color:#f92672">=</span> spdx<span style="color:#f92672">.</span>SpdxDocument(spdxId<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;urn:example:doc:1&#34;</span>, creationInfo<span style="color:#f92672">=</span>ci, element<span style="color:#f92672">=</span>objs, rootElement<span style="color:#f92672">=</span>[pkg])
</span></span><span style="display:flex;"><span>objset <span style="color:#f92672">=</span> spdx<span style="color:#f92672">.</span>SHACLObjectSet([doc] <span style="color:#f92672">+</span> objs)
</span></span><span style="display:flex;"><span>out <span style="color:#f92672">=</span> io<span style="color:#f92672">.</span>BytesIO()
</span></span><span style="display:flex;"><span>spdx<span style="color:#f92672">.</span>JSONLDSerializer(indent<span style="color:#f92672">=</span><span style="color:#ae81ff">2</span>)<span style="color:#f92672">.</span>write(objset, out)   <span style="color:#75715e"># raises ValueError on min/max cardinality errors</span>
</span></span><span style="display:flex;"><span>sys<span style="color:#f92672">.</span>stdout<span style="color:#f92672">.</span>write(out<span style="color:#f92672">.</span>getvalue()<span style="color:#f92672">.</span>decode())
</span></span></code></pre></div><p>Run: <code>python cve_to_spdx_security.py CVE-2023-3519.json known_exploited_vulnerabilities.json epss_scores-2026-11-28.csv.gz &quot;pkg:generic/netscaler-adc@13.1-48.47&quot; &gt; out.spdx.json</code>. It prints the SSVC points to stderr and writes an 8-node <code>@graph</code> with context <code>https://spdx.org/rdf/3.0.1/spdx-context.jsonld</code>. The KEV node it produced:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-json" data-lang="json"><span style="display:flex;"><span>{
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">&#34;type&#34;</span>: <span style="color:#e6db74">&#34;security_ExploitCatalogVulnAssessmentRelationship&#34;</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">&#34;spdxId&#34;</span>: <span style="color:#e6db74">&#34;urn:example:kev:CVE-2023-3519&#34;</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">&#34;security_catalogType&#34;</span>: <span style="color:#e6db74">&#34;kev&#34;</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">&#34;security_exploited&#34;</span>: <span style="color:#66d9ef">true</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">&#34;security_locator&#34;</span>: <span style="color:#e6db74">&#34;https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2023-3519&#34;</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">&#34;security_publishedTime&#34;</span>: <span style="color:#e6db74">&#34;2023-07-19T00:00:00Z&#34;</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">&#34;from&#34;</span>: <span style="color:#e6db74">&#34;urn:example:vuln:CVE-2023-3519&#34;</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">&#34;relationshipType&#34;</span>: <span style="color:#e6db74">&#34;hasAssessmentFor&#34;</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">&#34;to&#34;</span>: [
</span></span><span style="display:flex;"><span>    <span style="color:#e6db74">&#34;urn:example:pkg:1&#34;</span>
</span></span><span style="display:flex;"><span>  ],
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">&#34;creationInfo&#34;</span>: <span style="color:#e6db74">&#34;_:CreationInfo0&#34;</span>
</span></span><span style="display:flex;"><span>}
</span></span></code></pre></div><p>The CVSS node carried <code>&quot;security_score&quot;: &quot;9.8&quot;</code> and the EPSS node <code>&quot;security_probability&quot;: &quot;0.84638&quot;</code>, <code>&quot;security_percentile&quot;: &quot;0.99799&quot;</code>, <code>&quot;security_publishedTime&quot;: &quot;2026-11-28T12:00:21Z&quot;</code>.</p>
<p>Two serialization details trip up consumers:</p>
<ul>
<li><strong>Decimals are JSON strings.</strong> <code>xsd:decimal</code> values (score, probability, percentile) came out as <code>&quot;9.8&quot;</code>, not <code>9.8</code>. Parse them as decimals; do not compare strings.</li>
<li><strong>Property names carry the profile prefix.</strong> Security properties serialize as <code>security_score</code>, <code>security_locator</code> and so on, and class names as <code>security_EpssVulnAssessmentRelationship</code>. The example blocks inside the 3.0.1 model text are not consistent about this (one uses <code>&quot;locator&quot;</code> unprefixed and <code>&quot;security_exploited&quot;: &quot;true&quot;</code> as a string); the <code>main</code> branch corrected them. Build from the bindings or the JSON-LD context, not from those examples.</li>
</ul>
<h2 id="what-the-bindings-check-and-what-they-dont">What the bindings check, and what they don&rsquo;t</h2>
<p>The bindings raise <code>ValueError</code> at serialization time when a required property is missing, and reject values outside a vocabulary. We ran eight deliberately broken objects through <code>JSONLDSerializer</code>:</p>
<table>
  <thead>
      <tr>
          <th>Test object</th>
          <th>Result in spdx-python-model 0.0.6</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>ExploitCatalog without <code>locator</code></td>
          <td>Rejected (required property)</td>
      </tr>
      <tr>
          <td>VEX affected without <code>actionStatement</code></td>
          <td>Rejected (required property)</td>
      </tr>
      <tr>
          <td>SSVC with <code>decisionType</code> &ldquo;defer&rdquo;</td>
          <td>Rejected (not in SsvcDecisionType)</td>
      </tr>
      <tr>
          <td>EPSS without <code>publishedTime</code></td>
          <td><strong>Accepted</strong></td>
      </tr>
      <tr>
          <td>EPSS with probability 1.5</td>
          <td><strong>Accepted</strong></td>
      </tr>
      <tr>
          <td>VEX not_affected with relationshipType <code>affects</code></td>
          <td><strong>Accepted</strong></td>
      </tr>
      <tr>
          <td>VEX not_affected with neither justification nor impactStatement</td>
          <td><strong>Accepted</strong></td>
      </tr>
      <tr>
          <td>CVSS v3 severity <code>critical</code> with score 5.0</td>
          <td><strong>Accepted</strong></td>
      </tr>
  </tbody>
</table>
<p>The EPSS <code>publishedTime</code> restriction is an &ldquo;external property restriction&rdquo; on an inherited property, and the 0-1 ranges, relationship-type constraints and the not_affected rule are written as constraints or prose in the model. The bindings we tested did not enforce them. Whether the published SHACL shapes catch each one we could not test here (see Limits). In your pipeline, add explicit checks for these five cases before you publish or ingest a document, and run a SHACL validator such as <code>spdx3-validate</code> where it can reach spdx.org.</p>
<h2 id="common-mistakes">Common mistakes</h2>
<ul>
<li><strong>Writing CVSS as a property of the package.</strong> In SPDX 3 the score belongs to a relationship between the vulnerability and the package, so the same CVE can carry different scores for different products or suppliers.</li>
<li><strong>Using <code>exploited: false</code> to mean &ldquo;not in KEV&rdquo;.</strong> The property is described as set when a CVE is listed; leaving the relationship out is clearer than a false value.</li>
<li><strong>Copying SSVC points into <code>decisionType</code>.</strong> <code>active/no/total</code> is not a decision. Compute one, or leave SSVC out.</li>
<li><strong>Dropping provenance.</strong> Set <code>suppliedBy</code> on each assessment, especially when you merge CNA and CISA-ADP CVSS or several VEX sources.</li>
</ul>
<h2 id="limits-of-this-article">Limits of this article</h2>
<ul>
<li>Scope is SPDX 3.0.1. 3.1 is at release-candidate stage; check its Security profile before targeting it.</li>
<li>We could not run SHACL validation: <code>spdx3-validate</code> 0.0.7 downloads <code>spdx-model.ttl</code>, the JSON-LD context and the JSON schema from spdx.org, which our build environment could not reach. The table above describes the Python bindings only.</li>
<li>The KEV <code>publishedTime</code> = <code>dateAdded</code> and EPSS <code>publishedTime</code> = <code>score_date</code> choices are our conventions.</li>
</ul>
<h2 id="sources-and-verification">Sources and verification</h2>
<table>
  <thead>
      <tr>
          <th>Important claim</th>
          <th>Source</th>
          <th>Status</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>Class list, properties, cardinalities, vocabularies, VEX and SSVC description text</td>
          <td><a href="https://github.com/spdx/spdx-3-model/tree/3.0.1/model/Security">spdx/spdx-3-model</a> at tag 3.0.1; <a href="https://spdx.github.io/spdx-spec/v3.0.1/model/Security/Classes/SsvcVulnAssessmentRelationship">SPDX 3.0.1 spec site</a></td>
          <td>Verified</td>
      </tr>
      <tr>
          <td>3.1-rc1 tag exists; main changed examples and wording</td>
          <td><code>git ls-remote --tags</code> and diff of <code>model/Security</code> 3.0.1 vs main, 2026-11-29; <a href="https://spdx.github.io/spdx-spec/v3.1-RC1/model/Security/Classes/VexVulnAssessmentRelationship">3.1-RC1 spec site</a></td>
          <td>Verified</td>
      </tr>
      <tr>
          <td>Serialized JSON-LD output and binding test results</td>
          <td>Scripts above with <a href="https://pypi.org/project/spdx-python-model/">spdx-python-model</a> 0.0.6</td>
          <td>Verified (our test)</td>
      </tr>
      <tr>
          <td>CVE-2023-3519 CVSS, CISA-ADP SSVC points, KEV entry</td>
          <td><a href="https://github.com/CVEProject/cvelistV5/blob/main/cves/2023/3xxx/CVE-2023-3519.json">cvelistV5 record</a>; <a href="https://github.com/cisagov/kev-data">cisagov/kev-data</a> 2026.11.27</td>
          <td>Verified</td>
      </tr>
      <tr>
          <td>EPSS 0.84638 / 0.99799 on 2026-11-28, model v2026.06.15</td>
          <td><a href="https://github.com/empiricalsec/epss_scores">empiricalsec/epss_scores</a> daily file</td>
          <td>Verified</td>
      </tr>
  </tbody>
</table>
]]></content:encoded></item></channel></rss>