Skip to content

Commit

Permalink
fix(cloudformation-stack): protect against nil pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
ekristen committed Jun 5, 2024
1 parent 7a31dac commit e948db1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion resources/cloudformation-stack.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"strings"
"time"

"github.com/gotidy/ptr"
"github.com/sirupsen/logrus"

"github.com/aws/aws-sdk-go/aws"
Expand Down Expand Up @@ -76,7 +77,7 @@ type CloudFormationStack struct {
}

func (cfs *CloudFormationStack) Filter() error {
if *cfs.stack.Description == "DO NOT MODIFY THIS STACK! This stack is managed by Config Conformance Packs." {
if ptr.ToString(cfs.stack.Description) == "DO NOT MODIFY THIS STACK! This stack is managed by Config Conformance Packs." {
return fmt.Errorf("stack is managed by Config Conformance Packs")
}
return nil
Expand Down

0 comments on commit e948db1

Please sign in to comment.