Skip to content

Commit

Permalink
Merge pull request #184 from ekristen/fix-183
Browse files Browse the repository at this point in the history
fix(cloudformation-stack): protect against nil pointer
  • Loading branch information
ekristen authored Jun 5, 2024
2 parents a68d1a7 + e948db1 commit f014b19
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 f014b19

Please sign in to comment.