You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It declares that `Module B` is not affected by CVE-XXXX-YYYY on `Module C`.
513
+
514
+
!!! note
515
+
The VEX in this example defines the relationship between `Module B` and `Module C`.
516
+
However, as Trivy traverses all parents from vulnerable packages, it is also possible to define a VEX for the relationship between a vulnerable package and any parent, such as `Module A` and `Module C`, etc.
517
+
518
+
Mapping this VEX onto the dependency tree would look like this:
519
+
520
+
```mermaid
521
+
graph TD;
522
+
modRootA(Module Root A v1.0.0)
523
+
524
+
subgraph "VEX (Not Affected)"
525
+
modB(Module B v1.0.0)
526
+
modC(Module C v2.0.0)
527
+
end
528
+
529
+
modRootA-->modB
530
+
modB-->modC
531
+
```
532
+
533
+
In this case, it's clear that `Module Root A` is also not affected by CVE-XXXX-YYYY, so this vulnerability is suppressed.
534
+
535
+
Now, let's consider another project:
536
+
537
+
```mermaid
538
+
graph TD;
539
+
modRootZ(Module Root Z v1.0.0)
540
+
modB'(Module B v1.0.0)
541
+
modC'(Module C v2.0.0)
542
+
modD'(Module D v3.0.0)
543
+
544
+
modRootZ-->modB'
545
+
modRootZ-->modD'
546
+
modB'-->modC'
547
+
modD'-->modC'
548
+
```
549
+
550
+
Assuming the same VEX as before, applying it to this dependency tree would look like:
551
+
552
+
```mermaid
553
+
graph TD;
554
+
modRootZ(Module Root Z v1.0.0)
555
+
556
+
subgraph "VEX (Not Affected)"
557
+
modB'(Module B v1.0.0)
558
+
modC'(Module C v2.0.0)
559
+
end
560
+
561
+
modD'(Module D v3.0.0)
562
+
563
+
modRootZ-->modB'
564
+
modRootZ-->modD'
565
+
modB'-->modC'
566
+
modD'-->modC'
567
+
```
568
+
569
+
`Module Root Z` depends on `Module C` via multiple paths.
570
+
While the VEX tells us that `Module B` is not affected by the vulnerability, `Module D` might be.
571
+
In the absence of a VEX, the default assumption is that it is affected.
572
+
Taking all of this into account, Trivy determines that `Module Root Z` is affected by this vulnerability.
0 commit comments