Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Difference in violated policies for the same terraform file #519

Closed
harkirat22 opened this issue Jan 28, 2021 · 0 comments
Closed

Difference in violated policies for the same terraform file #519

harkirat22 opened this issue Jan 28, 2021 · 0 comments
Assignees
Labels

Comments

@harkirat22
Copy link
Contributor

  • terrascan version: v1.31
  • Operating System: macOS

Description

I scanned the terraform file with the following configuration:

resource "aws_iam_policy" "privileged-instance-policy" {
name = "privileged-instance-policy"
description = "Provides full access to AWS services and resources."
policy = <<POLICY
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
""
],
"Resource": "
"
}
]
}
POLICY
}

Tell us what happened, what went wrong, and what you expected to happen.

What I Did

used command: terrascan scan -t aws -f and in the result there was no violation related to iam policy having admin privileges.

Then I used : terrascan scan -t aws -f -p pkg/policies/opa/rego/aws/aws_iam_policy.
Result: There was a violation for the above terraform configuration as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant