fix(policy): normalize Windows FFI paths
Docs Deploy / Build and Deploy MkDocs (push) Successful in 40s
Test / Lint (push) Failing after 3m34s
Test / Test (push) Skipped
Test / Render parity (push) Skipped

This commit is contained in:
2026-07-18 05:22:20 +04:00
parent 337894528c
commit 9f7a94b0d9
+8 -1
View File
@@ -1563,7 +1563,7 @@ const AUDITED_UNSAFE_SOURCE_FILES: &[&str] = &[
]; ];
fn is_audited_unsafe_source(path: &Path) -> bool { fn is_audited_unsafe_source(path: &Path) -> bool {
let as_path = path.as_os_str().to_string_lossy(); let as_path = path.as_os_str().to_string_lossy().replace('\\', "/");
AUDITED_UNSAFE_SOURCE_FILES AUDITED_UNSAFE_SOURCE_FILES
.iter() .iter()
.any(|candidate| as_path.ends_with(candidate)) .any(|candidate| as_path.ends_with(candidate))
@@ -3739,4 +3739,11 @@ source = "git+https://example.invalid/repo"
)] )]
); );
} }
#[test]
fn audited_unsafe_allowlist_accepts_windows_separators() {
let path = Path::new(r".\adapters\fparkan-render-vulkan\src\ffi\runtime.rs");
assert!(is_audited_unsafe_source(path));
}
} }