aquasecurity / aquasecurity/cloudsploit
TypeError: Cannot read property 'CoreCount' of undefined
- Dominant language
- JavaScript
- Stars
- 3.8k
- Forks
- 751
- Avg merge
- 11d 9h
- Merged PRs (30d)
- 3
Description
Hello.
While running scan on AWS:
`INFO: Using CloudSploit config file: /opt/cloudsploit/config.js
INFO: Skipping AWS pagination mode
INFO: Determining API calls to make...
INFO: Found 181 API calls to make for aws plugins
INFO: Collecting metadata. This may take several minutes...
INFO: Metadata collection complete. Analyzing...
INFO: Analysis complete. Scan report to follow...
Plugin Web-Tier Auto Scaling Group Associated ELB returned no results. There may be a problem with this plugin.
Plugin App-Tier ASG Launch Configurations Approved AMIs returned no results. There may be a problem with this plugin.
Plugin Web-Tier ASG Launch Configurations Approved AMIs returned no results. There may be a problem with this plugin.
Plugin App-Tier Auto Scaling Group CloudWatch Logs Enabled returned no results. There may be a problem with this plugin.
Plugin Web-Tier Auto Scaling Group CloudWatch Logs Enabled returned no results. There may be a problem with this plugin.
Plugin Web-Tier Launch Configurations IAM Roles returned no results. There may be a problem with this plugin.
Plugin App-Tier Launch Configurations IAM Roles returned no results. There may be a problem with this plugin.
Plugin CloudTrail S3 Bucket returned no results. There may be a problem with this plugin.
Plugin App-Tier EC2 Instance IAM Role returned no results. There may be a problem with this plugin.
/opt/cloudsploit/plugins/aws/ec2/instanceVcpusLimit.js:141
var coreCount = i.CpuOptions.CoreCount;
^
TypeError: Cannot read property 'CoreCount' of undefined
at instances.Instances.forEach (/opt/cloudsploit/plugins/aws/ec2/instanceVcpusLimit.js:141:50)
at Array.forEach ()
at describeInstances.data.forEach (/opt/cloudsploit/plugins/aws/ec2/instanceVcpusLimit.js:139:37)
at Array.forEach ()
at checkVcpusLimits (/opt/cloudsploit/plugins/aws/ec2/instanceVcpusLimit.js:138:36)
at /opt/cloudsploit/plugins/aws/ec2/instanceVcpusLimit.js:232:21
at /opt/cloudsploit/node_modules/async/dist/async.js:3110:16
at eachOfArrayLike (/opt/cloudsploit/node_modules/async/dist/async.js:1069:9)
at eachOf (/opt/cloudsploit/node_modules/async/dist/async.js:1117:5)
at Object.eachLimit (/opt/cloudsploit/node_modules/async/dist/async.js:3172:5)`
Appreciate help.
Contributor guide
Research direction
Start with plugins/aws/ec2/instanceVcpusLimit.js around lines 138-141 and reproduce the AWS scan if possible. Trace the instance data reaching checkVcpusLimits and verify the scan completes without the reported TypeError; the relevant EC2 instance-vCPU result should then be produced instead of aborting.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, javascript
- Domain
- cloud, security
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100