<?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>Go-Vex | FirewallSync</title><link>https://firewallsync.com/tags/go-vex/</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>Fri, 20 Nov 2026 04:30:00 +0000</lastBuildDate><atom:link href="https://firewallsync.com/tags/go-vex/index.xml" rel="self" type="application/rss+xml"/><item><title>OpenVEX Statement Fields: What Trivy and go-vex Ignore</title><link>https://firewallsync.com/posts/openvex-statement-fields-status-notes-action-statement-version-trivy/</link><guid>https://firewallsync.com/posts/openvex-statement-fields-status-notes-action-statement-version-trivy/</guid><pubDate>Fri, 20 Nov 2026 04:30:00 +0000</pubDate><dc:creator>John Marshall</dc:creator><category>AppSec &amp; APIs</category><description>OpenVEX v0.2.0 defines 13 statement fields, but Trivy v0.76.2 acts on two of them: status and justification, from the matching statement with the newest timestamp. Here is what happens to status_notes, action_statement, last_updated, version and supplier, read from the go-vex v0.2.9 and Trivy source.</description><enclosure url="https://firewallsync.com/posts/openvex-statement-fields-status-notes-action-statement-version-trivy/cover_hu9992264959083435414.jpg" type="image/jpeg" length="0"/><media:content url="https://firewallsync.com/posts/openvex-statement-fields-status-notes-action-statement-version-trivy/cover_hu9992264959083435414.jpg" medium="image" type="image/jpeg" width="1200" height="630"/><content:encoded><![CDATA[<p><img src="https://firewallsync.com/posts/openvex-statement-fields-status-notes-action-statement-version-trivy/cover_hu9992264959083435414.jpg" alt="Black-framed reading glasses resting on a printed document, the text blurred beneath the lenses" width="1200" height="630"></p><p><strong>Short answer:</strong> OpenVEX v0.2.0 gives a statement 13 fields, from <code>status</code> and <code>justification</code> to <code>status_notes</code>, <code>action_statement</code>, <code>last_updated</code> and a statement-level <code>version</code>. Trivy v0.76.2, through the go-vex v0.2.9 library, acts on two of them once a statement matches: <strong><code>status</code></strong> and <strong><code>justification</code></strong>. It picks the winning statement by <strong><code>timestamp</code></strong> alone. Everything else is either decoded and ignored, or, for statement <code>version</code> and <code>supplier</code>, not decoded at all and lost when a go-vex tool rewrites the file.</p>
<p>That matters if you write VEX for your own images and expect a scanner to honour it. A field you set to change the outcome may have no effect, and a field you rely on as an audit trail may vanish on the next <code>vexctl add</code>.</p>
<p>This article reads the <a href="https://github.com/openvex/spec/blob/main/OPENVEX-SPEC.md">OpenVEX v0.2.0 specification</a>, its <a href="https://github.com/openvex/spec/blob/main/openvex_json_schema.json">JSON schema</a>, <a href="https://github.com/openvex/go-vex/tree/v0.2.9">go-vex v0.2.9</a> (the newest tag on November 20, 2026, and the version pinned in Trivy&rsquo;s go.mod) and <a href="https://github.com/aquasecurity/trivy/tree/v0.76.2">Trivy v0.76.2</a>. For what the statuses mean, start with <a href="/posts/vex-explained-what-a-not-affected-statement-means-and-how-to-read-one/">VEX explained</a>; for how products and purls match, see <a href="/posts/openvex-products-subcomponents-purl-matching-trivy/">OpenVEX products and subcomponents</a>.</p>
<h2 id="field-by-field-spec-schema-go-vex-trivy">Field by field: spec, schema, go-vex, Trivy</h2>
<table>
  <thead>
      <tr>
          <th>Statement field</th>
          <th>Spec v0.2.0</th>
          <th>JSON schema</th>
          <th>go-vex v0.2.9</th>
          <th>Trivy v0.76.2</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td><code>vulnerability</code></td>
          <td>required</td>
          <td>required</td>
          <td>decoded</td>
          <td>matched against the finding ID</td>
      </tr>
      <tr>
          <td><code>products</code> / <code>subcomponents</code></td>
          <td>required for a complete statement, can be inherited</td>
          <td>optional</td>
          <td>decoded</td>
          <td>matched against the scanned purls</td>
      </tr>
      <tr>
          <td><code>status</code></td>
          <td>required</td>
          <td>required</td>
          <td>decoded, validated by <code>Validate()</code></td>
          <td><strong>acts on it</strong>: suppresses <code>not_affected</code> and <code>fixed</code></td>
      </tr>
      <tr>
          <td><code>justification</code></td>
          <td><code>not_affected</code> needs it or <code>impact_statement</code></td>
          <td>same rule (<code>anyOf</code>)</td>
          <td>decoded</td>
          <td><strong>copied</strong> into the modified finding&rsquo;s <code>Statement</code></td>
      </tr>
      <tr>
          <td><code>timestamp</code></td>
          <td>optional, inherits from the document</td>
          <td>optional</td>
          <td>decoded, <strong>used to sort</strong></td>
          <td>the newest matching statement wins</td>
      </tr>
      <tr>
          <td><code>last_updated</code></td>
          <td>optional</td>
          <td>optional</td>
          <td>decoded, not compared</td>
          <td>ignored</td>
      </tr>
      <tr>
          <td><code>status_notes</code></td>
          <td>MAY</td>
          <td>optional</td>
          <td>decoded</td>
          <td>ignored</td>
      </tr>
      <tr>
          <td><code>impact_statement</code></td>
          <td>alternative to <code>justification</code></td>
          <td>alternative</td>
          <td>decoded</td>
          <td>ignored</td>
      </tr>
      <tr>
          <td><code>action_statement</code></td>
          <td>MUST for <code>affected</code></td>
          <td>required for <code>affected</code></td>
          <td>decoded; <code>Validate()</code> enforces it</td>
          <td>ignored, not validated</td>
      </tr>
      <tr>
          <td><code>action_statement_timestamp</code></td>
          <td>optional</td>
          <td>optional</td>
          <td>decoded</td>
          <td>ignored</td>
      </tr>
      <tr>
          <td><code>version</code> (statement)</td>
          <td>optional, &ldquo;Defaults to zero&rdquo;</td>
          <td>integer, <code>minimum: 1</code></td>
          <td><strong>no struct field: dropped</strong></td>
          <td>not seen</td>
      </tr>
      <tr>
          <td><code>supplier</code> (statement)</td>
          <td>optional</td>
          <td>(not listed)</td>
          <td><strong>no struct field: dropped</strong></td>
          <td>not seen</td>
      </tr>
  </tbody>
