Skip to content

Commit

Permalink
fix: add publishedAt and updatedAt fields when mocking query
Browse files Browse the repository at this point in the history
Signed-off-by: felipecruz91 <[email protected]>
  • Loading branch information
felipecruz91 committed Jan 29, 2024
1 parent faa37b7 commit 47f954c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions policy/policy_handler/legacy/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ func MockImagePackagesByDigestForLocalEval(sb *types.SBOM) ImagePackagesByDigest
Severity: &v.Cvss.Severity,
Score: &v.Cvss.Score,
},
PublishedAt: v.PublishedAt,
UpdatedAt: v.UpdatedAt,
FixedBy: &v.FixedBy,
Source: v.Source,
SourceID: v.SourceId,
Expand Down
2 changes: 2 additions & 0 deletions policy/types/graphql_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ type Vulnerability struct {
VulnerableRange string `graphql:"vulnerableRange" json:"vulnerable_range,omitempty"`
FixedBy string `graphql:"fixedBy" json:"fixed_by,omitempty"`
Url string `graphql:"url" json:"url,omitempty"`
PublishedAt string `graphql:"publishedAt" json:"published_at,omitempty"`
UpdatedAt string `graphql:"updatedAt" json:"updated_at,omitempty"`
Cvss struct {
Score float32 `graphql:"score" json:"score,omitempty"`
Severity string `graphql:"severity" json:"severity,omitempty"`
Expand Down

0 comments on commit 47f954c

Please sign in to comment.