Skip to content

Commit b1a8050

Browse files
committed
return the latest effective statement
Signed-off-by: knqyf263 <[email protected]>
1 parent 6377b4f commit b1a8050

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/vex/vex.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,8 @@ func (vexDoc *VEX) EffectiveStatement(product, vulnID string) (s *Statement) {
145145
SortStatements(statements, t)
146146

147147
for i := len(statements) - 1; i >= 0; i-- {
148-
if !statements[i].Matches(vulnID, product, nil) {
149-
continue
148+
if statements[i].Matches(vulnID, product, nil) {
149+
return &statements[i]
150150
}
151151
}
152152
return nil

0 commit comments

Comments
 (0)