From 63ab3c7f74a24aeed2ae16dbf1945d8775bf7de0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Sep 2024 21:10:54 +0000 Subject: [PATCH] build(deps): bump github.com/lacework/go-sdk from 1.49.0 to 1.53.0 Bumps [github.com/lacework/go-sdk](https://github.com/lacework/go-sdk) from 1.49.0 to 1.53.0. - [Release notes](https://github.com/lacework/go-sdk/releases) - [Changelog](https://github.com/lacework/go-sdk/blob/main/CHANGELOG.md) - [Commits](https://github.com/lacework/go-sdk/compare/v1.49.0...v1.53.0) --- updated-dependencies: - dependency-name: github.com/lacework/go-sdk dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- vendor/github.com/lacework/go-sdk/api/client.go | 4 ++-- .../lacework/go-sdk/api/component_data.go | 7 ++++++- vendor/github.com/lacework/go-sdk/api/lql.go | 16 ++-------------- .../lacework/go-sdk/api/lql_validate.go | 3 +-- vendor/github.com/lacework/go-sdk/api/policy.go | 4 +--- .../lacework/go-sdk/api/v2_vulnerabilities.go | 15 +++++++++++++++ vendor/github.com/lacework/go-sdk/api/version.go | 4 ++-- vendor/modules.txt | 2 +- 10 files changed, 33 insertions(+), 28 deletions(-) diff --git a/go.mod b/go.mod index 11cda5b71..e8e82cb23 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.21 require ( github.com/gruntwork-io/terratest v0.46.15 github.com/hashicorp/terraform-plugin-sdk/v2 v2.27.0 - github.com/lacework/go-sdk v1.49.0 + github.com/lacework/go-sdk v1.53.0 github.com/pkg/errors v0.9.1 github.com/stretchr/testify v1.8.4 golang.org/x/text v0.14.0 diff --git a/go.sum b/go.sum index 8fabf474a..0eab0441b 100644 --- a/go.sum +++ b/go.sum @@ -421,8 +421,8 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/lacework/go-sdk v1.49.0 h1:SgjQ5eudkSPHTzAquWLaJZKo8qRgEXOdqL+Tnw+cVMI= -github.com/lacework/go-sdk v1.49.0/go.mod h1:l0kCskNExDs1E8fBfpaZeafC42pmKucdXn3nZO1iyLI= +github.com/lacework/go-sdk v1.53.0 h1:3dZpe8M//pQw7uM5DJbpXxm7gp++e6Sidb3jHM73Esg= +github.com/lacework/go-sdk v1.53.0/go.mod h1:l0kCskNExDs1E8fBfpaZeafC42pmKucdXn3nZO1iyLI= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= diff --git a/vendor/github.com/lacework/go-sdk/api/client.go b/vendor/github.com/lacework/go-sdk/api/client.go index 95fa7a352..37d41b669 100644 --- a/vendor/github.com/lacework/go-sdk/api/client.go +++ b/vendor/github.com/lacework/go-sdk/api/client.go @@ -36,8 +36,8 @@ import ( ) const ( - defaultTimeout = 60 * time.Second - defaultTLSTimeout = 63 * time.Second + defaultTimeout = 120 * time.Second + defaultTLSTimeout = 123 * time.Second ) type Client struct { diff --git a/vendor/github.com/lacework/go-sdk/api/component_data.go b/vendor/github.com/lacework/go-sdk/api/component_data.go index 6ceb15157..b434d69e5 100644 --- a/vendor/github.com/lacework/go-sdk/api/component_data.go +++ b/vendor/github.com/lacework/go-sdk/api/component_data.go @@ -17,8 +17,9 @@ type ComponentDataService struct { const URL_TYPE_DEFAULT = "Default" const URL_TYPE_SAST_TABLES = "SastTables" +const URL_TYPE_PROSAST = "ProSast" -var URL_TYPES = []string{URL_TYPE_DEFAULT, URL_TYPE_SAST_TABLES} +var URL_TYPES = []string{URL_TYPE_DEFAULT, URL_TYPE_SAST_TABLES, URL_TYPE_PROSAST} type ComponentDataInitialRequest struct { Name string `json:"name"` @@ -70,6 +71,10 @@ func (svc *ComponentDataService) UploadSastTables( return svc.doUploadFiles(name, []string{"sast"}, paths, URL_TYPE_SAST_TABLES) } +func (svc *ComponentDataService) UploadProSast(name string, paths []string) (string, error) { + return svc.doUploadFiles(name, []string{"sast"}, paths, URL_TYPE_PROSAST) +} + func (svc *ComponentDataService) doUploadFiles( name string, tags []string, paths []string, urlType string) (string, error) { var hasValidType = false diff --git a/vendor/github.com/lacework/go-sdk/api/lql.go b/vendor/github.com/lacework/go-sdk/api/lql.go index e30caa5a6..ae476d4db 100644 --- a/vendor/github.com/lacework/go-sdk/api/lql.go +++ b/vendor/github.com/lacework/go-sdk/api/lql.go @@ -29,9 +29,8 @@ import ( ) type NewQuery struct { - QueryID string `json:"queryId" yaml:"queryId"` - QueryLanguage *string `json:"queryLanguage,omitempty" yaml:"queryLanguage,omitempty"` - QueryText string `json:"queryText" yaml:"queryText"` + QueryID string `json:"queryId" yaml:"queryId"` + QueryText string `json:"queryText" yaml:"queryText"` } func ParseNewQuery(s string) (NewQuery, error) { @@ -50,7 +49,6 @@ func ParseNewQuery(s string) (NewQuery, error) { if err == nil && !reflect.DeepEqual(query, NewQuery{}) { // empty string unmarshals w/o error return query, nil } - // invalid query return query, errors.New("unable to parse query") } @@ -61,7 +59,6 @@ type UpdateQuery struct { type Query struct { QueryID string `json:"queryId" yaml:"queryId"` - QueryLanguage *string `json:"queryLanguage,omitempty" yaml:"queryLanguage,omitempty"` QueryText string `json:"queryText" yaml:"queryText"` Owner string `json:"owner"` LastUpdateTime string `json:"lastUpdateTime"` @@ -134,12 +131,3 @@ func (svc *QueryService) Get(id string) ( ) return } - -func (svc *QueryService) RegoQueryEnabled() bool { - response, err := svc.client.V2.FeatureFlags.GetFeatureFlagsMatchingPrefix("PUBLIC.lpp_rego_enabled") - if err != nil { - return false - } - - return len(response.Data.Flags) >= 1 -} diff --git a/vendor/github.com/lacework/go-sdk/api/lql_validate.go b/vendor/github.com/lacework/go-sdk/api/lql_validate.go index 1857ff52e..1349242bd 100644 --- a/vendor/github.com/lacework/go-sdk/api/lql_validate.go +++ b/vendor/github.com/lacework/go-sdk/api/lql_validate.go @@ -19,8 +19,7 @@ package api type ValidateQuery struct { - QueryText string `json:"queryText"` - QueryLanguage *string `json:"queryLanguage,omitempty" yaml:"queryLanguage,omitempty"` + QueryText string `json:"queryText"` } func (svc *QueryService) Validate(vq ValidateQuery) ( diff --git a/vendor/github.com/lacework/go-sdk/api/policy.go b/vendor/github.com/lacework/go-sdk/api/policy.go index 0450e51c0..e5a832332 100644 --- a/vendor/github.com/lacework/go-sdk/api/policy.go +++ b/vendor/github.com/lacework/go-sdk/api/policy.go @@ -25,10 +25,9 @@ import ( "reflect" "time" + "github.com/lacework/go-sdk/internal/array" "github.com/pkg/errors" "gopkg.in/yaml.v3" - - "github.com/lacework/go-sdk/internal/array" ) // PolicyService is a service that interacts with the Custom Policies @@ -177,7 +176,6 @@ type Policy struct { PolicyID string `json:"policyId" yaml:"policyId"` PolicyType string `json:"policyType" yaml:"-"` QueryID string `json:"queryId" yaml:"queryId"` - QueryLanguage *string `json:"queryLanguage,omitempty" yaml:"queryLanguage,omitempty"` Title string `json:"title" yaml:"title"` Enabled bool `json:"enabled" yaml:"enabled"` Description string `json:"description" yaml:"description"` diff --git a/vendor/github.com/lacework/go-sdk/api/v2_vulnerabilities.go b/vendor/github.com/lacework/go-sdk/api/v2_vulnerabilities.go index f6fb795a0..0c9085b8c 100644 --- a/vendor/github.com/lacework/go-sdk/api/v2_vulnerabilities.go +++ b/vendor/github.com/lacework/go-sdk/api/v2_vulnerabilities.go @@ -517,6 +517,21 @@ func (v *VulnerabilityHost) GetMachineTags() (machineTags VulnerabilityHostMachi return } +func (v *VulnerabilityHost) GetMachineTagsRaw() (map[string]interface{}, error) { + jsonTags, err := json.Marshal(v.MachineTags) + if err != nil { + return nil, err + } + + var rawTags map[string]interface{} + + if err := json.Unmarshal(jsonTags, &rawTags); err != nil { + return nil, err + } + + return rawTags, nil +} + type VulnerabilityHostMachineTags struct { Account string `json:"Account"` AmiID string `json:"AmiId"` diff --git a/vendor/github.com/lacework/go-sdk/api/version.go b/vendor/github.com/lacework/go-sdk/api/version.go index 992d36a8a..aadea1c16 100644 --- a/vendor/github.com/lacework/go-sdk/api/version.go +++ b/vendor/github.com/lacework/go-sdk/api/version.go @@ -1,5 +1,5 @@ // Code generated by: scripts/version_updater.sh -// File generated at: 20240322205700 +// File generated at: 20240906153709 // // <<< DO NOT EDIT >>> // @@ -7,4 +7,4 @@ package api // Version is the semver coming from the VERSION file -const Version = "1.49.0" +const Version = "1.53.0" diff --git a/vendor/modules.txt b/vendor/modules.txt index 32e3e5793..d33999a8a 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -257,7 +257,7 @@ github.com/klauspost/compress/internal/cpuinfo github.com/klauspost/compress/internal/snapref github.com/klauspost/compress/zstd github.com/klauspost/compress/zstd/internal/xxhash -# github.com/lacework/go-sdk v1.49.0 +# github.com/lacework/go-sdk v1.53.0 ## explicit; go 1.21 github.com/lacework/go-sdk/api github.com/lacework/go-sdk/internal/array