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

🐛 Query-level filters are not respected #986

Open
preslavgerchev opened this issue Dec 7, 2023 · 0 comments
Open

🐛 Query-level filters are not respected #986

preslavgerchev opened this issue Dec 7, 2023 · 0 comments

Comments

@preslavgerchev
Copy link
Contributor

Describe the bug
Consider the following policy:

policies:
- name: testpolicy1
  uid: testpolicy1
  groups:
  - filters: return false
    checks:
    - uid: query-1
queries:
- uid: query-1
  filters: return true
  mql: return 2 > 1

This policy has a group filter of false, whereas the query below has a filter of true. By logic, the query should not get executed and there should be no score for the policy as the group filter should skip over that query.

Running this however yields a score for the policy (note the query has no score).

Expected behavior
I would expect that this policy is not ran at all, there are no matching filters here. To be more precise, I wouldn't expect a score in the resolved policy for that policy.

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

No branches or pull requests

1 participant