mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-22 07:10:41 -08:00
feat: add auth support for downloading OCI artifacts (#3915)
This commit is contained in:
@@ -35,7 +35,7 @@ func Run(ctx context.Context, opts flag.Options) (err error) {
|
||||
|
||||
// download the database file
|
||||
if err = operation.DownloadDB(opts.AppVersion, opts.CacheDir, opts.DBRepository,
|
||||
true, opts.Insecure, opts.SkipDBUpdate); err != nil {
|
||||
true, opts.SkipDBUpdate, opts.Remote()); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -57,6 +57,7 @@ func Run(ctx context.Context, opts flag.Options) (err error) {
|
||||
}
|
||||
m.Register()
|
||||
|
||||
server := rpcServer.NewServer(opts.AppVersion, opts.Listen, opts.CacheDir, opts.Token, opts.TokenHeader, opts.DBRepository)
|
||||
return server.ListenAndServe(cache, opts.Insecure, opts.SkipDBUpdate)
|
||||
server := rpcServer.NewServer(opts.AppVersion, opts.Listen, opts.CacheDir, opts.Token, opts.TokenHeader,
|
||||
opts.DBRepository, opts.Remote())
|
||||
return server.ListenAndServe(cache, opts.SkipDBUpdate)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user