You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I have been told that it supports CloudFormation, but when I run 'terrascan scan' it doesn't seem to scan CloudFormation. I am doing something wrong? Does it support Cloudformation? I get errors ('panic: runtime error: invalid memory address or nil pointer dereference') when I run 'terrascan scan' against some Cloudformation (https://github.com/bridgecrewio/cfngoat). These are valid cloudformation templates (I have validated them with 'aws cloudformation validate-template' AWS CLI command). Thanks!
Hello @markl11, thanks for reporting this issue. Terrascan supports scanning cft templates.
This is a defect. The panic is occurring while mapping a cft resource to terrascan config and needs to be fixed.
Description
Hi, I have been told that it supports CloudFormation, but when I run 'terrascan scan' it doesn't seem to scan CloudFormation. I am doing something wrong? Does it support Cloudformation? I get errors ('panic: runtime error: invalid memory address or nil pointer dereference') when I run 'terrascan scan' against some Cloudformation (https://github.com/bridgecrewio/cfngoat). These are valid cloudformation templates (I have validated them with 'aws cloudformation validate-template' AWS CLI command). Thanks!
What I Did
% terrascan scan
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x202d43a]
goroutine 12 [running]:
github.com/accurics/terrascan/pkg/mapper/iac-providers/cft/config.GetIamUserConfig(0xc000e93590)
/home/runner/work/terrascan/terrascan/pkg/mapper/iac-providers/cft/config/iam-user.go:78 +0x21a
github.com/accurics/terrascan/pkg/mapper/iac-providers/cft.cftMapper.mapConfigForResource({}, {0x3ceefa0, 0xc000e93590}, {0xc000c42070, 0xc000d2fce0})
/home/runner/work/terrascan/terrascan/pkg/mapper/iac-providers/cft/cft.go:183 +0x49e5
github.com/accurics/terrascan/pkg/mapper/iac-providers/cft.cftMapper.Map({}, {0x3805600, 0xc000b6a120}, {0xc000b24558, 0x31113e0, 0xc0010338f0})
/home/runner/work/terrascan/terrascan/pkg/mapper/iac-providers/cft/cft.go:106 +0x157
github.com/accurics/terrascan/pkg/iac-providers/cft/v1.(*CFTV1).translateResources(0xc000637298, 0xc000754ea0, {0xc000754ea0, 0x5a})
/home/runner/work/terrascan/terrascan/pkg/iac-providers/cft/v1/load-file.go:159 +0x6e
github.com/accurics/terrascan/pkg/iac-providers/cft/v1.(*CFTV1).getConfig(0xc000754ea0, {0xc000754ea0, 0x5a}, 0xc000732290, 0x0)
/home/runner/work/terrascan/terrascan/pkg/iac-providers/cft/v1/load-file.go:86 +0xe9
github.com/accurics/terrascan/pkg/iac-providers/cft/v1.(*CFTV1).LoadIacFile(0xc000637bd8, {0xc000754ea0, 0x5a}, 0x5)
/home/runner/work/terrascan/terrascan/pkg/iac-providers/cft/v1/load-file.go:48 +0x365
github.com/accurics/terrascan/pkg/iac-providers/cft/v1.(*CFTV1).LoadIacDir(0xc00081a570, {0xc0000588c0, 0x4d}, 0xc000434cf0)
/home/runner/work/terrascan/terrascan/pkg/iac-providers/cft/v1/load-dir.go:53 +0x75c
github.com/accurics/terrascan/pkg/runtime.(*Executor).getResourceConfigs.func1({0x959d1a0, 0xc00081a570})
/home/runner/work/terrascan/terrascan/pkg/runtime/executor.go:315 +0x4b
created by github.com/accurics/terrascan/pkg/runtime.(*Executor).getResourceConfigs
/home/runner/work/terrascan/terrascan/pkg/runtime/executor.go:314 +0x6e9
The text was updated successfully, but these errors were encountered: