jckuester / awsweeper

A tool for cleaning your AWS account
Mozilla Public License 2.0
480 stars 46 forks source link

aws_rds_cluster_endpoint - SIGSEGV: segmentation violation #128

Open ranimufid opened 3 years ago

ranimufid commented 3 years ago

awsweeper version: v0.11.0

My awsweeper filter.yml contains this block

aws_rds_cluster_endpoint:
  - tags:
      NOT(owner): .*
  - created:
      before: 1M

Which is currently triggering the following stack trace

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x52246a0]

goroutine 1 [running]:
github.com/jckuester/awsls/aws.ListRdsClusterEndpoint(0xc000e926b0, 0x6e95242, 0x18, 0x1, 0x1, 0x0)
    /home/runner/go/pkg/mod/github.com/jckuester/awsls@v0.8.0/aws/aws_rds_cluster_endpoint.go:24 +0x160
github.com/jckuester/awsls/aws.ListResourcesByType(0xc000e926b0, 0xc0001465e0, 0x18, 0x18, 0xbe55560, 0x0, 0x0, 0x0)
    /home/runner/go/pkg/mod/github.com/jckuester/awsls@v0.8.0/aws/list.go:372 +0x68ad
github.com/jckuester/awsweeper/pkg/resource.List(0xc00061e190, 0xc0003d8240, 0xc000453740, 0x6e3a3dd, 0x6, 0x6e4c680, 0xc, 0x6fc23ac00)
    /home/runner/work/awsweeper/awsweeper/pkg/resource/list.go:66 +0xb70
main.mainExitCode(0x0)
    /home/runner/work/awsweeper/awsweeper/main.go:156 +0xf6d
main.main()
    /home/runner/work/awsweeper/awsweeper/main.go:22 +0x25
marcelocrocha commented 3 years ago

I'm facing the exactly same issue. For now I simply removed aws_rds_cluster_endpoint from my filters file.