diff --git a/go.mod b/go.mod index 3dd2a865..1f9530ad 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/dependabot/proxy go 1.26.0 require ( - github.com/aws/aws-sdk-go-v2 v1.43.6 + github.com/aws/aws-sdk-go-v2 v1.45.1 github.com/aws/aws-sdk-go-v2/config v1.32.36 github.com/aws/aws-sdk-go-v2/credentials v1.19.36 github.com/aws/aws-sdk-go-v2/service/ecr v1.60.5 @@ -33,7 +33,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/sso v1.33.6 // indirect github.com/aws/aws-sdk-go-v2/service/ssooidc v1.38.6 // indirect github.com/aws/aws-sdk-go-v2/service/sts v1.45.6 // indirect - github.com/aws/smithy-go v1.27.8 // indirect + github.com/aws/smithy-go v1.28.1 // indirect github.com/cenk/backoff v2.2.1+incompatible // indirect github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40 // indirect github.com/distribution/reference v0.5.0 // indirect diff --git a/go.sum b/go.sum index 9765c11d..89c045bb 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,5 @@ -github.com/aws/aws-sdk-go-v2 v1.43.6 h1:RrmFcqCBxkJuf7g1axVo5krB4jM/AO8r5e5oujrgdoQ= -github.com/aws/aws-sdk-go-v2 v1.43.6/go.mod h1:tXpPM+v0D1lndmga+HqqLDIzUFJlEeR21aspVklHF00= +github.com/aws/aws-sdk-go-v2 v1.45.1 h1:iIoG3NaLhV6UZpPXyPXlDj2I9oS8tV/nMcMnITCC6Ks= +github.com/aws/aws-sdk-go-v2 v1.45.1/go.mod h1:bttEH6JqnUL8LepvDVfdrds/fZ5bCIxzpe3abyUrhDU= github.com/aws/aws-sdk-go-v2/config v1.32.36 h1:mX6ietU7UlB4w/2IUaexJdsyUDvhTd+jYPjVePiyi6s= github.com/aws/aws-sdk-go-v2/config v1.32.36/go.mod h1:rMpV4xk7ZK59edraSaHP0jsWrztWTT5tbCwWY495hug= github.com/aws/aws-sdk-go-v2/credentials v1.19.36 h1:84s5xMme6ENYEdKG8rsbSFFg/8+lbHBeM9QYSO0gnDk= @@ -26,8 +26,8 @@ github.com/aws/aws-sdk-go-v2/service/ssooidc v1.38.6 h1:49BBtY68A+KJCQ3a2F3eUe6R github.com/aws/aws-sdk-go-v2/service/ssooidc v1.38.6/go.mod h1:ptG2hbs7QltE1GcQY0MpS4bfrc51KCnBXUr7OT1EEfE= github.com/aws/aws-sdk-go-v2/service/sts v1.45.6 h1:JvExZWabChDM0qJAirQYGfOYo0ndT3edXj+fqSPNjkE= github.com/aws/aws-sdk-go-v2/service/sts v1.45.6/go.mod h1:XZcaQkV2cItp6yEkrwljyaPOf22RuX7T43jxap/FOmM= -github.com/aws/smithy-go v1.27.8 h1:FR0dxZfIlV7Z8eh2iHfIofdunw382XsDV3Mxt9nUvRY= -github.com/aws/smithy-go v1.27.8/go.mod h1:YE2RhdIuDbA5E5bTdciG9KrW3+TiEONeUWCqxX9i1Fc= +github.com/aws/smithy-go v1.28.1 h1:R/nXH00c8qcfCzQVELtRw+eLQWtzv+VAIEFJ1/xxXlQ= +github.com/aws/smithy-go v1.28.1/go.mod h1:YE2RhdIuDbA5E5bTdciG9KrW3+TiEONeUWCqxX9i1Fc= github.com/cenk/backoff v2.2.1+incompatible h1:djdFT7f4gF2ttuzRKPbMOWgZajgesItGLwG5FTQKmmE= github.com/cenk/backoff v2.2.1+incompatible/go.mod h1:7FtoeaSnHoZnmZzz47cM35Y9nSW7tNyaidugnHTaFDE= github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40 h1:xvUo53O5MRZhVMJAxWCJcS5HHrqAiAG9SJ1LpMu6aAI= diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go index dfcdf5f8..6bfd0dfa 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go @@ -3,4 +3,4 @@ package aws // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.43.6" +const goModuleVersion = "1.45.1" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/headers.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/headers.go index d99b32ce..0b9ddd13 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/headers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/headers.go @@ -58,6 +58,10 @@ var RequiredSignedHeaders = Rules{ "X-Amz-Tagging": struct{}{}, }, }, + InclusiveRules{ + Patterns{"X-Amz-Checksum-"}, + ExcludeList{Patterns{"X-Amz-Checksum-Mode"}}, + }, Patterns{"X-Amz-Object-Lock-"}, Patterns{"X-Amz-Meta-"}, } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/client.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/client.go index 94094ec2..50b7417c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/client.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/client.go @@ -62,6 +62,7 @@ type BuildableClient struct { initOnce sync.Once clientTimeout time.Duration + readTimeout *time.Duration client *http.Client } @@ -96,9 +97,12 @@ func (b *BuildableClient) Freeze() aws.HTTPClient { } func (b *BuildableClient) build() { + tr := b.GetTransport() + b.installReadTimeout(tr) + b.client = wrapWithLimitedRedirect(&http.Client{ Timeout: b.clientTimeout, - Transport: b.GetTransport(), + Transport: tr, }) } @@ -107,6 +111,7 @@ func (b *BuildableClient) clone() *BuildableClient { cpy.transport = b.GetTransport() cpy.dialer = b.GetDialer() cpy.clientTimeout = b.clientTimeout + cpy.readTimeout = b.readTimeout return cpy } @@ -155,6 +160,25 @@ func (b *BuildableClient) WithTimeout(timeout time.Duration) *BuildableClient { return cpy } +// WithReadTimeout copies the BuildableClient and returns it with the read +// timeout set. +// +// The timeout is the maximum time the client waits for a connection to deliver +// any data. It resets on every byte received, so a slow but progressing response +// does not fail. It is not a deadline on the operation; use WithTimeout for that. +// +// A value set here takes precedence over the SDK's defaults for every service +// this client is used with, including services the SDK would otherwise apply a +// higher value to or exempt entirely. Pass 0 to disable read timeouts. +// +// The timeout is applied per connection, so a client shared between service +// clients applies the same value to all of them. +func (b *BuildableClient) WithReadTimeout(timeout time.Duration) *BuildableClient { + cpy := b.clone() + cpy.readTimeout = &timeout + return cpy +} + // GetTransport returns a copy of the client's HTTP Transport. func (b *BuildableClient) GetTransport() *http.Transport { var tr *http.Transport @@ -184,6 +208,17 @@ func (b *BuildableClient) GetTimeout() time.Duration { return b.clientTimeout } +// GetReadTimeout returns the configured read timeout and whether one was set on +// this client. When it was not, the SDK resolves a default per +// service. +func (b *BuildableClient) GetReadTimeout() (time.Duration, bool) { + if b.readTimeout == nil { + return 0, false + } + + return *b.readTimeout, true +} + func defaultDialer() *net.Dialer { return &net.Dialer{ Timeout: DefaultDialConnectTimeout, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/timeouts.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/timeouts.go new file mode 100644 index 00000000..fbd23ef9 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/timeouts.go @@ -0,0 +1,54 @@ +package http + +import ( + "context" + "errors" + "net" + "net/http" + "os" + "time" +) + +// deadlineConn applies a rolling inactivity window to reads on a connection by +// resetting the read deadline before each one. A read returns as soon as any +// bytes are available, so a slow but progressing transfer survives, and a +// connection that goes silent fails once. +type deadlineConn struct { + net.Conn + timeout time.Duration +} + +// Read implements [io.Reader]. +func (c *deadlineConn) Read(p []byte) (int, error) { + if err := c.Conn.SetReadDeadline(time.Now().Add(c.timeout)); err != nil { + return 0, err + } + + n, err := c.Conn.Read(p) + if errors.Is(err, os.ErrDeadlineExceeded) { + return n, &ResponseTimeoutError{TimeoutDur: c.timeout} + } + + return n, err +} + +func (b *BuildableClient) installReadTimeout(tr *http.Transport) { + timeout, ok := b.GetReadTimeout() + if !ok || timeout <= 0 { + return + } + + dial := tr.DialContext + if dial == nil { + dial = defaultDialer().DialContext + } + + tr.DialContext = func(ctx context.Context, network, addr string) (net.Conn, error) { + conn, err := dial(ctx, network, addr) + if err != nil { + return nil, err + } + + return &deadlineConn{Conn: conn, timeout: timeout}, nil + } +} diff --git a/vendor/github.com/aws/smithy-go/CHANGELOG.md b/vendor/github.com/aws/smithy-go/CHANGELOG.md index 88de0403..0d26e973 100644 --- a/vendor/github.com/aws/smithy-go/CHANGELOG.md +++ b/vendor/github.com/aws/smithy-go/CHANGELOG.md @@ -1,3 +1,43 @@ +# Release (2026-08-26) + +## General Highlights +* **Dependency Update**: Updated to the latest SDK module versions + +## Module Highlights +* `github.com/aws/smithy-go`: v1.28.1 + * **Bug Fix**: Fix broken AddLogger middleware since its insert point was removed. + +# Release (2026-08-25.2) + +## General Highlights +* **Dependency Update**: Updated to the latest SDK module versions + +## Module Highlights +* `github.com/aws/smithy-go`: v1.28.0 + * **Feature**: Set `Content-Length` inline when the request body is set via `SetStream`. The `ComputeContentLength` middleware is now deprecated. + +# Release (2026-08-25) + +## General Highlights +* **Dependency Update**: Updated to the latest SDK module versions + +## Module Highlights +* `github.com/aws/smithy-go`: v1.27.10 + * **Bug Fix**: Fix a data race on the underlying writer when an event stream is closed while an event write is in flight. + * **Bug Fix**: Restore draining the HTTP response body in `CloseResponseBody` to avoid issues with TCP connection reuse. + +# Release (2026-08-21) + +## General Highlights +* **Dependency Update**: Updated to the latest SDK module versions + +## Module Highlights +* `github.com/aws/smithy-go`: v1.27.9 + * **Bug Fix**: Fix a generic event stream exception not carrying the error code and message from its payload. + * **Bug Fix**: Fix an event stream not being closed when its connection is lost, which would cause a caller writing to the stream to block indefinitely. + * **Bug Fix**: Fix deserialization of an empty list producing a nil slice instead of an empty one. + * **Bug Fix**: Restore draining the HTTP response body in `CloseResponseBody` to avoid issues with TCP connection reuse. + # Release (2026-08-14) ## General Highlights diff --git a/vendor/github.com/aws/smithy-go/go_module_metadata.go b/vendor/github.com/aws/smithy-go/go_module_metadata.go index 005dac8f..c945a45d 100644 --- a/vendor/github.com/aws/smithy-go/go_module_metadata.go +++ b/vendor/github.com/aws/smithy-go/go_module_metadata.go @@ -3,4 +3,4 @@ package smithy // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.27.8" +const goModuleVersion = "1.28.1" diff --git a/vendor/github.com/aws/smithy-go/transport/http/eventstream.go b/vendor/github.com/aws/smithy-go/transport/http/eventstream.go index 251db8ac..970ade30 100644 --- a/vendor/github.com/aws/smithy-go/transport/http/eventstream.go +++ b/vendor/github.com/aws/smithy-go/transport/http/eventstream.go @@ -56,7 +56,10 @@ func NewEventStreamWriter(protocol ClientProtocol, schema *smithy.Schema, stream } func (w *EventStreamWriter) writeStream() { - defer w.Close() + defer func() { + w.err.SetError(w.eventStream.Close()) + }() + defer w.signalClose() for { select { @@ -100,11 +103,14 @@ func (w *EventStreamWriter) Send(ctx context.Context, variant *smithy.Schema, ev // Close signals end-of-stream and closes the underlying writer. Close is // safe for concurrent calls. func (w *EventStreamWriter) Close() error { + w.signalClose() + return w.err.Err() +} + +func (w *EventStreamWriter) signalClose() { w.closeOnce.Do(func() { close(w.done) - w.err.SetError(w.eventStream.Close()) }) - return w.err.Err() } // Err returns the first error encountered during writing. diff --git a/vendor/github.com/aws/smithy-go/transport/http/middleware_content_length.go b/vendor/github.com/aws/smithy-go/transport/http/middleware_content_length.go index 9969389b..7a1c47fe 100644 --- a/vendor/github.com/aws/smithy-go/transport/http/middleware_content_length.go +++ b/vendor/github.com/aws/smithy-go/transport/http/middleware_content_length.go @@ -14,6 +14,9 @@ type ComputeContentLength struct { // AddComputeContentLengthMiddleware adds ComputeContentLength to the middleware // stack's Build step. +// +// Deprecated: Content-Length is now set when the request body is set via +// Request.SetStream, so this middleware is no longer used. func AddComputeContentLengthMiddleware(stack *middleware.Stack) error { return stack.Build.Add(&ComputeContentLength{}, middleware.After) } diff --git a/vendor/github.com/aws/smithy-go/transport/http/request.go b/vendor/github.com/aws/smithy-go/transport/http/request.go index 5cbf6f10..87acdfe5 100644 --- a/vendor/github.com/aws/smithy-go/transport/http/request.go +++ b/vendor/github.com/aws/smithy-go/transport/http/request.go @@ -118,6 +118,9 @@ func (r *Request) IsStreamSeekable() bool { // SetStream returns a clone of the request with the stream set to the provided // reader. May return an error if the provided reader is seekable but returns // an error. +// +// ContentLength is set to the stream's length when it can be determined, and +// left unchanged otherwise. func (r *Request) SetStream(reader io.Reader) (rc *Request, err error) { rc = r.Clone() @@ -151,6 +154,12 @@ func (r *Request) SetStream(reader io.Reader) (rc *Request, err error) { rc.isStreamSeekable = isStreamSeekable rc.streamStartPos = streamStartPos + if n, ok, err := rc.StreamLength(); err != nil { + return rc, err + } else if ok { + rc.ContentLength = n + } + return rc, err } diff --git a/vendor/github.com/aws/smithy-go/waiter/logger.go b/vendor/github.com/aws/smithy-go/waiter/logger.go index 8d70a03f..cb31a2e0 100644 --- a/vendor/github.com/aws/smithy-go/waiter/logger.go +++ b/vendor/github.com/aws/smithy-go/waiter/logger.go @@ -30,7 +30,7 @@ func (m *Logger) HandleInitialize(ctx context.Context, in middleware.InitializeI return next.HandleInitialize(ctx, in) } -// AddLogger is a helper util to add waiter logger after `SetLogger` middleware in +// AddLogger is a helper util to add a waiter logger to the initialize stack. func (m Logger) AddLogger(stack *middleware.Stack) error { - return stack.Initialize.Insert(&m, "SetLogger", middleware.After) + return stack.Initialize.Add(&m, middleware.After) } diff --git a/vendor/modules.txt b/vendor/modules.txt index eb79f0a9..48d8487a 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,4 +1,4 @@ -# github.com/aws/aws-sdk-go-v2 v1.43.6 +# github.com/aws/aws-sdk-go-v2 v1.45.1 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/aws github.com/aws/aws-sdk-go-v2/aws/defaults @@ -83,7 +83,7 @@ github.com/aws/aws-sdk-go-v2/service/ssooidc/types github.com/aws/aws-sdk-go-v2/service/sts github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints github.com/aws/aws-sdk-go-v2/service/sts/types -# github.com/aws/smithy-go v1.27.8 +# github.com/aws/smithy-go v1.28.1 ## explicit; go 1.24 github.com/aws/smithy-go github.com/aws/smithy-go/auth