Skip to content

Commit

Permalink
chore: add an error message
Browse files Browse the repository at this point in the history
Signed-off-by: knqyf263 <[email protected]>
  • Loading branch information
knqyf263 committed May 21, 2024
1 parent b45c21e commit 34483c2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/vex/vex.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,20 @@ import (
"io"
"os"

csaf "github.com/csaf-poc/csaf_distribution/v3/csaf"
"github.com/aquasecurity/trivy/pkg/uuid"
"github.com/csaf-poc/csaf_distribution/v3/csaf"
"github.com/hashicorp/go-multierror"
openvex "github.com/openvex/go-vex/pkg/vex"
"github.com/samber/lo"
"github.com/sirupsen/logrus"
"golang.org/x/xerrors"

"github.com/aquasecurity/trivy/pkg/fanal/artifact"
"github.com/aquasecurity/trivy/pkg/log"
"github.com/aquasecurity/trivy/pkg/sbom"
"github.com/aquasecurity/trivy/pkg/sbom/core"
"github.com/aquasecurity/trivy/pkg/sbom/cyclonedx"
"github.com/aquasecurity/trivy/pkg/types"
"github.com/aquasecurity/trivy/pkg/uuid"
)

// VEX represents Vulnerability Exploitability eXchange. It abstracts multiple VEX formats.
Expand Down Expand Up @@ -121,6 +122,7 @@ func filterVulnerabilities(result *types.Result, bom *core.BOM, fn NotAffected)

c, ok := components[vuln.PkgIdentifier.UID]
if !ok {
log.Error("Component not found", log.String("uid", vuln.PkgIdentifier.UID))
return true // Should never reach here
}

Expand Down

0 comments on commit 34483c2

Please sign in to comment.