</table>
<p>&ldquo;Ignored&rdquo; means the field takes no part in whether Trivy suppresses a finding or in what it records about the suppression. The data is still in your file; it is just not consumed.</p>
<h2 id="how-trivy-decides">How Trivy decides</h2>
<p>Trivy&rsquo;s OpenVEX handler is short. In <a href="https://github.com/aquasecurity/trivy/blob/v0.76.2/pkg/vex/openvex.go"><code>pkg/vex/openvex.go</code></a>, <code>NotAffected</code> asks go-vex for the matching statements, then:</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-go" data-lang="go"><span style="display:flex;"><span><span style="color:#75715e">// Take the latest statement for a given vulnerability and product
</span></span></span><span style="display:flex;"><span><span style="color:#75715e">// as a sequence of statements can be overridden by the newer one.
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span><span style="color:#a6e22e">stmt</span> <span style="color:#f92672">:=</span> <span style="color:#a6e22e">stmts</span>[len(<span style="color:#a6e22e">stmts</span>)<span style="color:#f92672">-</span><span style="color:#ae81ff">1</span>]
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">if</span> <span style="color:#a6e22e">stmt</span>.<span style="color:#a6e22e">Status</span> <span style="color:#f92672">==</span> <span style="color:#a6e22e">openvex</span>.<span style="color:#a6e22e">StatusNotAffected</span> <span style="color:#f92672">||</span> <span style="color:#a6e22e">stmt</span>.<span style="color:#a6e22e">Status</span> <span style="color:#f92672">==</span> <span style="color:#a6e22e">openvex</span>.<span style="color:#a6e22e">StatusFixed</span> {
</span></span><span style="display:flex;"><span>    <span style="color:#a6e22e">modifiedFindings</span> <span style="color:#f92672">:=</span> <span style="color:#a6e22e">types</span>.<span style="color:#a6e22e">NewModifiedFinding</span>(<span style="color:#a6e22e">vuln</span>, <span style="color:#a6e22e">findingStatus</span>(<span style="color:#a6e22e">stmt</span>.<span style="color:#a6e22e">Status</span>), string(<span style="color:#a6e22e">stmt</span>.<span style="color:#a6e22e">Justification</span>), <span style="color:#a6e22e">v</span>.<span style="color:#a6e22e">source</span>)
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">return</span> <span style="color:#a6e22e">modifiedFindings</span>, <span style="color:#66d9ef">true</span>
</span></span><span style="display:flex;"><span>}
</span></span></code></pre></div><p>Two consequences follow directly from that code:</p>
<ol>
<li><strong>Only <code>status</code> changes the result.</strong> <code>affected</code> and <code>under_investigation</code> leave the finding in place, whatever <code>action_statement</code> or <code>status_notes</code> say.</li>
<li><strong>Only <code>justification</code> is carried into the output.</strong> The third argument to <code>NewModifiedFinding</code> becomes the <code>Statement</code> field of the finding listed under <code>ExperimentalModifiedFindings</code> in Trivy&rsquo;s JSON report. A <code>not_affected</code> statement that explains itself only with <code>impact_statement</code> is valid, yet Trivy records an empty <code>Statement</code> for it. If an auditor reads Trivy&rsquo;s report rather than your VEX file, the reasoning is gone.</li>
</ol>
<h2 id="which-statement-wins-timestamp-not-last_updated-or-version">Which statement wins: timestamp, not last_updated or version</h2>
<p>The list Trivy indexes into is sorted by go-vex&rsquo;s <code>SortStatements</code> in <a href="https://github.com/openvex/go-vex/blob/v0.2.9/pkg/vex/statement.go"><code>pkg/vex/statement.go</code></a>. For statements about the same vulnerability it compares <code>Timestamp</code>, and a statement with no timestamp of its own uses the document&rsquo;s:</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-go" data-lang="go"><span style="display:flex;"><span><span style="color:#a6e22e">iTime</span> <span style="color:#f92672">:=</span> <span style="color:#a6e22e">stmts</span>[<span style="color:#a6e22e">i</span>].<span style="color:#a6e22e">Timestamp</span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">if</span> <span style="color:#a6e22e">iTime</span> <span style="color:#f92672">==</span> <span style="color:#66d9ef">nil</span> <span style="color:#f92672">||</span> <span style="color:#a6e22e">iTime</span>.<span style="color:#a6e22e">IsZero</span>() {
</span></span><span style="display:flex;"><span>    <span style="color:#a6e22e">iTime</span> = <span style="color:#f92672">&amp;</span><span style="color:#a6e22e">documentTimestamp</span>
</span></span><span style="display:flex;"><span>}
</span></span><span style="display:flex;"><span><span style="color:#75715e">// ...
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span><span style="color:#66d9ef">return</span> <span style="color:#a6e22e">iTime</span>.<span style="color:#a6e22e">Before</span>(<span style="color:#f92672">*</span><span style="color:#a6e22e">jTime</span>)
</span></span></code></pre></div><p><code>last_updated</code> is never compared, and statement <code>version</code> does not exist in the struct. The sort is stable, so two statements with equal timestamps stay in file order and the later one wins.</p>
<p>This follows the spec, which defines <code>timestamp</code> as &ldquo;the time at which the information expressed in the Statement was known to be true&rdquo; and says a statement &ldquo;is useless without a timestamp as it cannot be related to others talking about the same subject.&rdquo; The trap is editing a statement in place. If you change an old <code>not_affected</code> statement&rsquo;s text and bump its <code>last_updated</code> and <code>version</code>, it keeps its old <code>timestamp</code> and still loses to any newer statement for the same product and CVE.</p>
<p>The spec&rsquo;s own update example shows the safe pattern: keep the old statement unchanged with its original timestamp, and add a new statement that carries the new status and a newer timestamp (its own, or the bumped document timestamp it inherits). <code>vexctl add</code> does this for you, as covered in our <a href="/posts/vexctl-create-add-merge-attest-openvex-documents/">vexctl guide</a>.</p>
<h2 id="statement-version-and-supplier-are-dropped-on-rewrite">Statement version and supplier are dropped on rewrite</h2>
<p>The spec lists <code>version</code> on the statement as an &ldquo;Optional integer representing the statement&rsquo;s version number. Defaults to zero, required when incremented&rdquo;, and <code>supplier</code> as the &ldquo;Supplier of the product or subcomponent.&rdquo; The go-vex v0.2.9 <code>Statement</code> struct has fields for <code>@id</code>, <code>vulnerability</code>, <code>timestamp</code>, <code>last_updated</code>, <code>products</code>, <code>status</code>, <code>status_notes</code>, <code>justification</code>, <code>impact_statement</code>, <code>action_statement</code> and <code>action_statement_timestamp</code>, and nothing else. Go&rsquo;s <code>encoding/json</code> discards keys it has no field for.</p>
<p>We checked the effect with a stdlib-only Go 1.24.7 program whose <code>Statement</code> struct copies go-vex v0.2.9&rsquo;s field set and JSON tags (with <code>products</code> and <code>vulnerability</code> held as raw JSON). Input:</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 style="color:#f92672">&#34;version&#34;</span>:<span style="color:#ae81ff">2</span>,<span style="color:#f92672">&#34;supplier&#34;</span>:<span style="color:#e6db74">&#34;Example Corp&#34;</span>,<span style="color:#f92672">&#34;vulnerability&#34;</span>:{<span style="color:#f92672">&#34;name&#34;</span>:<span style="color:#e6db74">&#34;CVE-2024-32002&#34;</span>},
</span></span><span style="display:flex;"><span> <span style="color:#f92672">&#34;timestamp&#34;</span>:<span style="color:#e6db74">&#34;2026-11-01T10:00:00Z&#34;</span>,<span style="color:#f92672">&#34;last_updated&#34;</span>:<span style="color:#e6db74">&#34;2026-11-20T08:00:00Z&#34;</span>,
</span></span><span style="display:flex;"><span> <span style="color:#f92672">&#34;products&#34;</span>:[{<span style="color:#f92672">&#34;@id&#34;</span>:<span style="color:#e6db74">&#34;pkg:oci/app@sha256:abc&#34;</span>}],<span style="color:#f92672">&#34;status&#34;</span>:<span style="color:#e6db74">&#34;affected&#34;</span>,
</span></span><span style="display:flex;"><span> <span style="color:#f92672">&#34;status_notes&#34;</span>:<span style="color:#e6db74">&#34;Reachable from the upload handler&#34;</span>,<span style="color:#f92672">&#34;action_statement&#34;</span>:<span style="color:#e6db74">&#34;Upgrade git to 2.45.1&#34;</span>,
</span></span><span style="display:flex;"><span> <span style="color:#f92672">&#34;action_statement_timestamp&#34;</span>:<span style="color:#e6db74">&#34;2026-11-20T08:00:00Z&#34;</span>}
</span></span></code></pre></div><p>Output after <code>json.Unmarshal</code> and <code>json.Marshal</code>:</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 style="color:#f92672">&#34;vulnerability&#34;</span>:{<span style="color:#f92672">&#34;name&#34;</span>:<span style="color:#e6db74">&#34;CVE-2024-32002&#34;</span>},<span style="color:#f92672">&#34;timestamp&#34;</span>:<span style="color:#e6db74">&#34;2026-11-01T10:00:00Z&#34;</span>,<span style="color:#f92672">&#34;last_updated&#34;</span>:<span style="color:#e6db74">&#34;2026-11-20T08:00:00Z&#34;</span>,<span style="color:#f92672">&#34;products&#34;</span>:[{<span style="color:#f92672">&#34;@id&#34;</span>:<span style="color:#e6db74">&#34;pkg:oci/app@sha256:abc&#34;</span>}],<span style="color:#f92672">&#34;status&#34;</span>:<span style="color:#e6db74">&#34;affected&#34;</span>,<span style="color:#f92672">&#34;status_notes&#34;</span>:<span style="color:#e6db74">&#34;Reachable from the upload handler&#34;</span>,<span style="color:#f92672">&#34;action_statement&#34;</span>:<span style="color:#e6db74">&#34;Upgrade git to 2.45.1&#34;</span>,<span style="color:#f92672">&#34;action_statement_timestamp&#34;</span>:<span style="color:#e6db74">&#34;2026-11-20T08:00:00Z&#34;</span>}
</span></span></code></pre></div><p><code>version</code> and <code>supplier</code> are gone. Any tool that loads a document through go-vex and writes it back, including <code>vexctl add</code> and <code>vexctl merge</code>, will do the same. If your process uses statement <code>version</code> as a change counter, keep that history somewhere go-vex does not touch, such as the document <code>version</code> (which go-vex does keep) or your Git history.</p>
<p>The spec and schema also disagree slightly here: the spec says statement <code>version</code> defaults to zero, while the schema sets <code>minimum: 1</code>. A statement with an explicit <code>&quot;version&quot;: 0</code> fails schema validation.</p>
<p>The openvex/go-vex main branch has an unreleased validator (commit 42a83ee, November 19, 2026) whose field table carries the same warning for both fields: &ldquo;go-vex does not decode it; it is dropped when the document is rewritten.&rdquo; The vexctl main branch already wires it into a <code>vexctl validate</code> command; the latest vexctl release, v0.4.4, does not include it.</p>
<h2 id="action_statement-required-by-the-spec-not-checked-by-trivy">action_statement: required by the spec, not checked by Trivy</h2>
<p>The spec says an <code>affected</code> statement &ldquo;MUST include a statement that SHOULD describe actions to remediate or mitigate the vulnerability,&rdquo; and the JSON schema makes <code>action_statement</code> required when <code>status</code> is <code>affected</code>. go-vex enforces this in <code>Statement.Validate()</code>:</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-go" data-lang="go"><span style="display:flex;"><span><span style="color:#75715e">// action statement is now required
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span><span style="color:#66d9ef">if</span> <span style="color:#a6e22e">v</span> <span style="color:#f92672">:=</span> <span style="color:#a6e22e">stmt</span>.<span style="color:#a6e22e">ActionStatement</span>; <span style="color:#a6e22e">v</span> <span style="color:#f92672">==</span> <span style="color:#e6db74">&#34;&#34;</span> {
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">return</span> <span style="color:#a6e22e">fmt</span>.<span style="color:#a6e22e">Errorf</span>(<span style="color:#e6db74">&#34;action statement must be set when using status %q&#34;</span>, <span style="color:#a6e22e">s</span>)
</span></span><span style="display:flex;"><span>}
</span></span></code></pre></div><p>Trivy never calls it. Its <code>decodeOpenVEX</code> in <a href="https://github.com/aquasecurity/trivy/blob/v0.76.2/pkg/vex/document.go"><code>pkg/vex/document.go</code></a> runs <code>json.NewDecoder(r).Decode(&amp;openVEX)</code> and only checks that <code>@context</code> is not empty. go-vex&rsquo;s own <code>Parse</code> also just unmarshals. A non-conforming <code>affected</code> statement loads without complaint, and since Trivy does not suppress <code>affected</code> findings, the scan output looks identical either way.</p>
<p>On the producer side, vexctl (v0.4.4 and main) sets the <code>--action-statement</code> flag&rsquo;s default to the go-vex constant <code>NoActionStatementMsg</code>, which is the string <code>&quot;No action statement provided&quot;</code>. An <code>affected</code> statement created without <code>-a</code> therefore passes validation with a placeholder that tells a reader nothing. Search your VEX files for that string before publishing them.</p>
<h2 id="a-pre-publish-check-you-can-run">A pre-publish check you can run</h2>
<p>The script below flags the cases above. It is plain Python 3 with no dependencies; we ran it with Python 3 against the sample document that follows. It checks fields, not purl matching, so pair it with schema validation.</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:#75715e">#!/usr/bin/env python3</span>
</span></span><span style="display:flex;"><span><span style="color:#e6db74">&#34;&#34;&#34;Flag OpenVEX v0.2.0 statement fields that Trivy v0.76.2 / go-vex v0.2.9 will not act on.&#34;&#34;&#34;</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">import</span> json<span style="color:#f92672">,</span> sys
</span></span><span style="display:flex;"><span><span style="color:#f92672">from</span> datetime <span style="color:#f92672">import</span> datetime
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">def</span> <span style="color:#a6e22e">ts</span>(v):
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">return</span> datetime<span style="color:#f92672">.</span>fromisoformat(v<span style="color:#f92672">.</span>replace(<span style="color:#e6db74">&#34;Z&#34;</span>, <span style="color:#e6db74">&#34;+00:00&#34;</span>)) <span style="color:#66d9ef">if</span> v <span style="color:#66d9ef">else</span> <span style="color:#66d9ef">None</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>doc <span style="color:#f92672">=</span> json<span style="color:#f92672">.</span>load(open(sys<span style="color:#f92672">.</span>argv[<span style="color:#ae81ff">1</span>]))
</span></span><span style="display:flex;"><span>doc_ts <span style="color:#f92672">=</span> doc<span style="color:#f92672">.</span>get(<span style="color:#e6db74">&#34;timestamp&#34;</span>)
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">for</span> i, s <span style="color:#f92672">in</span> enumerate(doc<span style="color:#f92672">.</span>get(<span style="color:#e6db74">&#34;statements&#34;</span>, [])):
</span></span><span style="display:flex;"><span>    where <span style="color:#f92672">=</span> <span style="color:#e6db74">f</span><span style="color:#e6db74">&#34;statements[</span><span style="color:#e6db74">{</span>i<span style="color:#e6db74">}</span><span style="color:#e6db74">] </span><span style="color:#e6db74">{</span>s<span style="color:#f92672">.</span>get(<span style="color:#e6db74">&#39;vulnerability&#39;</span>, {})<span style="color:#f92672">.</span>get(<span style="color:#e6db74">&#39;name&#39;</span>)<span style="color:#e6db74">}</span><span style="color:#e6db74"> </span><span style="color:#e6db74">{</span>s<span style="color:#f92672">.</span>get(<span style="color:#e6db74">&#39;status&#39;</span>)<span style="color:#e6db74">}</span><span style="color:#e6db74">&#34;</span>
</span></span><span style="display:flex;"><span>    st <span style="color:#f92672">=</span> s<span style="color:#f92672">.</span>get(<span style="color:#e6db74">&#34;status&#34;</span>)
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">if</span> <span style="color:#e6db74">&#34;version&#34;</span> <span style="color:#f92672">in</span> s:
</span></span><span style="display:flex;"><span>        print(<span style="color:#e6db74">f</span><span style="color:#e6db74">&#34;</span><span style="color:#e6db74">{</span>where<span style="color:#e6db74">}</span><span style="color:#e6db74">: statement &#39;version&#39; is dropped when go-vex tools rewrite the file&#34;</span>)
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">if</span> <span style="color:#e6db74">&#34;supplier&#34;</span> <span style="color:#f92672">in</span> s:
</span></span><span style="display:flex;"><span>        print(<span style="color:#e6db74">f</span><span style="color:#e6db74">&#34;</span><span style="color:#e6db74">{</span>where<span style="color:#e6db74">}</span><span style="color:#e6db74">: statement &#39;supplier&#39; is dropped when go-vex tools rewrite the file&#34;</span>)
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">if</span> st <span style="color:#f92672">==</span> <span style="color:#e6db74">&#34;affected&#34;</span> <span style="color:#f92672">and</span> <span style="color:#f92672">not</span> s<span style="color:#f92672">.</span>get(<span style="color:#e6db74">&#34;action_statement&#34;</span>):
</span></span><span style="display:flex;"><span>        print(<span style="color:#e6db74">f</span><span style="color:#e6db74">&#34;</span><span style="color:#e6db74">{</span>where<span style="color:#e6db74">}</span><span style="color:#e6db74">: affected without action_statement (spec MUST; Trivy loads it anyway)&#34;</span>)
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">if</span> st <span style="color:#f92672">==</span> <span style="color:#e6db74">&#34;affected&#34;</span> <span style="color:#f92672">and</span> s<span style="color:#f92672">.</span>get(<span style="color:#e6db74">&#34;action_statement&#34;</span>) <span style="color:#f92672">==</span> <span style="color:#e6db74">&#34;No action statement provided&#34;</span>:
</span></span><span style="display:flex;"><span>        print(<span style="color:#e6db74">f</span><span style="color:#e6db74">&#34;</span><span style="color:#e6db74">{</span>where<span style="color:#e6db74">}</span><span style="color:#e6db74">: action_statement is the vexctl placeholder&#34;</span>)
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">if</span> st <span style="color:#f92672">==</span> <span style="color:#e6db74">&#34;not_affected&#34;</span> <span style="color:#f92672">and</span> <span style="color:#f92672">not</span> s<span style="color:#f92672">.</span>get(<span style="color:#e6db74">&#34;justification&#34;</span>):
</span></span><span style="display:flex;"><span>        print(<span style="color:#e6db74">f</span><span style="color:#e6db74">&#34;</span><span style="color:#e6db74">{</span>where<span style="color:#e6db74">}</span><span style="color:#e6db74">: not_affected with impact_statement only; Trivy reports an empty Statement&#34;</span>)
</span></span><span style="display:flex;"><span>    eff <span style="color:#f92672">=</span> ts(s<span style="color:#f92672">.</span>get(<span style="color:#e6db74">&#34;timestamp&#34;</span>) <span style="color:#f92672">or</span> doc_ts)
</span></span><span style="display:flex;"><span>    lu <span style="color:#f92672">=</span> ts(s<span style="color:#f92672">.</span>get(<span style="color:#e6db74">&#34;last_updated&#34;</span>))
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">if</span> lu <span style="color:#f92672">and</span> eff <span style="color:#f92672">and</span> lu <span style="color:#f92672">&gt;</span> eff:
</span></span><span style="display:flex;"><span>        print(<span style="color:#e6db74">f</span><span style="color:#e6db74">&#34;</span><span style="color:#e6db74">{</span>where<span style="color:#e6db74">}</span><span style="color:#e6db74">: last_updated </span><span style="color:#e6db74">{</span>s[<span style="color:#e6db74">&#39;last_updated&#39;</span>]<span style="color:#e6db74">}</span><span style="color:#e6db74"> is newer than the timestamp used for ordering (</span><span style="color:#e6db74">{</span>eff<span style="color:#f92672">.</span>isoformat()<span style="color:#e6db74">}</span><span style="color:#e6db74">)&#34;</span>)
</span></span></code></pre></div><p>Sample document (illustrative names and digest). The author edited the second statement on November 19, bumping <code>last_updated</code> and <code>version</code>, and expects <code>not_affected</code> to win:</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;@context&#34;</span>: <span style="color:#e6db74">&#34;https://openvex.dev/ns/v0.2.0&#34;</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">&#34;@id&#34;</span>: <span style="color:#e6db74">&#34;https://example.com/vex/app-2026-11-20&#34;</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">&#34;author&#34;</span>: <span style="color:#e6db74">&#34;Example Corp Product Security&#34;</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">&#34;timestamp&#34;</span>: <span style="color:#e6db74">&#34;2026-11-20T08:00:00Z&#34;</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">&#34;version&#34;</span>: <span style="color:#ae81ff">3</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">&#34;statements&#34;</span>: [
</span></span><span style="display:flex;"><span>    {
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">&#34;vulnerability&#34;</span>: {<span style="color:#f92672">&#34;name&#34;</span>: <span style="color:#e6db74">&#34;CVE-2024-32002&#34;</span>},
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">&#34;products&#34;</span>: [{<span style="color:#f92672">&#34;@id&#34;</span>: <span style="color:#e6db74">&#34;pkg:oci/app@sha256:abc&#34;</span>}],
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">&#34;status&#34;</span>: <span style="color:#e6db74">&#34;affected&#34;</span>,
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">&#34;timestamp&#34;</span>: <span style="color:#e6db74">&#34;2026-11-01T10:00:00Z&#34;</span>,
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">&#34;action_statement&#34;</span>: <span style="color:#e6db74">&#34;No action statement provided&#34;</span>
</span></span><span style="display:flex;"><span>    },
</span></span><span style="display:flex;"><span>    {
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">&#34;version&#34;</span>: <span style="color:#ae81ff">2</span>,
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">&#34;vulnerability&#34;</span>: {<span style="color:#f92672">&#34;name&#34;</span>: <span style="color:#e6db74">&#34;CVE-2024-32002&#34;</span>},
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">&#34;products&#34;</span>: [{<span style="color:#f92672">&#34;@id&#34;</span>: <span style="color:#e6db74">&#34;pkg:oci/app@sha256:abc&#34;</span>}],
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">&#34;status&#34;</span>: <span style="color:#e6db74">&#34;not_affected&#34;</span>,
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">&#34;timestamp&#34;</span>: <span style="color:#e6db74">&#34;2026-10-15T10:00:00Z&#34;</span>,
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">&#34;last_updated&#34;</span>: <span style="color:#e6db74">&#34;2026-11-19T12:00:00Z&#34;</span>,
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">&#34;impact_statement&#34;</span>: <span style="color:#e6db74">&#34;The vulnerable clone path is never called&#34;</span>
</span></span><span style="display:flex;"><span>    }
</span></span><span style="display:flex;"><span>  ]
</span></span><span style="display:flex;"><span>}
</span></span></code></pre></div><p>Output:</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-text" data-lang="text"><span style="display:flex;"><span>statements[0] CVE-2024-32002 affected: action_statement is the vexctl placeholder
</span></span><span style="display:flex;"><span>statements[1] CVE-2024-32002 not_affected: statement &#39;version&#39; is dropped when go-vex tools rewrite the file
</span></span><span style="display:flex;"><span>statements[1] CVE-2024-32002 not_affected: not_affected with impact_statement only; Trivy reports an empty Statement
</span></span><span style="display:flex;"><span>statements[1] CVE-2024-32002 not_affected: last_updated 2026-11-19T12:00:00Z is newer than the timestamp used for ordering (2026-10-15T10:00:00+00:00)
</span></span></code></pre></div><p>By go-vex&rsquo;s sort, the <code>affected</code> statement (timestamp November 1) is newer than the <code>not_affected</code> one (October 15), so Trivy keeps reporting the CVE. The fix is a new <code>not_affected</code> statement with a current timestamp and a <code>justification</code> label, not an edit to the old one.</p>
<h2 id="what-to-do">What to do</h2>
<ul>
<li><strong>Supersede, do not edit.</strong> Add a new statement with a newer <code>timestamp</code> for every status change. Treat <code>last_updated</code> as a note for humans.</li>
<li><strong>Always set <code>justification</code> on <code>not_affected</code>.</strong> Use <code>impact_statement</code> as extra detail, not as the only explanation, if a scanner report is what auditors see.</li>
<li><strong>Write real action statements.</strong> Reject <code>&quot;No action statement provided&quot;</code> in CI. Trivy will not use the text, but customers and your own triage queue will.</li>
<li><strong>Keep statement <code>version</code> and <code>supplier</code> out of go-vex round trips,</strong> or accept that they will be lost. Put supplier data on the product or subcomponent purl instead.</li>
<li><strong>Validate against the schema in CI.</strong> Neither Trivy nor go-vex&rsquo;s <code>Parse</code> will reject a non-conforming file for you. The <code>openvex_json_schema.json</code> file catches the missing <code>action_statement</code> and a statement <code>version</code> of 0.</li>
</ul>
<p>VEX is one input to the patch decision, alongside KEV, EPSS and SSVC. Our <a href="/posts/vulnerability-prioritization-workflow-cve-record-to-patch-ticket/">vulnerability prioritization workflow</a> shows where a <code>not_affected</code> statement should close a ticket, and where it should not.</p>
<h2 id="limits-of-this-article">Limits of this article</h2>
<p>This describes Trivy v0.76.2 and go-vex v0.2.9 as of November 20, 2026, read from source; we did not run Trivy itself. Other consumers (Grype, Docker Scout, vendor platforms) may read <code>status_notes</code> or <code>action_statement</code>, or sort on different fields. The go-vex validator and <code>vexctl validate</code> mentioned above are unreleased and may change before a tagged release. The Go round-trip test used a copy of go-vex&rsquo;s struct definition, not the library itself.</p>
<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>Statement field list, MUST/MAY wording, timestamp inheritance, update example</td>
          <td><a href="https://github.com/openvex/spec/blob/main/OPENVEX-SPEC.md">OpenVEX spec v0.2.0</a></td>
          <td>Verified</td>
      </tr>
      <tr>
          <td><code>action_statement</code> required for <code>affected</code>; statement <code>version</code> minimum 1</td>
          <td><a href="https://github.com/openvex/spec/blob/main/openvex_json_schema.json">openvex_json_schema.json</a></td>
          <td>Verified</td>
      </tr>
      <tr>
          <td>Statement struct fields; <code>SortStatements</code> compares timestamps only; <code>Validate()</code> rules</td>
          <td><a href="https://github.com/openvex/go-vex/blob/v0.2.9/pkg/vex/statement.go">go-vex v0.2.9 statement.go</a></td>
          <td>Verified</td>
      </tr>
      <tr>
          <td>Trivy takes the last matching statement, suppresses only <code>not_affected</code>/<code>fixed</code>, passes <code>justification</code> as Statement</td>
          <td><a href="https://github.com/aquasecurity/trivy/blob/v0.76.2/pkg/vex/openvex.go">Trivy v0.76.2 openvex.go</a>, <a href="https://github.com/aquasecurity/trivy/blob/v0.76.2/pkg/types/finding.go">finding.go</a></td>
          <td>Verified</td>
      </tr>
      <tr>
          <td>Trivy decodes OpenVEX without validation; pins go-vex v0.2.9</td>
          <td><a href="https://github.com/aquasecurity/trivy/blob/v0.76.2/pkg/vex/document.go">Trivy v0.76.2 document.go</a>, <a href="https://github.com/aquasecurity/trivy/blob/v0.76.2/go.mod">go.mod</a></td>
          <td>Verified</td>
      </tr>
      <tr>
          <td>vexctl&rsquo;s default action statement placeholder</td>
          <td><a href="https://github.com/openvex/vexctl/blob/v0.4.4/internal/cmd/options.go">vexctl options.go</a>, <a href="https://github.com/openvex/go-vex/blob/v0.2.9/pkg/vex/vex.go">go-vex vex.go</a></td>
          <td>Verified</td>
      </tr>
      <tr>
          <td>Unreleased validator warns that statement <code>version</code> and <code>supplier</code> are dropped</td>
          <td><a href="https://github.com/openvex/go-vex/blob/main/pkg/validate/schema.go">go-vex main pkg/validate/schema.go</a></td>
          <td>Qualified (unreleased)</td>
      </tr>
      <tr>
          <td><code>version</code> and <code>supplier</code> dropped on a JSON round trip</td>
          <td>Our Go 1.24.7 test with a copy of the go-vex struct</td>
          <td>Verified (reproduction, not the library)</td>
      </tr>
  </tbody>
</table>
]]></content:encoded></item></channel></rss>