Description of changes:
Bugfix for UnboundLocalError: local variable 'resource' referenced before assignment error when checking a template that only contains a role with trust policy and no other supported resource types.
Tested fix against a template containing only a role with trust policy and no other supported resource types. Tested against roles with no expected findings and public access findings and received expected results.
{
"BlockingFindings": [
{
"findingType": "SECURITY_WARNING",
"code": "policy-analysis-CheckNoPublicAccess",
"message": "The resource policy grants public access for the given resource type.",
Description of changes: Bugfix for
UnboundLocalError: local variable 'resource' referenced before assignment
error when checking a template that only contains a role with trust policy and no other supported resource types.Tested fix against a template containing only a role with trust policy and no other supported resource types. Tested against roles with no expected findings and public access findings and received expected results.
Input:
Result:
Input:
Result:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.