惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Microsoft Azure Blog
Microsoft Azure Blog
Google Online Security Blog
Google Online Security Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Simon Willison's Weblog
Simon Willison's Weblog
T
Threat Research - Cisco Blogs
C
CXSECURITY Database RSS Feed - CXSecurity.com
L
Lohrmann on Cybersecurity
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Forbes - Security
Forbes - Security
P
Palo Alto Networks Blog
Schneier on Security
Schneier on Security
S
Schneier on Security
T
Tor Project blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
WordPress大学
WordPress大学
The Hacker News
The Hacker News
Hacker News - Newest:
Hacker News - Newest: "LLM"
罗磊的独立博客
Application and Cybersecurity Blog
Application and Cybersecurity Blog
F
Fortinet All Blogs
博客园 - 三生石上(FineUI控件)
小众软件
小众软件
C
Check Point Blog
Stack Overflow Blog
Stack Overflow Blog
Blog — PlanetScale
Blog — PlanetScale
雷峰网
雷峰网
S
Security @ Cisco Blogs
PCI Perspectives
PCI Perspectives
Spread Privacy
Spread Privacy
W
WeLiveSecurity
SecWiki News
SecWiki News
A
About on SuperTechFans
H
Help Net Security
博客园 - 司徒正美
Recent Commits to openclaw:main
Recent Commits to openclaw:main
爱范儿
爱范儿
S
Securelist
M
MIT News - Artificial intelligence
云风的 BLOG
云风的 BLOG
月光博客
月光博客
Jina AI
Jina AI
博客园 - 叶小钗
Vercel News
Vercel News
阮一峰的网络日志
阮一峰的网络日志
Recent Announcements
Recent Announcements
S
Secure Thoughts
The Cloudflare Blog
美团技术团队
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

The Eclectic Light Company

Apple has released an update to XProtect for all macOS Hero or hooligan: Theseus’ later years BSD flags are incompatible with iCloud Drive Apple has released macOS Tahoe 26.5.1 In memoriam Mary Cassatt: 1, 1868-1880 Solutions to Saturday Mac riddles 362 What Location Services do in macOS Eclectic paintings of Joseph Stella: 2 European myths Last Week on My Mac: Razzle and dazzle Eclectic paintings of Joseph Stella: 1 American landscapes Saturday Mac riddles 362 Protect files with the Locked or Immutable flag Reading Visual Art: 252 Dragonfly What happens in the log when an app crashes as it starts up? Portraits of trees: Introduction On Reflection: Conclusions and contents Which tasks require mains power? Medium and message: Vast canvases Online reference to external displays for Apple silicon Macs What’s in that phishing email? Hero or hooligan: Theseus and Ariadne Solutions to Saturday Mac riddles 361 How to search document versions Rubens’ Consequences of War Rubens’ Peace and War Saturday Mac riddles 361 How to search Time Machine backups? Naturalists: Contents and artists On Reflection: Extending the image Tackle QuickLook problems Medium and message: Pottery Hero or hooligan: Theseus and the sandals How QuickLook provides thumbnails and previews Last Week on My Mac: Syncing metadata in iCloud Drive Paintings of visits to India 1778-1877 Saturday Mac riddles 360 Naturalists: Sorolla and Zorn On Reflection: Pierre Bonnard 1909-1946 SpotTest 1.2 can display Spotlight metadata directly On Reflection: Pierre Bonnard 1899-1908 How to preserve versions, and how to create versioned PDFs Medium and message: Sculpture What gets synced in iCloud Drive? Hero or hooligan: Perseus 2 Solutions to Saturday Mac riddles 359 Last Week on My Mac: snapshots, the elephant in APFS Paintings of Beatrice Portinari: to 1862 Saturday Mac riddles 359 Naturalists: Into the 20th century How to check whether Spotlight is getting the right metadata On Reflection: Mirror play Hero or hooligan: Perseus 1 The bicentenary of Frederic Edwin Church: 1857-77 Solutions to Saturday Mac riddles 358 macOS virtual machines and audio-video syncing A walk in the parks of Rome, Vienna, Manhattan and Brooklyn Saturday Mac riddles 358 Naturalists: Photography Use Finder tags for categories Control what gets written to the log Medium and message: Tapestry Virtualisation on Apple silicon Macs is different Jerusalem Delivered: Overview and contents The bicentenary of Frederic Edwin Church: 1849-57 Solutions to Saturday Mac riddles 357 Painting Pandora and her box: 1883-1919 Painting Pandora and her box: 1550-1882 Saturday Mac riddles 357 Reading Visual Art: 250 Winged sandals The secret life of the xattr The macOS Natural Language framework and Nalaprop Medium and Message: Stained glass The MACL extended attribute Jerusalem Delivered: 13 Leading characters Solutions to Saturday Mac riddles 356 Privacy: How locations are protected Painting Spring blossom 2 Last Week on My Mac: Don’t be a victim of fraud Painting Spring blossom 1 Saturday Mac riddles 356 Explainer: Recovery Reading Visual Art: 249 Mask Naturalists: Urban poverty On Reflection: Cézanne Privacy: Which folders are protected in Tahoe? Medium and Message: Mosaic Jerusalem Delivered: 12 Delivery Solutions to Saturday Mac riddles 355 Centaurs 2: Revenge Centaurs 1: Fights Saturday Mac riddles 355 Naturalists: The modern meal Why you can’t trust Privacy & Security Apple has just released an update to macOS Tahoe, to version 26.4.1 On Reflection: Divisionism Please help update CPU frequencies for Apple silicon Macs Commemorating the centenary of the death of John Ferguson Weir Privacy: Files & Folders or Full Disk Access? Jerusalem Delivered: 11 Into Jerusalem Privacy: protected folders
Explainer: sandboxes
2026-04-11 · via The Eclectic Light Company

