From 54f0d508198e1ec8934f341f9d9a5e3b0d746c98 Mon Sep 17 00:00:00 2001 From: Whitney Smith Date: Wed, 20 Sep 2023 00:15:30 +0000 Subject: [PATCH] feat: add short lived instance field in agentless data structs --- api/cloud_accounts_aws_sidekick.go | 1 + api/cloud_accounts_aws_sidekick_org.go | 1 + api/cloud_accounts_aws_sidekick_org_test.go | 3 +++ api/cloud_accounts_aws_sidekick_test.go | 5 ++++- 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/api/cloud_accounts_aws_sidekick.go b/api/cloud_accounts_aws_sidekick.go index 2943fa7f0..fbce51146 100644 --- a/api/cloud_accounts_aws_sidekick.go +++ b/api/cloud_accounts_aws_sidekick.go @@ -71,6 +71,7 @@ type AwsSidekickData struct { ScanHostVulnerabilities bool `json:"scanHostVulnerabilities"` ScanMultiVolume bool `json:"scanMultiVolume"` ScanStoppedInstances bool `json:"scanStoppedInstances"` + ScanShortLivedInstances bool `json:"scanShortLivedInstances"` AccountID string `json:"awsAccountId,omitempty"` BucketArn string `json:"bucketArn,omitempty"` diff --git a/api/cloud_accounts_aws_sidekick_org.go b/api/cloud_accounts_aws_sidekick_org.go index d1a8c8a7f..3cb750ba5 100644 --- a/api/cloud_accounts_aws_sidekick_org.go +++ b/api/cloud_accounts_aws_sidekick_org.go @@ -72,6 +72,7 @@ type AwsSidekickOrgData struct { ScanHostVulnerabilities bool `json:"scanHostVulnerabilities"` ScanMultiVolume bool `json:"scanMultiVolume"` ScanStoppedInstances bool `json:"scanStoppedInstances"` + ScanShortLivedInstances bool `json:"scanShortLivedInstances"` //Properties specific to the AWS organization integration type ScanningAccount string `json:"scanningAccount"` diff --git a/api/cloud_accounts_aws_sidekick_org_test.go b/api/cloud_accounts_aws_sidekick_org_test.go index 187029833..86aa07b6b 100644 --- a/api/cloud_accounts_aws_sidekick_org_test.go +++ b/api/cloud_accounts_aws_sidekick_org_test.go @@ -193,6 +193,9 @@ func singleAwsSidekickOrgCloudAccount(id string) string { "scanFrequency": 24, "scanContainers": true, "scanHostVulnerabilities": true, + "scanShortLivedInstances": false, + "scanStoppedInstances": true, + "scanMultiVolume": false, "managementAccount": "000123456789", "monitoredAccounts": "r-1234, ou-0987", "scanningAccount": "123456789000" diff --git a/api/cloud_accounts_aws_sidekick_test.go b/api/cloud_accounts_aws_sidekick_test.go index a075ae9cc..cf2334868 100644 --- a/api/cloud_accounts_aws_sidekick_test.go +++ b/api/cloud_accounts_aws_sidekick_test.go @@ -150,7 +150,10 @@ func singleAwsSidekickCloudAccount(id string) string { }, "scanFrequency": 24, "scanContainers": true, - "scanHostVulnerabilities": true + "scanHostVulnerabilities": true, + "scanShortLivedInstances": false, + "scanStoppedInstances": true, + "scanMultiVolume": false }, "enabled": 1, "intgGuid": "` + id + `",