Commit ba815b7
committed
fix(e2e): validate E2E_SHARED_CACHE_DIR before use (path-injection)
CodeQL flagged shared_cache_dir() as a high-severity path-injection: the
CI-provided E2E_SHARED_CACHE_DIR flowed into create_dir_all unchecked. Require
the override to be an absolute path with no `..` traversal components before it
reaches the filesystem sink — rejects a malformed/relative value and clears the
taint flow. Behaviour is unchanged for the well-formed absolute path CI sets.
Signed-off-by: fredespi <fredrik.espinoza@gmail.com>1 parent 28a47ab commit ba815b7
1 file changed
Lines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
68 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
69 | 79 | | |
70 | 80 | | |
71 | 81 | | |
| |||
0 commit comments