Skip to content

Commit 6401dce

Browse files
committed
Add /app and /code as unsafe path starts
1 parent d2b2c95 commit 6401dce

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

aikido_zen/vulnerabilities/path_traversal/detect_path_traversal_test.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ def test_user_input_is_longer_than_file_path():
6868

6969
def test_absolute_linux_path():
7070
assert detect_path_traversal("/etc/passwd", "/etc/passwd") is True
71+
assert detect_path_traversal("/home/binaries/test", "/home/binaries") is True
72+
assert detect_path_traversal("/app/.env", "/app/.env") is True
7173

7274

7375
def test_linux_user_directory():

aikido_zen/vulnerabilities/path_traversal/unsafe_path_start.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
"/tmp/",
2121
"/usr/",
2222
"/var/",
23+
# More common in docker apps :
24+
"/app/",
25+
"/code/",
2326
]
2427

2528
# List of dangerous path starts, including Windows paths

0 commit comments

Comments
 (0)