From dd6f0c25c80b4c1b1b9a288506aad07f10a46d24 Mon Sep 17 00:00:00 2001 From: Vladimir Andjelkoski Date: Tue, 28 Jan 2025 10:30:13 +0100 Subject: [PATCH 1/2] chore(AwsVpcPeering): improper error handling (#990) --- pkg/kcp/provider/aws/mock/routeTablesStore.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pkg/kcp/provider/aws/mock/routeTablesStore.go b/pkg/kcp/provider/aws/mock/routeTablesStore.go index f813b27d9..6aa95924b 100644 --- a/pkg/kcp/provider/aws/mock/routeTablesStore.go +++ b/pkg/kcp/provider/aws/mock/routeTablesStore.go @@ -108,12 +108,17 @@ func (s *routeTablesStore) DeleteRoute(ctx context.Context, routeTableId, destin } func (s *routeTablesStore) GetRouteCount(ctx context.Context, vpcId, vpcPeeringConnectionId, destinationCidrBlock string) int { - tables, _ := s.DescribeRouteTables(ctx, vpcId) + tables, err := s.DescribeRouteTables(ctx, vpcId) + + if err != nil { + return -1 + } + cnt := 0 for _, t := range tables { for _, r := range t.Routes { - if *r.VpcPeeringConnectionId == vpcPeeringConnectionId && - *r.DestinationCidrBlock == destinationCidrBlock { + if ptr.Deref(r.VpcPeeringConnectionId, "") == vpcPeeringConnectionId && + ptr.Deref(r.DestinationCidrBlock, "") == destinationCidrBlock { cnt++ } } From 187ba20aa6d70e6aa22ec41b979a2acbb27282f7 Mon Sep 17 00:00:00 2001 From: Milos Tomic <59831542+tmilos77@users.noreply.github.com> Date: Tue, 28 Jan 2025 10:46:52 +0100 Subject: [PATCH 2/2] chore: remove obsolete/non-working cx config (#991) --- .checkmarx/config.yml | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 .checkmarx/config.yml diff --git a/.checkmarx/config.yml b/.checkmarx/config.yml deleted file mode 100644 index 7bac1dca4..000000000 --- a/.checkmarx/config.yml +++ /dev/null @@ -1,6 +0,0 @@ -version: 1 -checkmarx: - scan: - configs: - sast: - filter: '!pkg/testinfra/**,!cmd/cli/**'