-
-
Notifications
You must be signed in to change notification settings - Fork 954
Commit fd892df
committed
Add a unit test for CVE-2023-40590
This adds test_it_executes_git_not_from_cwd to verify that the
execute method does not use "git.exe" in the current directory on
Windows, nor "git" in the current directory on Unix-like systems,
when those files are executable.
It adds a _chdir helper context manager to support this, because
contextlib.chdir is only available on Python 3.11 and later.1 parent 6029211 commit fd892df
1 file changed
+31
-1
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4 | 4 |
| |
5 | 5 |
| |
6 | 6 |
| |
7 | + | ||
7 | 8 |
| |
9 | + | ||
8 | 10 |
| |
9 | 11 |
| |
10 | - | ||
12 | + | ||
11 | 13 |
| |
12 | 14 |
| |
13 | 15 |
| |
| |||
20 | 22 |
| |
21 | 23 |
| |
22 | 24 |
| |
25 | + | ||
26 | + | ||
27 | + | ||
28 | + | ||
29 | + | ||
30 | + | ||
31 | + | ||
32 | + | ||
33 | + | ||
34 | + | ||
35 | + | ||
23 | 36 |
| |
24 | 37 |
| |
25 | 38 |
| |
| |||
75 | 88 |
| |
76 | 89 |
| |
77 | 90 |
| |
91 | + | ||
92 | + | ||
93 | + | ||
94 | + | ||
95 | + | ||
96 | + | ||
97 | + | ||
98 | + | ||
99 | + | ||
100 | + | ||
101 | + | ||
102 | + | ||
103 | + | ||
104 | + | ||
105 | + | ||
106 | + | ||
107 | + | ||
78 | 108 |
| |
79 | 109 |
| |
80 | 110 |
| |
|
0 commit comments