aquasecurity / aquasecurity/cloudsploit
Error when running cloudsploit for gcp
- Dominant language
- JavaScript
- Stars
- 3.8k
- Forks
- 751
- Avg merge
- 11d 9h
- Merged PRs (30d)
- 3
Description
So i tried to run cloudsploit to scan a gcp project and it showed "ERROR: Nothing to report..."
Then i change the engine.js file in line 138 following an other issue reported here, from this:
`if (!results || !results.length) return console.log('ERROR: Nothing to report...');`
to this:
`if (!results || !results.length) console.log(`Plugin ${plugin.title} returned no results. There may be a problem with this plugin.`);`
This give me the following response:
INFO: Using CloudSploit config file: ./config.js
INFO: Skipping AWS pagination mode
INFO: Determining API calls to make...
INFO: Found 24 API calls to make for google plugins
INFO: Collecting metadata. This may take several minutes...
INFO: Metadata collection complete. Analyzing...
INFO: Analysis complete. Scan report to follow...
Plugin DNS Security Signing Algorithm returned no results. There may be a problem with this plugin.
So with that in mind i analyse the code in that plugin and i realized that in the file dnsSecSigningAlgorithm.js in lines 61 to 65 was a little problem, so i change it from this:
```
});
helpers.addResult(results, 2,
'DNSSEC is not enabled on the managed zone', region, managedZone.id);
}
```
to this:
```
});
} else {
helpers.addResult(results, 2,
'DNSSEC is not enabled on the managed zone', region, managedZone.id);
}
```
and problem resolved.
The issue was that the helpers.addResult(results, 2... didn't give any results because on my proyect i had a DNS whith the parameter managedZone.dnssecConfig.state: "off" so the code went out of the if condition where this helpers.addResult was in.
I hope this helps.
Contributor guide
Research direction
Start by reading dnsSecSigningAlgorithm.js around lines 61-65 and trace the branch used when managedZone.dnssecConfig.state is "off"; also review engine.js around line 138 to understand the empty-result message. Verify the change with a GCP scan and confirm that the plugin reports the DNSSEC finding instead of returning no results.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- gcp, javascript
- Domain
- cloud, security
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100