Bug 219041 - [macOS] Issue sandbox extension to Web Inspector service
Summary: [macOS] Issue sandbox extension to Web Inspector service
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Per Arne Vollan
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-11-17 11:25 PST by Per Arne Vollan
Modified: 2020-11-19 09:32 PST (History)
2 users (show)

See Also:


Attachments
Patch (14.19 KB, patch)
2020-11-17 11:39 PST, Per Arne Vollan
bfulgham: review+
Details | Formatted Diff | Diff
Patch (14.26 KB, patch)
2020-11-19 09:03 PST, Per Arne Vollan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Per Arne Vollan 2020-11-17 11:25:31 PST
In preparation of blocking this service in the WebContent process, a sandbox extension should be issued if Safari's Develop menu is enabled.
Comment 1 Radar WebKit Bug Importer 2020-11-17 11:25:50 PST
<rdar://problem/71495287>
Comment 2 Per Arne Vollan 2020-11-17 11:39:02 PST
Created attachment 414359 [details]
Patch
Comment 3 Brent Fulgham 2020-11-18 16:52:28 PST
Comment on attachment 414359 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=414359&action=review

r=me

> Source/WebKit/UIProcess/Cocoa/WebProcessProxyCocoa.mm:209
> +    if (!CFPreferencesGetAppIntegerValue(CFSTR("ShowDevelopMenu"), CFSTR("com.apple.Safari.SandboxBroker"), nullptr))

It's a shame we couldn't reuse WIRRemoteInspectorEnabledKey here (i.e., define this differently on non-IOS_FAMILY).

> Tools/MiniBrowser/MiniBrowser.entitlements:29
> +		<string>com.apple.Safari.SandboxBroker</string>

Do we need this for WebKitTestRunner?
Comment 4 Per Arne Vollan 2020-11-19 09:03:21 PST
Created attachment 414589 [details]
Patch
Comment 5 Per Arne Vollan 2020-11-19 09:04:17 PST
(In reply to Brent Fulgham from comment #3)
> Comment on attachment 414359 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=414359&action=review
> 
> r=me
> 
> > Source/WebKit/UIProcess/Cocoa/WebProcessProxyCocoa.mm:209
> > +    if (!CFPreferencesGetAppIntegerValue(CFSTR("ShowDevelopMenu"), CFSTR("com.apple.Safari.SandboxBroker"), nullptr))
> 
> It's a shame we couldn't reuse WIRRemoteInspectorEnabledKey here (i.e.,
> define this differently on non-IOS_FAMILY).
> 
> > Tools/MiniBrowser/MiniBrowser.entitlements:29
> > +		<string>com.apple.Safari.SandboxBroker</string>
> 
> Do we need this for WebKitTestRunner?

I don't believe so, since WebKitTestRunner is not sandboxed, AFAIK.

Thanks for reviewing!
Comment 6 EWS 2020-11-19 09:32:47 PST
Committed r270035: <https://trac.webkit.org/changeset/270035>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 414589 [details].