Skip to content

Commit da8fd54

Browse files
committed
docs example
1 parent 0158b3d commit da8fd54

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

docs/docs/why-rego.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@ Rego is a **declarative language** designed specifically for expressing policy l
2121
# Declarative: "deny if command contains rm -rf and targets root"
2222
deny contains decision if {
2323
input.tool_name == "Bash"
24-
contains(input.tool_input.command, "rm -rf")
25-
startswith(input.tool_input.command, "rm -rf /")
24+
contains(input.tool_input.command, "rm -rf /")
2625
}
2726
```
2827

28+
_\*this is a simple policy, in critical scenarios you would write a more robust version_
29+
2930
This declarative approach makes policies **easier to read** and audit and **self-documenting.** Teams deploying agents further benefit from policy being unambiguous; the policy logic is separated from the application code.
3031

3132
### Purpose-Built for Authorization

0 commit comments

Comments
 (0)