fix: sandbox deny patterns - use (\s|$) instead of \b for find / and ls /
This commit is contained in:
parent
a11f19b841
commit
91201720e2
1 changed files with 2 additions and 2 deletions
|
|
@ -95,8 +95,8 @@ var (
|
|||
regexp.MustCompile(`\bssh\b.*@`),
|
||||
regexp.MustCompile(`\beval\b`),
|
||||
regexp.MustCompile(`\bsource\s+.*\.sh\b`),
|
||||
regexp.MustCompile(`\bfind\s+/\b`), // find / - traverse entire filesystem
|
||||
regexp.MustCompile(`\bls\s+/\b`), // ls / - list root directory
|
||||
regexp.MustCompile(`\bfind\s+/(\s|$)`), // find / - traverse entire filesystem
|
||||
regexp.MustCompile(`\bls\s+/(\s|$)`), // ls / - list root directory
|
||||
}
|
||||
|
||||
// absolutePathPattern matches absolute file paths in commands (Unix and Windows).
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue