WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
322074
[SecurityFlags] Allow disabling security flags locally through a user default
https://bugs.webkit.org/show_bug.cgi?id=322074
Summary
[SecurityFlags] Allow disabling security flags locally through a user default
Basuke Suzuki
Reported
2026-08-18 17:02:58 PDT
rdar://185262053
Follow-up to
bug 321950
(
rdar://185129202
), which introduced SecurityFlags and the propagation to the privileged child processes. There is no way to disable a security flag on a local device yet: the server-side list delivery does not exist, and the only entry point is a testing SPI that a client has to call from code. Add a user default that the UIProcess reads at startup, so a flag can be disabled without building WebKit: defaults write com.apple.Safari WebKitDebugDisabledSecurityFlags -array radar184485266 defaults write -g WebKitDebugDisabledSecurityFlags -array radar184485266 Design: - Read in the SecurityFlagsController constructor. Every child-process launch path goes through the singleton, so the default is always applied before any child receives its creation parameters; no new call site and no ordering window. - Read through [NSUserDefaults standardUserDefaults], matching the existing user defaults in the UIProcess. The standard search list covers the application domain and the global domain, so one key serves per-app and device-wide testing alike. - Cocoa only; a stub returns an empty list on the other ports. - Gated the same way the existing testing SPI is: compiled out of builds without the internal SDK, and a no-op unless this is an internal install. - Names from the default are sticky and stay disabled no matter what list is applied later. The one exception is the testing SPI, which ignores the default so the existing API tests stay hermetic; that carve-out can only move flags toward enforced.
Attachments
Add attachment
proposed patch, testcase, etc.
Basuke Suzuki
Comment 1
2026-08-18 17:03:08 PDT
rdar://185262053
Basuke Suzuki
Comment 2
2026-08-19 10:12:18 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/71947
EWS
Comment 3
2026-08-20 08:41:51 PDT
Committed
319525@main
(9a2bcc01a9a8): <
https://commits.webkit.org/319525@main
> Reviewed commits have been landed. Closing PR #71947 and removing active labels.
Basuke Suzuki
Comment 4
2026-08-24 23:03:28 PDT
<
rdar://problem/185453780
>
Basuke Suzuki
Comment 5
2026-08-24 23:06:11 PDT
Re-opening for pull request
https://github.com/apple/WebKit/pull/6433
EWS
Comment 6
2026-08-25 01:21:05 PDT
Committed
316606.466@safari-7625-branch
(c888a6679a13): <
https://commits.webkit.org/316606.466@safari-7625-branch
> Reviewed commits have been landed. Closing PR #6433 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug