From 8515743253605c9dfe9ec6f2a27e949f4f0c9f4d Mon Sep 17 00:00:00 2001 From: Edoardo Rosa <6991986+notdodo@users.noreply.github.com> Date: Thu, 25 Apr 2024 21:43:38 +0200 Subject: [PATCH] fix: lint --- cmd/assess.go | 2 +- connector/cloud_connector.go | 88 ++++++++++++++++++------------------ 2 files changed, 45 insertions(+), 45 deletions(-) diff --git a/cmd/assess.go b/cmd/assess.go index 331a62d..c5b5cbd 100644 --- a/cmd/assess.go +++ b/cmd/assess.go @@ -18,7 +18,7 @@ import ( var assessCmd = &cobra.Command{ Use: "assess", - Short: "Execute assessment queries agains data loaded in Neo4J", + Short: "Execute assessment queries against data loaded in Neo4J", Run: func(cmd *cobra.Command, args []string) { if cmd.Flags().Changed(flagVerbose) { logger.SetVerboseLevel() diff --git a/connector/cloud_connector.go b/connector/cloud_connector.go index fdb842b..a13b0e0 100644 --- a/connector/cloud_connector.go +++ b/connector/cloud_connector.go @@ -24,54 +24,54 @@ func SetActions() { func (cc *CloudConnector) DumpAll(cloudprovider string, c chan map[string]interface{}) { switch strings.ToLower(cloudprovider) { case "aws": - // whoami := cc.AWSConfig.DumpWhoami() - // c <- map[string]interface{}{ - // "Whoami": whoami, - // } - // credentialReport := cc.AWSConfig.DumpCredentialReport() - // c <- map[string]interface{}{ - // "CredentialReport": credentialReport, - // } - // groups := cc.AWSConfig.DumpIAMGroups() - // c <- map[string]interface{}{ - // "Groups": groups, - // } - // users := cc.AWSConfig.DumpIAMUsers() - // c <- map[string]interface{}{ - // "Users": users, - // } - // roles := cc.AWSConfig.DumpIAMRoles() - // c <- map[string]interface{}{ - // "Roles": roles, - // } + whoami := cc.AWSConfig.DumpWhoami() + c <- map[string]interface{}{ + "Whoami": whoami, + } + credentialReport := cc.AWSConfig.DumpCredentialReport() + c <- map[string]interface{}{ + "CredentialReport": credentialReport, + } + groups := cc.AWSConfig.DumpIAMGroups() + c <- map[string]interface{}{ + "Groups": groups, + } + users := cc.AWSConfig.DumpIAMUsers() + c <- map[string]interface{}{ + "Users": users, + } + roles := cc.AWSConfig.DumpIAMRoles() + c <- map[string]interface{}{ + "Roles": roles, + } buckets := cc.AWSConfig.DumpBuckets() c <- map[string]interface{}{ "Buckets": buckets, } - // ec2 := cc.AWSConfig.DumpEC2Instances() - // c <- map[string]interface{}{ - // "EC2s": ec2, - // } - // vpc := cc.AWSConfig.DumpVpcs() - // c <- map[string]interface{}{ - // "VPCs": vpc, - // } - // lambda := cc.AWSConfig.DumpLambdas() - // c <- map[string]interface{}{ - // "Lambdas": lambda, - // } - // rds := cc.AWSConfig.DumpRDS() - // c <- map[string]interface{}{ - // "RDS": rds, - // } - // dynamodb := cc.AWSConfig.DumpDynamoDBs() - // c <- map[string]interface{}{ - // "DynamoDBs": dynamodb, - // } - // redshift := cc.AWSConfig.DumpRedshiftDBs() - // c <- map[string]interface{}{ - // "RedshiftDBs": redshift, - // } + ec2 := cc.AWSConfig.DumpEC2Instances() + c <- map[string]interface{}{ + "EC2s": ec2, + } + vpc := cc.AWSConfig.DumpVpcs() + c <- map[string]interface{}{ + "VPCs": vpc, + } + lambda := cc.AWSConfig.DumpLambdas() + c <- map[string]interface{}{ + "Lambdas": lambda, + } + rds := cc.AWSConfig.DumpRDS() + c <- map[string]interface{}{ + "RDS": rds, + } + dynamodb := cc.AWSConfig.DumpDynamoDBs() + c <- map[string]interface{}{ + "DynamoDBs": dynamodb, + } + redshift := cc.AWSConfig.DumpRedshiftDBs() + c <- map[string]interface{}{ + "RedshiftDBs": redshift, + } close(c) default: }