Skip to content

Commit

Permalink
Merge pull request #1 from seswarrajan/master
Browse files Browse the repository at this point in the history
Fix for cloudsploit crash when action is * for iam:*
  • Loading branch information
seswarrajan authored Aug 14, 2023
2 parents 11d2cd4 + 0ae2d71 commit 13001d3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugins/aws/iam/rolePolicyUnusedServices.js
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,8 @@ module.exports = {
statement.Action[0].split(':')[1].toLowerCase();
if (statement.Action.length > 1 || statement.Action[0] !== '*') {
for (let action of statement.Action) {
if (config.whitelist_unused_actions_for_resources.includes(action)) continue;
if (config.whitelist_unused_actions_for_resources.includes(action) ||
(action && action.length && action === '*')) continue;
let resourceAction = action.split(':')[1].toLowerCase();

if (allServices[service] && !config.whitelist_unused_services.includes(service)) {
Expand Down

0 comments on commit 13001d3

Please sign in to comment.