55
66 "golang.org/x/xerrors"
77
8- "github.com/aquasecurity/trivy/pkg/fanal/walker"
98 "github.com/aquasecurity/trivy/pkg/scanner"
109)
1110
@@ -110,10 +109,7 @@ func sbomRemoteScanner(ctx context.Context, conf ScannerConfig) (scanner.Scanner
110109
111110// vmStandaloneScanner initializes a VM scanner in standalone mode
112111func vmStandaloneScanner (ctx context.Context , conf ScannerConfig ) (scanner.Scanner , func (), error ) {
113- // TODO: The walker should be initialized in initializeVMScanner after https://github.com/aquasecurity/trivy/pull/5180
114- w := walker .NewVM (conf .ArtifactOption .SkipFiles , conf .ArtifactOption .SkipDirs )
115- s , cleanup , err := initializeVMScanner (ctx , conf .Target , conf .ArtifactCache , conf .LocalArtifactCache ,
116- w , conf .ArtifactOption )
112+ s , cleanup , err := initializeVMScanner (ctx , conf .Target , conf .ArtifactCache , conf .LocalArtifactCache , conf .ArtifactOption )
117113 if err != nil {
118114 return scanner.Scanner {}, func () {}, xerrors .Errorf ("unable to initialize a vm scanner: %w" , err )
119115 }
@@ -122,9 +118,7 @@ func vmStandaloneScanner(ctx context.Context, conf ScannerConfig) (scanner.Scann
122118
123119// vmRemoteScanner initializes a VM scanner in client/server mode
124120func vmRemoteScanner (ctx context.Context , conf ScannerConfig ) (scanner.Scanner , func (), error ) {
125- // TODO: The walker should be initialized in initializeVMScanner after https://github.com/aquasecurity/trivy/pull/5180
126- w := walker .NewVM (conf .ArtifactOption .SkipFiles , conf .ArtifactOption .SkipDirs )
127- s , cleanup , err := initializeRemoteVMScanner (ctx , conf .Target , conf .ArtifactCache , w , conf .ServerOption , conf .ArtifactOption )
121+ s , cleanup , err := initializeRemoteVMScanner (ctx , conf .Target , conf .ArtifactCache , conf .ServerOption , conf .ArtifactOption )
128122 if err != nil {
129123 return scanner.Scanner {}, func () {}, xerrors .Errorf ("unable to initialize a remote vm scanner: %w" , err )
130124 }
0 commit comments