Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit aa6826d

Browse files
Merge branch 'coder:main' into fix/13360
2 parents e00a010 + 84b3121 commit aa6826d

File tree

14 files changed

+407
-150
lines changed

14 files changed

+407
-150
lines changed

.github/workflows/security.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ jobs:
114114
echo "image=$(cat "$image_job")" >> $GITHUB_OUTPUT
115115
116116
- name: Run Trivy vulnerability scanner
117-
uses: aquasecurity/trivy-action@b2933f565dbc598b29947660e66259e3c7bc8561
117+
uses: aquasecurity/trivy-action@fd25fed6972e341ff0007ddb61f77e88103953c2
118118
with:
119119
image-ref: ${{ steps.build.outputs.image }}
120120
format: sarif

cli/ping.go

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,17 @@ func (r *RootCmd) ping() *serpent.Command {
4848
return err
4949
}
5050

51-
logger := inv.Logger
51+
opts := &workspacesdk.DialAgentOptions{}
52+
5253
if r.verbose {
53-
logger = logger.AppendSinks(sloghuman.Sink(inv.Stdout)).Leveled(slog.LevelDebug)
54+
opts.Logger = inv.Logger.AppendSinks(sloghuman.Sink(inv.Stdout)).Leveled(slog.LevelDebug)
5455
}
5556

5657
if r.disableDirect {
5758
_, _ = fmt.Fprintln(inv.Stderr, "Direct connections disabled.")
59+
opts.BlockEndpoints = true
5860
}
59-
conn, err := workspacesdk.New(client).
60-
DialAgent(ctx, workspaceAgent.ID, &workspacesdk.DialAgentOptions{
61-
Logger: logger,
62-
BlockEndpoints: r.disableDirect,
63-
})
61+
conn, err := workspacesdk.New(client).DialAgent(ctx, workspaceAgent.ID, opts)
6462
if err != nil {
6563
return err
6664
}

cli/portforward.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,19 +95,18 @@ func (r *RootCmd) portForward() *serpent.Command {
9595
return xerrors.Errorf("await agent: %w", err)
9696
}
9797

98+
opts := &workspacesdk.DialAgentOptions{}
99+
98100
logger := inv.Logger
99101
if r.verbose {
100-
logger = logger.AppendSinks(sloghuman.Sink(inv.Stdout)).Leveled(slog.LevelDebug)
102+
opts.Logger = logger.AppendSinks(sloghuman.Sink(inv.Stdout)).Leveled(slog.LevelDebug)
101103
}
102104

103105
if r.disableDirect {
104106
_, _ = fmt.Fprintln(inv.Stderr, "Direct connections disabled.")
107+
opts.BlockEndpoints = true
105108
}
106-
conn, err := workspacesdk.New(client).
107-
DialAgent(ctx, workspaceAgent.ID, &workspacesdk.DialAgentOptions{
108-
Logger: logger,
109-
BlockEndpoints: r.disableDirect,
110-
})
109+
conn, err := workspacesdk.New(client).DialAgent(ctx, workspaceAgent.ID, opts)
111110
if err != nil {
112111
return err
113112
}

