Skip to content

Commit

Permalink
fix(s3): nil pointer gets3
Browse files Browse the repository at this point in the history
  • Loading branch information
StanGirard committed Mar 24, 2023
1 parent b0f24cc commit 1fa9b06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aws/s3/getter.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func GetS3ToPublicBlockAccess(s aws.Config, b []types.Bucket) []S3toPublicBlockA
}
resp, err := svc.GetPublicAccessBlock(context.TODO(), params)
if err != nil {
if resp.PublicAccessBlockConfiguration != nil && resp.PublicAccessBlockConfiguration.BlockPublicAcls {
if resp != nil && resp.PublicAccessBlockConfiguration != nil && resp.PublicAccessBlockConfiguration.BlockPublicAcls {
s3toPublicBlockAccess = append(s3toPublicBlockAccess, S3toPublicBlockAccess{*bucket.Name, true})
} else {
s3toPublicBlockAccess = append(s3toPublicBlockAccess, S3toPublicBlockAccess{*bucket.Name, false})
Expand Down

0 comments on commit 1fa9b06

Please sign in to comment.