vetkit.swift.webview.universal-file-access
A WKWebView is configured with allowUniversalAccessFromFileURLs through KVC. A file:// page can then read any local file and send it to any origin.
Last updated:
Suite: Security
swift
A WKWebView is configured with allowUniversalAccessFromFileURLs through KVC. A file:// page can then read any local file and send it to any origin.
Category: SECURITY · Engine rule severity: ERROR
How to fix it
Remove the private KVC flag; load local content with loadFileURL(_:allowingReadAccessTo:) scoped to a dedicated directory.
Rule pattern example
The engine’s matching pattern, not a confirmed exploit. Metavariables and ellipses describe matching syntax.
$CONFIG.setValue(true, forKey: "allowUniversalAccessFromFileURLs")References
Source: packages/engine/rules/sast/swift.yml.
Generated from shipped rule definitions at build time. Matching is a review signal, not proof of exploitability. “generic” denotes text matching, not complete language or framework coverage. Runtime configuration and available tools affect whether a rule runs.