Created
July 31, 2024 12:54
-
-
Save JRWu/912bca7512b712113cc9b7d20bb78246 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| deny[x] { | |
| request_permission[_] == "apis" | |
| request_intent = "write" | |
| listen_path := input.request.body.api_definition.proxy.listen_path | |
| result := regex.match("^(\/|[a-z0-9-.]+|{[a-zA-Z0-9_]+})+$", listen_path) | |
| not result | |
| x := sprintf("Listen path '%v' must be kebab-case. (lower-case and separated with hyphens)", [listen_path]) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment