mirror of
https://github.com/project-zot/zot.git
synced 2025-01-06 22:40:28 -05:00
ab9a20c1ae
If this GraphQL API is available, try that first, else fallback to the slowpath. Signed-off-by: Roxana Nemulescu <roxana.nemulescu@gmail.com>
35 lines
744 B
Go
35 lines
744 B
Go
// Package cveinfo ...
|
|
package cveinfo
|
|
|
|
import (
|
|
v1 "github.com/google/go-containerregistry/pkg/v1"
|
|
"github.com/opencontainers/go-digest"
|
|
"github.com/urfave/cli/v2"
|
|
"zotregistry.io/zot/pkg/extensions/search/common"
|
|
"zotregistry.io/zot/pkg/log"
|
|
"zotregistry.io/zot/pkg/storage"
|
|
)
|
|
|
|
// CveInfo ...
|
|
type CveInfo struct {
|
|
Log log.Logger
|
|
CveTrivyController CveTrivyController
|
|
StoreController storage.StoreController
|
|
LayoutUtils *common.BaseOciLayoutUtils
|
|
}
|
|
|
|
type CveTrivyController struct {
|
|
DefaultCveConfig *TrivyCtx
|
|
SubCveConfig map[string]*TrivyCtx
|
|
}
|
|
|
|
type TrivyCtx struct {
|
|
Input string
|
|
Ctx *cli.Context
|
|
}
|
|
|
|
type ImageInfoByCVE struct {
|
|
Tag string
|
|
Digest digest.Digest
|
|
Manifest v1.Manifest
|
|
}
|