Skip to content

Commit

Permalink
Fix matching typos (#21590)
Browse files Browse the repository at this point in the history
  • Loading branch information
RachelElysia authored Aug 28, 2024
1 parent edcd235 commit b0b6a3b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ const SoftwareVulnerabilities = ({
} else if (error.status === 404) {
if (
error?.data?.errors &&
(error.data.errors[0].reason.includes("This is not known CVE.") ||
(error.data.errors[0].reason.includes("This is not a known CVE.") ||
error.data.errors[0].reason.includes(
"was not found in the datastore"
))
Expand Down
5 changes: 3 additions & 2 deletions server/service/vulnerabilities.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type cveNotFoundError struct{}
var _ fleet.NotFoundError = (*cveNotFoundError)(nil)

func (p cveNotFoundError) Error() string {
return "This is not known CVE. None of Fleet’s vulnerability sources are aware of this CVE."
return "This is not a known CVE. None of Fleet’s vulnerability sources are aware of this CVE."
}

func (p cveNotFoundError) IsNotFound() bool {
Expand Down Expand Up @@ -174,7 +174,8 @@ func getVulnerabilityEndpoint(ctx context.Context, req interface{}, svc fleet.Se
}

func (svc *Service) Vulnerability(ctx context.Context, cve string, teamID *uint, useCVSScores bool) (vuln *fleet.VulnerabilityWithMetadata,
known bool, err error) {
known bool, err error,
) {
if err := svc.authz.Authorize(ctx, &fleet.AuthzSoftwareInventory{TeamID: teamID}, fleet.ActionRead); err != nil {
return nil, false, err
}
Expand Down

0 comments on commit b0b6a3b

Please sign in to comment.