You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description :
I am testing the "Reject if the role can be assumed by ANY role in ANY account" example given on your website. My test policy contains multiple SIDs, one with sts:AssumeRole to a specific arn and one with other permissions to *. The scenario fails even though the SID with the assume role permission is restricted.
To Reproduce
<Either a sample terraform code, or your terraform plan file if it doesn't have any confidential information>
Scenario: Reject if a policy can assume ANY role in ANY account
Given I have aws_iam_policy defined
When it contains policy
And it contains Statement
And its Effect is Allow
And its Action is sts:AssumeRole
And it contains resource
Then its value must not match the "\*" regex
Failure: resource property in aws_iam_policy.assumeany-policy resource matches with \* regex. It is set to *.
<Your feature/scenario/steps>
Scenario: Reject if a policy can assume ANY role in ANY accountGiven I have aws_iam_policy defined
When it contains policy
And it contains Statement
And its Effect is Allow
And its Action is sts:AssumeRole
And it contains resource
Then its value must not match the "\*" regex
Expected behavior :
I expect the scenario to pass since the assumerole permission is restricted.
Tested versions :
<terraform-compliance version (1.0.54)>
<terraform version (0.12.12)>
<python runtime version, if running as a python package (3.7.3)>
The text was updated successfully, but these errors were encountered:
Found the problem. It is due to failure of resource filtering on And its Action is sts:AssumeRole because it is trying to filter out of a list of list of lists.
Having a deeper look, this might take some time to fix.
Description :
I am testing the "Reject if the role can be assumed by ANY role in ANY account" example given on your website. My test policy contains multiple SIDs, one with sts:AssumeRole to a specific arn and one with other permissions to *. The scenario fails even though the SID with the assume role permission is restricted.
To Reproduce
terraform
code, or yourterraform plan
file if it doesn't have any confidential information>Expected behavior :
I expect the scenario to pass since the assumerole permission is restricted.
Tested versions :
The text was updated successfully, but these errors were encountered: