File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -231,9 +231,11 @@ TEST(cypher_rejects_union_injection) {
231231}
232232
233233/* ══════════════════════════════════════════════════════════════════
234- * PATH CONTAINMENT
234+ * PATH CONTAINMENT (POSIX only — realpath() not available on Windows)
235235 * ══════════════════════════════════════════════════════════════════ */
236236
237+ #ifndef _WIN32
238+
237239TEST (path_traversal_blocked ) {
238240 /* The get_code_snippet handler uses realpath() to verify that the
239241 * resolved file path starts with the project root. We test this
@@ -282,6 +284,8 @@ TEST(path_within_root_allowed) {
282284 PASS ();
283285}
284286
287+ #endif /* _WIN32 — path containment */
288+
285289/* ══════════════════════════════════════════════════════════════════
286290 * SHELL-FREE SUBPROCESS EXECUTION (cbm_exec_no_shell)
287291 *
@@ -374,9 +378,11 @@ SUITE(security) {
374378 RUN_TEST (cypher_rejects_sql_injection_in_string );
375379 RUN_TEST (cypher_rejects_union_injection );
376380
377- /* Path containment */
381+ /* Path containment (POSIX only) */
382+ #ifndef _WIN32
378383 RUN_TEST (path_traversal_blocked );
379384 RUN_TEST (path_within_root_allowed );
385+ #endif
380386
381387#ifndef _WIN32
382388 /* Shell-free subprocess execution */
You can’t perform that action at this time.
0 commit comments