From f3b56b24eae142d179bf94c0050fe6aa33064f1c Mon Sep 17 00:00:00 2001 From: Victoria Jeffrey Date: Tue, 20 Feb 2024 15:20:23 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20guard=20against=20nil=20aws=20ac?= =?UTF-8?q?count=20asset=20in=20discovery?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- providers/aws/resources/discovery.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/providers/aws/resources/discovery.go b/providers/aws/resources/discovery.go index e031ee345f..15b39839e5 100644 --- a/providers/aws/resources/discovery.go +++ b/providers/aws/resources/discovery.go @@ -190,8 +190,10 @@ func Discover(runtime *plugin.Runtime, filters connection.DiscoveryFilters) (*in if err != nil { return nil, err } - - awsAccount := res.(*mqlAwsAccount) + var awsAccount *mqlAwsAccount + if res != nil { + awsAccount = res.(*mqlAwsAccount) + } targets := handleTargets(conn.Conf.Discover.Targets) for i := range targets {