Repository navigation
core: widen sandbox to allow certificate ops when network is enabled #5980
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
617e1f2
core: widen sandbox to allow certificate ops when network is enabled
nornagon-openai 78ad2a4
wip
nornagon-openai 51b3325
darwin dirs
nornagon-openai 3b7e123
cleanup
nornagon-openai bb551a2
fix
nornagon-openai b4b1521
Merge remote-tracking branch 'origin/main' into nornagon/tls-network
nornagon-openai 81bec8a
Fix Linux builds by gating seatbelt imports
nornagon-openai 090071f
Gate CLI seatbelt debug helper on macOS
nornagon-openai 0afadaf
Gate sandbox env import to macOS
nornagon-openai aa73605
Gate SeatbeltUnavailable variant to non-macOS
nornagon-openai 10948d4
Split seatbelt debug helper per platform
nornagon-openai 6203fa5
Gate SandboxType::Seatbelt to macOS builds
nornagon-openai b3e6915
Remove non-mac Seatbelt match arm
nornagon-openai b040c85
Apply suggestion from @nornagon-openai
nornagon-openai 9fe1158
fmt
nornagon-openai 0dff44d
Update seatbelt_network_policy.sbpl
nornagon-openai 28035dc
Apply suggestion from @nornagon-openai
nornagon-openai File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| ; when network access is enabled, these policies are added after those in seatbelt_base_policy.sbpl | ||
| ; Ref https://source.chromium.org/chromium/chromium/src/+/main:sandbox/policy/mac/network.sb;drc=f8f264d5e4e7509c913f4c60c2639d15905a07e4 | ||
|
|
||
| (allow network-outbound) | ||
| (allow network-inbound) | ||
| (allow system-socket) | ||
|
|
||
| (allow mach-lookup | ||
| ; Used to look up the _CS_DARWIN_USER_CACHE_DIR in the sandbox. | ||
| (global-name "com.apple.bsd.dirhelper") | ||
| (global-name "com.apple.system.opendirectoryd.membership") | ||
|
nornagon-openai marked this conversation as resolved.
Resolved
|
||
|
|
||
| ; Communicate with the security server for TLS certificate information. | ||
| (global-name "com.apple.SecurityServer") | ||
| (global-name "com.apple.networkd") | ||
| (global-name "com.apple.ocspd") | ||
| (global-name "com.apple.trustd.agent") | ||
|
|
||
| ; Read network configuration. | ||
| (global-name "com.apple.SystemConfiguration.DNSConfiguration") | ||
| (global-name "com.apple.SystemConfiguration.configd") | ||
| ) | ||
|
|
||
| (allow sysctl-read | ||
| (sysctl-name-regex #"^net.routetable") | ||
| ) | ||
|
|
||
| (allow file-write* | ||
| (subpath (param "DARWIN_USER_CACHE_DIR")) | ||
| ) | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ref https://source.chromium.org/chromium/chromium/src/+/main:content/browser/sandbox_parameters_mac.mm;l=66-70;drc=370a58104f2ea5d4cd89636ae24212adc9d47410