mirror of
https://github.com/project-zot/zot.git
synced 2026-06-16 20:38:08 +08:00
chore: fix dependabot alerts (#2462)
* chore: fix dependabot alerts https://github.com/project-zot/zot/pull/2451 https://github.com/project-zot/zot/pull/2452 https://github.com/project-zot/zot/pull/2453 https://github.com/project-zot/zot/pull/2454 https://github.com/project-zot/zot/pull/2455 https://github.com/project-zot/zot/pull/2456 https://github.com/project-zot/zot/pull/2457 https://github.com/project-zot/zot/pull/2458 https://github.com/project-zot/zot/pull/2459 https://github.com/project-zot/zot/pull/2460 https://github.com/project-zot/zot/pull/2461 https://github.com/project-zot/zot/pull/2463 Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com> * chore: mockoidc has moved to github.com/go-jose/go-jose/v3 Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com> * chore: quiet aws/s3 golang api deprecations These need to be addressed in a separate PR. Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com> --------- Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
This commit is contained in:
committed by
GitHub
parent
a4b6892a9c
commit
f5fef2384a
@@ -91,9 +91,9 @@ func NewAWSImageTrustStore(region, endpoint string) (*ImageTrustStore, error) {
|
||||
}
|
||||
|
||||
func GetSecretsManagerClient(region, endpoint string) (*secretsmanager.Client, error) {
|
||||
customResolver := aws.EndpointResolverWithOptionsFunc(
|
||||
func(service, region string, options ...interface{}) (aws.Endpoint, error) {
|
||||
return aws.Endpoint{
|
||||
customResolver := aws.EndpointResolverWithOptionsFunc( //nolint: staticcheck
|
||||
func(service, region string, options ...interface{}) (aws.Endpoint, error) { //nolint: staticcheck
|
||||
return aws.Endpoint{ //nolint: staticcheck
|
||||
PartitionID: "aws",
|
||||
URL: endpoint,
|
||||
SigningRegion: region,
|
||||
@@ -104,7 +104,7 @@ func GetSecretsManagerClient(region, endpoint string) (*secretsmanager.Client, e
|
||||
// and credentials values from the environment variables, shared
|
||||
// credentials, and shared configuration files
|
||||
cfg, err := config.LoadDefaultConfig(context.Background(), config.WithRegion(region),
|
||||
config.WithEndpointResolverWithOptions(customResolver))
|
||||
config.WithEndpointResolverWithOptions(customResolver)) //nolint: staticcheck
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -37,9 +37,9 @@ func TestWrapperErrors(t *testing.T) {
|
||||
Convey("Create table errors", t, func() {
|
||||
badEndpoint := endpoint + "1"
|
||||
|
||||
customResolver := aws.EndpointResolverWithOptionsFunc(
|
||||
customResolver := aws.EndpointResolverWithOptionsFunc( //nolint: staticcheck
|
||||
func(service, region string, options ...interface{}) (aws.Endpoint, error) {
|
||||
return aws.Endpoint{
|
||||
return aws.Endpoint{ //nolint: staticcheck
|
||||
PartitionID: "aws",
|
||||
URL: badEndpoint,
|
||||
SigningRegion: region,
|
||||
@@ -48,7 +48,7 @@ func TestWrapperErrors(t *testing.T) {
|
||||
)
|
||||
|
||||
cfg, err := config.LoadDefaultConfig(context.Background(), config.WithRegion(region),
|
||||
config.WithEndpointResolverWithOptions(customResolver))
|
||||
config.WithEndpointResolverWithOptions(customResolver)) //nolint: staticcheck
|
||||
So(err, ShouldBeNil)
|
||||
|
||||
dynamoWrapper := DynamoDB{
|
||||
@@ -73,9 +73,9 @@ func TestWrapperErrors(t *testing.T) {
|
||||
})
|
||||
|
||||
Convey("Delete table errors", t, func() {
|
||||
customResolver := aws.EndpointResolverWithOptionsFunc(
|
||||
customResolver := aws.EndpointResolverWithOptionsFunc( //nolint: staticcheck
|
||||
func(service, region string, options ...interface{}) (aws.Endpoint, error) {
|
||||
return aws.Endpoint{
|
||||
return aws.Endpoint{ //nolint: staticcheck
|
||||
PartitionID: "aws",
|
||||
URL: endpoint,
|
||||
SigningRegion: region,
|
||||
@@ -84,7 +84,7 @@ func TestWrapperErrors(t *testing.T) {
|
||||
)
|
||||
|
||||
cfg, err := config.LoadDefaultConfig(context.Background(), config.WithRegion(region),
|
||||
config.WithEndpointResolverWithOptions(customResolver))
|
||||
config.WithEndpointResolverWithOptions(customResolver)) //nolint: staticcheck
|
||||
So(err, ShouldBeNil)
|
||||
|
||||
dynamoWrapper := DynamoDB{
|
||||
|
||||
@@ -105,9 +105,9 @@ func TestIterator(t *testing.T) {
|
||||
|
||||
func TestIteratorErrors(t *testing.T) {
|
||||
Convey("errors", t, func() {
|
||||
customResolver := aws.EndpointResolverWithOptionsFunc(
|
||||
customResolver := aws.EndpointResolverWithOptionsFunc( //nolint: staticcheck
|
||||
func(service, region string, options ...interface{}) (aws.Endpoint, error) {
|
||||
return aws.Endpoint{
|
||||
return aws.Endpoint{ //nolint: staticcheck
|
||||
PartitionID: "aws",
|
||||
URL: "endpoint",
|
||||
SigningRegion: region,
|
||||
@@ -115,7 +115,7 @@ func TestIteratorErrors(t *testing.T) {
|
||||
})
|
||||
|
||||
cfg, err := config.LoadDefaultConfig(context.Background(), config.WithRegion("region"),
|
||||
config.WithEndpointResolverWithOptions(customResolver))
|
||||
config.WithEndpointResolverWithOptions(customResolver)) //nolint: staticcheck
|
||||
So(err, ShouldBeNil)
|
||||
|
||||
repoMetaAttributeIterator := mdynamodb.NewBaseDynamoAttributesIterator(
|
||||
@@ -166,7 +166,7 @@ func TestWrapperErrors(t *testing.T) {
|
||||
|
||||
//nolint: contextcheck
|
||||
Convey("Errors", t, func() {
|
||||
params := mdynamodb.DBDriverParameters{ //nolint:contextcheck
|
||||
params := mdynamodb.DBDriverParameters{ //nolint:contextcheck,staticcheck
|
||||
Endpoint: endpoint,
|
||||
Region: region,
|
||||
RepoMetaTablename: repoMetaTablename,
|
||||
|
||||
@@ -14,9 +14,9 @@ type DBDriverParameters struct {
|
||||
}
|
||||
|
||||
func GetDynamoClient(params DBDriverParameters) (*dynamodb.Client, error) {
|
||||
customResolver := aws.EndpointResolverWithOptionsFunc(
|
||||
customResolver := aws.EndpointResolverWithOptionsFunc( //nolint: staticcheck
|
||||
func(service, region string, options ...interface{}) (aws.Endpoint, error) {
|
||||
return aws.Endpoint{
|
||||
return aws.Endpoint{ //nolint: staticcheck
|
||||
PartitionID: "aws",
|
||||
URL: params.Endpoint,
|
||||
SigningRegion: region,
|
||||
@@ -27,7 +27,7 @@ func GetDynamoClient(params DBDriverParameters) (*dynamodb.Client, error) {
|
||||
// and credentials values from the environment variables, shared
|
||||
// credentials, and shared configuration files
|
||||
cfg, err := config.LoadDefaultConfig(context.Background(), config.WithRegion(params.Region),
|
||||
config.WithEndpointResolverWithOptions(customResolver))
|
||||
config.WithEndpointResolverWithOptions(customResolver)) //nolint: staticcheck
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Vendored
+3
-3
@@ -71,9 +71,9 @@ func NewDynamoDBCache(parameters interface{}, log zlog.Logger) (*DynamoDBDriver,
|
||||
}
|
||||
|
||||
// custom endpoint resolver to point to localhost
|
||||
customResolver := aws.EndpointResolverWithOptionsFunc(
|
||||
customResolver := aws.EndpointResolverWithOptionsFunc( //nolint: staticcheck
|
||||
func(service, region string, options ...interface{}) (aws.Endpoint, error) {
|
||||
return aws.Endpoint{
|
||||
return aws.Endpoint{ //nolint: staticcheck
|
||||
PartitionID: "aws",
|
||||
URL: properParameters.Endpoint,
|
||||
SigningRegion: region,
|
||||
@@ -84,7 +84,7 @@ func NewDynamoDBCache(parameters interface{}, log zlog.Logger) (*DynamoDBDriver,
|
||||
// and credentials values from the environment variables, shared
|
||||
// credentials, and shared configuration files
|
||||
cfg, err := config.LoadDefaultConfig(context.Background(), config.WithRegion(properParameters.Region),
|
||||
config.WithEndpointResolverWithOptions(customResolver))
|
||||
config.WithEndpointResolverWithOptions(customResolver)) //nolint: staticcheck
|
||||
if err != nil {
|
||||
log.Error().Err(err).Msg("failed to load AWS SDK config for dynamodb")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user