feat(image): enforce image platform (#4083)

This commit is contained in:
Teppei Fukuda
2023-05-08 21:04:22 +03:00
committed by GitHub
parent 9c87cb2710
commit 55fb723a6e
8 changed files with 142 additions and 64 deletions

View File

@@ -550,7 +550,6 @@ func initScannerConfig(opts flag.Options, cacheClient cache.Cache) (ScannerConfi
Scanners: opts.Scanners,
ImageConfigScanners: opts.ImageConfigScanners, // this is valid only for 'image' subcommand
ScanRemovedPackages: opts.ScanRemovedPkgs, // this is valid only for 'image' subcommand
Platform: opts.Platform, // this is valid only for 'image' subcommand
ListAllPackages: opts.ListAllPkgs,
LicenseCategories: opts.LicenseCategories,
FilePatterns: opts.FilePatterns,
@@ -642,11 +641,10 @@ func initScannerConfig(opts flag.Options, cacheClient cache.Cache) (ScannerConfi
RepoTag: opts.RepoTag,
SBOMSources: opts.SBOMSources,
RekorURL: opts.RekorURL,
Platform: opts.Platform,
DockerHost: opts.DockerHost,
Slow: opts.Slow,
AWSRegion: opts.Region,
FileChecksum: fileChecksum,
//Platform: opts.Platform,
Slow: opts.Slow,
AWSRegion: opts.Region,
FileChecksum: fileChecksum,
// For image scanning
ImageOption: ftypes.ImageOptions{