Skip to content

Commit

Permalink
add(dependencytrack): image digest to details (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
ybelMekk authored Sep 3, 2024
1 parent 6108202 commit 0bc4a23
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 0 deletions.
60 changes: 60 additions & 0 deletions internal/graph/gengql/generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions internal/graph/graphqls/image_details.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,5 @@ type Rekor {
runnerEnvironment: String!
sourceRepositoryOwnerURI: String!
integratedTime: Int!
imageDigestSHA: String!
}
1 change: 1 addition & 0 deletions internal/graph/model/models_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions internal/thirdparty/dependencytrack/dependencytrack.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,8 @@ func parseRekorTags(tags []dependencytrack.Tag) model.Rekor {
rekor.RunnerEnvironment = strings.TrimPrefix(tag.Name, dependencytrack.RekorRunnerEnvironmentTagPrefix.String())
case strings.Contains(tag.Name, dependencytrack.RekorTagPrefix.String()):
rekor.LogIndex = strings.TrimPrefix(tag.Name, dependencytrack.RekorTagPrefix.String())
case strings.Contains(tag.Name, dependencytrack.DigestTagPrefix.String()):
rekor.ImageDigestSha = strings.TrimPrefix(tag.Name, dependencytrack.DigestTagPrefix.String())
}
}
return rekor
Expand Down

0 comments on commit 0bc4a23

Please sign in to comment.