-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
fix: allow validate input to handle multiple source groups
- Loading branch information
Showing
8 changed files
with
132 additions
and
16 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package ham | ||
|
||
import rego.v1 | ||
|
||
# METADATA | ||
# title: Ham | ||
# description: Ham ham ham | ||
# custom: | ||
# short_name: delicious | ||
# | ||
deny contains result if { | ||
value := object.get(input, "ham", "yucky") | ||
value != "delicious" | ||
result := { | ||
"msg": "ham is not delicious", | ||
"code": "ham.delicious", | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
sources: | ||
- policy: | ||
- "git::https://${GITHOST}/git/ham-policy" | ||
- policy: | ||
- "git::https://${GITHOST}/git/spam-policy" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package spam | ||
|
||
import rego.v1 | ||
|
||
# METADATA | ||
# title: Spam | ||
# description: Spam spam spam | ||
# custom: | ||
# short_name: valid | ||
# | ||
deny contains result if { | ||
value := object.get(input, "spam", false) | ||
not value | ||
result := { | ||
"msg": "spam is not true", | ||
"code": "spam.valid", | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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