For a computer to be really secure, it mustn’t run any untrusted code. In macOS that would mean banning all third-party apps, which would severely limit the usefulness of a Mac. One way round this is to run all untrusted code in a tightly restricted environment, denying it the ability to access memory, storage or other resources outside those dedicated to it by its sandbox, managed by macOS.

Even that’s too restrictive for the vast majority of apps. You expect an image editor to be able to open and save images in folders you control, such as ~/Documents, those in your Pictures folder or Photos Library. So having put an app into its sandbox, the next thing you need to do is provide it ways to ease some of those restrictions. In Apple’s operating systems, those are granted according to entitlements burned into the app’s signature.

Considering our hypothetical sandboxed image editor, those entitlements are likely to include com.apple.security.files.user-selected.read-write, giving the app read and write access to files the user has selected in a standard macOS Open or Save dialog.

This overlaps with privacy protection controlled by TCC. The standard user folder for images is ~/Pictures, so to gain read and write access to that the app needs an entitlement for com.apple.security.assets.pictures.read-write as well. Then there’s the desire to gain direct access to any built-in or external camera to capture movies and still images, requiring com.apple.security.device.camera, another entitlement overlapping with those to protect privacy.

What started off as an app running entirely within its sandbox is gradually being allowed to do more, and that sandbox is becoming less effective as the app gains access to more outside resources. Although this might appear increasingly pointless, balanced compromises can be reached that limit an app’s attack surface without frustrating users.

Apple requires all apps distributed through its App Store to run in their app sandbox, something marked in the app by another entitlement com.apple.security.app-sandbox, and explained here.

macOS also applies sandbox features to apps that aren’t marked to be run in a sandbox, most notably to implement privacy protection. By default, when any app tries to list the contents of a protected folder, the sandbox blocks that unless the privacy controller TCC authorises access. Unfortunately that can lead to complex interactions between sandboxing and TCC.

The Finder and other bundled utilities in macOS don’t reveal the entitlements claimed by sandboxed apps, indeed they don’t even tell you whether an app runs in a sandbox in the first place, a curious omission. For that you’ll need a third-party tool such as Mothers Ruin’s Apparency. Some sandboxed apps have such long lists of entitlements that they seem allowed to do almost anything, and you might wonder how effective that sandbox would be at preventing malicious behaviour from affecting your Mac.

Entitlements aren’t necessarily an indicator that an app is sandboxed, either: com.apple.security.app-sandbox is the tell-tale sign. Apple also uses entitlements to grant access to certain restricted features in macOS, like snapshots. Look at the entitlements of apps like Carbon Copy Cloner that have access to snapshots and you’ll see com.apple.developer.vfs.snapshot there for that purpose, even though that app isn’t sandboxed.

Because entitlements, including that to sandbox the app, are burned into an app’s signature, the only way to remove any of them is to strip the app’s signature altogether, and remove the whole lot. You would then have to re-sign the app using an ad hoc signature, and you’re pretty well guaranteed that your doctored app won’t run at all. So there’s no practical way out of sandboxing and entitlements for those apps requiring them.

Another distinctive feature of a sandboxed app is its named container folder, in ~/Library/Containers, where its sandboxed storage is located. An app’s container is created automatically by macOS when that app is run for the first time, but isn’t cleaned up when the app is removed, so can become orphaned and merit careful manual removal.

As App Store apps have to be sandboxed, but notarized apps supplied outside the App Store don’t, it might be tempting to see them as alternatives, or complementary to one another, but they’re very different. A few apps like BBEdit are both sandboxed and notarized, but that’s usually even harder than it sounds, and quite an accomplishment when it works well. But the restrictions of the sandbox make it impossible for many apps to do their jobs, so there will always be a need for those that don’t run in a sandbox.