Merge pull request #12991 from gkurz/opa-fix-traversal-regex

genpolicy: Fix matching of `..` in paths
This commit is contained in:
Fabiano Fidêncio
2026-05-06 11:59:00 +02:00
committed by GitHub

View File

@@ -1520,7 +1520,7 @@ strip_cap_prefix(s) := result if {
}
check_directory_traversal(i_path) if {
not regex.match("(^|/)..($|/)", i_path)
not regex.match("(^|/)\\.\\.($|/)", i_path)
}
allow_sandbox_storages(i_storages) if {