From 4d4d2cf52affd4c1faad609a80730ec2dc0212c6 Mon Sep 17 00:00:00 2001 From: guangwu Date: Mon, 4 Mar 2024 18:08:25 +0800 Subject: [PATCH] fix: typo function name and comment optimization (#6200) Signed-off-by: guoguangwu --- pkg/k8s/k8s.go | 6 +++--- pkg/k8s/scanner/scanner.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/k8s/k8s.go b/pkg/k8s/k8s.go index faca5c25e924..91d09e0be64b 100644 --- a/pkg/k8s/k8s.go +++ b/pkg/k8s/k8s.go @@ -28,12 +28,12 @@ func NewScanKubernetes(s local.Scanner) *ScanKubernetes { return &ScanKubernetes{localScanner: s} } -// NewKubenetesScanner is the factory method for scanner -func NewKubenetesScanner() *ScanKubernetes { +// NewKubernetesScanner is the factory method for scanner +func NewKubernetesScanner() *ScanKubernetes { return initializeScanK8s(nil) } -// // Scan scans k8s core components and return it findings +// Scan scans k8s core components and return it findings func (sk ScanKubernetes) Scan(ctx context.Context, target types.ScanTarget, options types.ScanOptions) (types.Results, ftypes.OS, error) { return sk.localScanner.ScanTarget(ctx, target, options) } diff --git a/pkg/k8s/scanner/scanner.go b/pkg/k8s/scanner/scanner.go index 2c70b51f6173..ff5018406b66 100644 --- a/pkg/k8s/scanner/scanner.go +++ b/pkg/k8s/scanner/scanner.go @@ -229,7 +229,7 @@ func (s *Scanner) scanK8sVulns(ctx context.Context, artifactsData []*artifacts.A return resources, nil } - k8sScanner := k8s.NewKubenetesScanner() + k8sScanner := k8s.NewKubernetesScanner() scanOptions := types.ScanOptions{ Scanners: s.opts.Scanners, VulnType: s.opts.VulnType,