Skip to content

Commit

Permalink
🐛 Use configured api-proxy (#869)
Browse files Browse the repository at this point in the history
* 🐛 Use configured api-proxy

Fixes mondoohq/cnquery#2277

Signed-off-by: Christian Zunker <[email protected]>

* 🟢 update deps

---------

Signed-off-by: Christian Zunker <[email protected]>
Co-authored-by: Dominik Richter <[email protected]>
  • Loading branch information
czunker and arlimus authored Oct 21, 2023
1 parent 3fd878d commit 5b0a05b
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions apps/cnspec/cmd/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ func getCobraScanConfig(cmd *cobra.Command, runtime *providers.Runtime, cliRes *
conf.runtime.UpstreamConfig = &upstream.UpstreamConfig{
SpaceMrn: opts.GetParentMrn(),
ApiEndpoint: opts.UpstreamApiEndpoint(),
ApiProxy: opts.APIProxy,
Incognito: conf.IsIncognito,
Creds: serviceAccount,
}
Expand Down
1 change: 1 addition & 0 deletions apps/cnspec/cmd/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ func getServeConfig() (*scanConfig, error) {
runtime.UpstreamConfig = &upstream.UpstreamConfig{
SpaceMrn: opts.GetParentMrn(),
ApiEndpoint: opts.UpstreamApiEndpoint(),
ApiProxy: opts.APIProxy,
Creds: serviceAccount,
}
}
Expand Down
1 change: 1 addition & 0 deletions apps/cnspec/cmd/serve_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ var serveApiCmd = &cobra.Command{
upstreamConfig := upstream.UpstreamConfig{
SpaceMrn: opts.GetParentMrn(),
ApiEndpoint: opts.UpstreamApiEndpoint(),
ApiProxy: opts.APIProxy,
Incognito: false, // because we serve, we interact with upstream, never incognito
Creds: serviceAccount,
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ require (
sigs.k8s.io/yaml v1.3.0
)

require go.mondoo.com/cnquery/v9 v9.2.4-0.20231020125424-f2f6ce5a5ad0
require go.mondoo.com/cnquery/v9 v9.2.4-0.20231021071305-5e2cfe412554

require (
4d63.com/gocheckcompilerdirectives v1.2.1 // indirect
Expand Down
6 changes: 2 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -933,10 +933,8 @@ gitlab.com/bosi/decorder v0.4.1 h1:VdsdfxhstabyhZovHafFw+9eJ6eU0d2CkFNJcZz/NU4=
gitlab.com/bosi/decorder v0.4.1/go.mod h1:jecSqWUew6Yle1pCr2eLWTensJMmsxHsBwt+PVbkAqA=
go-simpler.org/assert v0.6.0 h1:QxSrXa4oRuo/1eHMXSBFHKvJIpWABayzKldqZyugG7E=
go-simpler.org/assert v0.6.0/go.mod h1:74Eqh5eI6vCK6Y5l3PI8ZYFXG4Sa+tkr70OIPJAUr28=
go.mondoo.com/cnquery/v9 v9.2.3 h1:qPGNN8ry0vwEj4uJlSil3Wt672yxpRe1APWZ2TErv5E=
go.mondoo.com/cnquery/v9 v9.2.3/go.mod h1:lBzCOIonmKRewB+o2trn7R6r4exONd9V6UJM600tHds=
go.mondoo.com/cnquery/v9 v9.2.4-0.20231020125424-f2f6ce5a5ad0 h1:dQTbrsfIl6sVeY4PKPE7w41iX63TvvWh3dvUIMoqYeY=
go.mondoo.com/cnquery/v9 v9.2.4-0.20231020125424-f2f6ce5a5ad0/go.mod h1:lBzCOIonmKRewB+o2trn7R6r4exONd9V6UJM600tHds=
go.mondoo.com/cnquery/v9 v9.2.4-0.20231021071305-5e2cfe412554 h1:4dU05MnrwBdpJl0q75waeMdOCSnxQl1NYiguWM8QyBc=
go.mondoo.com/cnquery/v9 v9.2.4-0.20231021071305-5e2cfe412554/go.mod h1:lBzCOIonmKRewB+o2trn7R6r4exONd9V6UJM600tHds=
go.mondoo.com/ranger-rpc v0.5.2 h1:UrcVtMIinzfWsuSzZKibbMqcGZSARInKJi0Xs2AxXeU=
go.mondoo.com/ranger-rpc v0.5.2/go.mod h1:y5qqdFhOnSLKnAo8lXC0FKZoKLUYgLENvneww+q+7ws=
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
Expand Down

0 comments on commit 5b0a05b

Please sign in to comment.