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

feat(misconf): Add selector support for all providers #6911

Closed
simar7 opened this issue Jun 11, 2024 · 0 comments · Fixed by #6905
Closed

feat(misconf): Add selector support for all providers #6911

simar7 opened this issue Jun 11, 2024 · 0 comments · Fixed by #6905
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature. scan/misconfiguration Issues relating to misconfiguration scanning
Milestone

Comments

@simar7
Copy link
Member

simar7 commented Jun 11, 2024

We can add support for all providers as selectors to use them within Rego rules as below:

# METADATA
# title: "Test"
# scope: package
# schemas:
# - input: schema["cloud"]
# custom:
#   id: TEST001
#   avd_id: TEST001
#   severity: LOW
#   input:
#     selector:
#     - type: cloud
#       subtypes:
#         - service: compute
#           provider: google

package user.test001

import rego.v1

deny contains res if {
    some instance in input.google.compute.instances
    instance.name.value == "my-instance"
    res := result.new("deny", instance.name)
}
@simar7 simar7 added kind/feature Categorizes issue or PR as related to a new feature. scan/misconfiguration Issues relating to misconfiguration scanning labels Jun 11, 2024
@simar7 simar7 added this to the v0.53.0 milestone Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. scan/misconfiguration Issues relating to misconfiguration scanning
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants