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/**' 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++ } }