-
Notifications
You must be signed in to change notification settings - Fork 127
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
Logic problem when trying to identify a violation #373
Comments
Hi there! First off, I recommend switching to the new test utils: https://github.com/forseti-security/policy-library/blob/master/validator/test_utils.rego Secondly, could you share the actual constraint logic (or open a pull request)? |
Thanks so much for prompt reply @morgante . Here is the policy constraint file: File: test_gcp_compute_secure_boot_vm.yaml
Validator test contraint file - data.yaml
Will definitely switch to new test util. |
@morgante , anyway to take a look at my policy logic, please? Very much appreciated! |
@akamalov Any luck? Sorry I haven't had a chance to look into this yet, will try to review this week. Can you share the constraint template (should be located in the templates directory). If you have a fork of this repo, it would be helpful to see a branch/PR to review everything. |
@akamalov Can you share your template/policy logic? Without that it's hard to know what's breaking for you. |
Greetings,
Trying to create Forseti policy to identify shielded VMs. In the policy I am looking at
File: test_gcp_compute_secure_boot_vm_test.rego
Above, I am requesting that:
Asset: data.json
Now, the test rego file supposed to find one violation for the non-compliance in "instances/vm-cant-forward" running VM. Except, it can't.
Running 'make test' shows the following:
It looks like it is the logic to identify violations is wrong, because a secondary instance in data.json is violating the policy.
Any thoughts?
The text was updated successfully, but these errors were encountered: