Skip to content

Commit

Permalink
genpolicy: block self paths for copyFile requests
Browse files Browse the repository at this point in the history
Self paths are not useful and may cause security issues

Signed-off-by: Saul Paredes <[email protected]>
  • Loading branch information
Redent0r committed Dec 13, 2024
1 parent 06ea445 commit ed3a993
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/tools/genpolicy/rules.rego
Original file line number Diff line number Diff line change
Expand Up @@ -1137,6 +1137,7 @@ check_directory_traversal(i_path) {
contains(i_path, "../") == false
endswith(i_path, "/..") == false
i_path != ".."
i_path != "."
}

check_symlink_source {
Expand Down

0 comments on commit ed3a993

Please sign in to comment.