From 787f3f90894ee1adf9f5c7fc7a125df1f24af04d Mon Sep 17 00:00:00 2001 From: chenk Date: Fri, 16 Jun 2023 18:09:14 +0300 Subject: [PATCH] fix: config secret scan fs mode (#1301) Signed-off-by: chenk --- pkg/plugins/trivy/plugin.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/plugins/trivy/plugin.go b/pkg/plugins/trivy/plugin.go index bdb978098..aca2c7ecd 100644 --- a/pkg/plugins/trivy/plugin.go +++ b/pkg/plugins/trivy/plugin.go @@ -1638,6 +1638,7 @@ func (p *plugin) getFSScanningArgs(ctx trivyoperator.PluginContext, command Comm return []string{} } scanners := Scanners(c) + imcs := p.imageConfigSecretScanner(c.Data) skipUpdate := SkipDBUpdate(c) args := []string{ "--cache-dir", @@ -1651,6 +1652,9 @@ func (p *plugin) getFSScanningArgs(ctx trivyoperator.PluginContext, command Comm "json", "/", } + if len(imcs) > 0 { + args = append(args, imcs...) + } if mode == ClientServer { args = append(args, "--server", trivyServerURL) }