cli/speedtest.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ func (r *RootCmd) speedtest() *serpent.Command {
3939
ctx, cancel := context.WithCancel(inv.Context())
4040
defer cancel()
4141

42+
if direct && r.disableDirect {
43+
return xerrors.Errorf("--direct (-d) is incompatible with --%s", varDisableDirect)
44+
}
45+
4246
_, workspaceAgent, err := getWorkspaceAndAgent(ctx, inv, client, false, inv.Args[0])
4347
if err != nil {
4448
return err
@@ -52,16 +56,13 @@ func (r *RootCmd) speedtest() *serpent.Command {
5256
return xerrors.Errorf("await agent: %w", err)
5357
}
5458

55-
logger := inv.Logger.AppendSinks(sloghuman.Sink(inv.Stderr))
59+
opts := &workspacesdk.DialAgentOptions{}
5660
if r.verbose {
57-
logger = logger.Leveled(slog.LevelDebug)
61+
opts.Logger = inv.Logger.AppendSinks(sloghuman.Sink(inv.Stderr)).Leveled(slog.LevelDebug)
5862
}
59-
6063
if r.disableDirect {
6164
_, _ = fmt.Fprintln(inv.Stderr, "Direct connections disabled.")
62-
}
63-
opts := &workspacesdk.DialAgentOptions{
64-
Logger: logger,
65+
opts.BlockEndpoints = true
6566
}
6667
if pcapFile != "" {
6768
s := capture.New()

coderd/azureidentity/azureidentity_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ func TestValidate(t *testing.T) {
6464

6565
func TestExpiresSoon(t *testing.T) {
6666
t.Parallel()
67+
// TODO (@kylecarbs): It's unknown why Microsoft does not have new certificates live...
68+
// The certificate is automatically fetched if it's not found in our database,
69+
// so in a worst-case scenario expired certificates will only impact 100% airgapped users.
70+
t.Skip()
6771
const threshold = 1
6872

6973
for _, c := range azureidentity.Certificates {

docs/manifest.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,11 @@
285285
"description": "Learn how to configure JetBrains Gateway for your workspaces",
286286
"path": "./ides/gateway.md"
287287
},
288+
{
289+
"title": "JetBrains Fleet",
290+
"description": "Learn how to configure JetBrains Fleet for your workspaces",
291+
"path": "./ides/fleet.md"
292+
},
288293
{
289294
"title": "Emacs",
290295
"description": "Learn how to configure Emacs with TRAMP in Coder",

flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
name = "coder-${osArch}";
9898
# Updated with ./scripts/update-flake.sh`.
9999
# This should be updated whenever go.mod changes!
100-
vendorHash = "sha256-YGoQ9JgE9aeS4k3oNQw9EMAf2aIAGa+mclBjoIz7CWs=";
100+
vendorHash = "sha256-TRnB8wXSM8lJHAET+fMr6uKcqD0A4ilna1wPkgxn5/E=";
101101
proxyVendor = true;
102102
src = ./.;
103103
nativeBuildInputs = with pkgs; [ getopt openssl zstd ];

go.mod

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -112,18 +112,18 @@ require (
112112
github.com/go-ping/ping v1.1.0
113113
github.com/go-playground/validator/v10 v10.19.0
114114
github.com/gofrs/flock v0.8.1
115-
github.com/gohugoio/hugo v0.125.3
115+
github.com/gohugoio/hugo v0.126.1
116116
github.com/golang-jwt/jwt/v4 v4.5.0
117117
github.com/golang-migrate/migrate/v4 v4.17.0
118118
github.com/google/go-cmp v0.6.0
119119
github.com/google/go-github/v43 v43.0.1-0.20220414155304-00e42332e405
120120
github.com/google/uuid v1.6.0
121121
github.com/hashicorp/go-multierror v1.1.1
122122
github.com/hashicorp/go-reap v0.0.0-20170704170343-bf58d8a43e7b
123-
github.com/hashicorp/go-version v1.6.0
124-
github.com/hashicorp/hc-install v0.6.3
123+
github.com/hashicorp/go-version v1.7.0
124+
github.com/hashicorp/hc-install v0.7.0
125125
github.com/hashicorp/terraform-config-inspect v0.0.0-20211115214459-90acf1ca460f
126-
github.com/hashicorp/terraform-json v0.21.0
126+
github.com/hashicorp/terraform-json v0.22.1
127127
github.com/hashicorp/yamux v0.1.1
128128
github.com/hinshun/vt10x v0.0.0-20220301184237-5011da428d02
129129
github.com/imulab/go-scim/pkg/v2 v2.2.0
@@ -160,7 +160,7 @@ require (
160160
github.com/tidwall/gjson v1.17.0
161161
github.com/u-root/u-root v0.14.0
162162
github.com/unrolled/secure v1.14.0
163-
github.com/valyala/fasthttp v1.53.0
163+
github.com/valyala/fasthttp v1.54.0
164164
github.com/wagslane/go-password-validator v0.3.0
165165
go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1
166166
go.nhat.io/otelsql v0.13.0
@@ -170,7 +170,7 @@ require (
170170
go.opentelemetry.io/otel/sdk v1.24.0
171171
go.opentelemetry.io/otel/trace v1.24.0
172172
go.uber.org/atomic v1.11.0
173-
go.uber.org/goleak v1.2.1
173+
go.uber.org/goleak v1.3.1-0.20240429205332-517bace7cc29
174174
go4.org/netipx v0.0.0-20230728180743-ad4cb58a6516
175175
golang.org/x/crypto v0.23.0
176176
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225
@@ -184,9 +184,9 @@ require (
184184
golang.org/x/tools v0.21.0
185185
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028
186186
google.golang.org/api v0.181.0
187-
google.golang.org/grpc v1.63.2
187+
google.golang.org/grpc v1.64.0
188188
google.golang.org/protobuf v1.34.1
189-
gopkg.in/DataDog/dd-trace-go.v1 v1.61.0
189+
gopkg.in/DataDog/dd-trace-go.v1 v1.64.0
190190
gopkg.in/natefinch/lumberjack.v2 v2.2.1
191191
gopkg.in/yaml.v3 v3.0.1
192192
gvisor.dev/gvisor v0.0.0-20240509041132-65b30f7869dc
@@ -207,7 +207,7 @@ require (
207207
require (
208208
cloud.google.com/go/auth v0.4.1 // indirect
209209
cloud.google.com/go/auth/oauth2adapt v0.2.2 // indirect
210-
github.com/DataDog/go-libddwaf/v2 v2.3.1 // indirect
210+
github.com/DataDog/go-libddwaf/v2 v2.4.2 // indirect
211211
github.com/alecthomas/chroma/v2 v2.13.0 // indirect
212212
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.1 // indirect
213213
github.com/go-jose/go-jose/v4 v4.0.1 // indirect
@@ -222,7 +222,7 @@ require (
222222
cloud.google.com/go/longrunning v0.5.6 // indirect
223223
filippo.io/edwards25519 v1.1.0 // indirect
224224
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect
225-
github.com/DataDog/appsec-internal-go v1.4.1 // indirect
225+
github.com/DataDog/appsec-internal-go v1.5.0 // indirect
226226
github.com/DataDog/datadog-agent/pkg/obfuscate v0.48.0 // indirect
227227
github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.48.1 // indirect
228228
github.com/DataDog/datadog-go/v5 v5.3.0 // indirect
@@ -233,15 +233,15 @@ require (
233233
github.com/Microsoft/go-winio v0.6.1 // indirect
234234
github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect
235235
github.com/OneOfOne/xxhash v1.2.8 // indirect
236-
github.com/ProtonMail/go-crypto v1.1.0-alpha.0 // indirect
236+
github.com/ProtonMail/go-crypto v1.1.0-alpha.2 // indirect
237237
github.com/agext/levenshtein v1.2.3 // indirect
238238
github.com/agnivade/levenshtein v1.1.1 // indirect
239239
github.com/akutz/memconn v0.1.0 // indirect
240240
github.com/alexbrainman/sspi v0.0.0-20210105120005-909beea2cc74 // indirect
241241
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be // indirect
242242
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
243243
github.com/armon/go-radix v1.0.1-0.20221118154546-54df44f2176c // indirect
244-
github.com/aws/aws-sdk-go-v2 v1.26.1
244+
github.com/aws/aws-sdk-go-v2 v1.27.0
245245
github.com/aws/aws-sdk-go-v2/config v1.27.7
246246
github.com/aws/aws-sdk-go-v2/credentials v1.17.7 // indirect
247247
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.3 // indirect
@@ -357,7 +357,7 @@ require (
357357
github.com/opencontainers/image-spec v1.1.0-rc5 // indirect
358358
github.com/opencontainers/runc v1.1.12 // indirect
359359
github.com/outcaste-io/ristretto v0.2.3 // indirect
360-
github.com/pelletier/go-toml/v2 v2.2.1 // indirect
360+
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
361361
github.com/philhofer/fwd v1.1.2 // indirect
362362
github.com/pierrec/lz4/v4 v4.1.18 // indirect
363363
github.com/pkg/errors v0.9.1 // indirect
@@ -381,7 +381,7 @@ require (
381381
github.com/tailscale/wireguard-go v0.0.0-20231121184858-cc193a0b3272
382382
github.com/tchap/go-patricia/v2 v2.3.1 // indirect
383383
github.com/tcnksm/go-httpstat v0.2.0 // indirect
384-
github.com/tdewolff/parse/v2 v2.7.12 // indirect
384+
github.com/tdewolff/parse/v2 v2.7.13 // indirect
385385
github.com/tidwall/match v1.1.1 // indirect
386386
github.com/tidwall/pretty v1.2.1 // indirect
387387
github.com/tinylib/msgp v1.1.8 // indirect
@@ -399,7 +399,7 @@ require (
399399
github.com/yashtewari/glob-intersection v0.2.0 // indirect
400400
github.com/yuin/goldmark v1.7.1 // indirect
401401
github.com/yuin/goldmark-emoji v1.0.2 // indirect
402-
github.com/zclconf/go-cty v1.14.1
402+
github.com/zclconf/go-cty v1.14.4
403403
github.com/zeebo/errs v1.3.0 // indirect
404404
go.opencensus.io v0.24.0 // indirect
405405
go.opentelemetry.io/contrib v1.19.0 // indirect

0 commit comments

Comments
 (0)