in src/rules/ecr/ECROpenAccess.ts [43:59]
function checkStatement(policyText: any): boolean {
if (policyText == undefined || policyText.Statement == undefined) {
return true;
}
for (const statement of policyText.Statement) {
const effect = statement.Effect;
if (effect == 'Allow') {
const awsString = statement.Principal
? JSON.stringify(statement.Principal)
: '';
if (awsString.includes('*')) {
return false;
}
}
}
return true;
}