New Check Action "string count" #1694
coobachey
started this conversation in
Developement
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This could be specific or it could be very useful, across validation of lists/array.
Example Setup:
I need to ensure only 1 Security group assigned as best practice.
attribute "security_group_ids"
security_group_ids = ["sg-123455", "sg-543210"]
matchSpec:
name: security_group_ids
action: stringCount
value:
- Equal to X
- Less than X
-Greater than x
Regex is possible, and even in rego. But could relate this to the old days in serverspec inspec being able to validate how many. (imagine lists where strings are auto generated, or vars, etc)
Beta Was this translation helpful? Give feedback.
All reactions