From 7cb57c8f7a91d30ebed5a53446570fb1b1e23ec8 Mon Sep 17 00:00:00 2001 From: fujiwara Date: Sat, 2 Nov 2024 00:40:21 +0900 Subject: [PATCH] Refactor lambda.go to correctly handle the number of kept versions in scanLambdaFunctions --- lambda.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lambda.go b/lambda.go index 6d4e443..2997480 100644 --- a/lambda.go +++ b/lambda.go @@ -65,7 +65,7 @@ func (s *Scanner) scanLambdaFunctions(ctx context.Context, lcs []*LambdaConfig) return ok } kept++ - return kept < keepCount + return kept <= keepCount }) for _, v := range scanVersions { if err := s.scanLambdaFunctionArn(ctx, *v.FunctionArn, aliases[*v.Version]...); err != nil {