{"id":43966,"date":"2024-07-04T16:07:43","date_gmt":"2024-07-04T20:07:43","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=43966"},"modified":"2024-07-04T17:06:36","modified_gmt":"2024-07-04T21:06:36","slug":"chatgpt-privacy-and-mac-sandbox-containers","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2024\/07\/04\/chatgpt-privacy-and-mac-sandbox-containers\/","title":{"rendered":"ChatGPT Privacy and Mac Sandbox Containers"},"content":{"rendered":"<p><a href=\"https:\/\/www.macrumors.com\/2024\/07\/04\/chatgpt-mac-app-stored-chats-plain-text\/\">Tim Hardwick<\/a>:<\/p>\n<blockquote cite=\"https:\/\/www.macrumors.com\/2024\/07\/04\/chatgpt-mac-app-stored-chats-plain-text\/\"><p>OpenAI has issued an update to its <a href=\"https:\/\/openai.com\/chatgpt\/mac\/\">ChatGPT app for Mac<\/a>, after a developer discovered the app was locally storing users&rsquo; conversations with the chatbot in plain text.<\/p><p>Pedro Jos&eacute; Pereira Vieito told <em><a href=\"https:\/\/www.theverge.com\/2024\/7\/3\/24191636\/openai-chatgpt-mac-app-conversations-plain-text\">The Verge<\/a><\/em>&rsquo;s Jay Peters: &ldquo;I was curious about why OpenAI opted out of using the app sandbox protections and ended up checking where they stored the app data.&rdquo;<\/p><\/blockquote>\n\n<p>It&rsquo;s not clear why ChatGPT isn&rsquo;t sandboxed. It could be that they just chose not to or that it&rsquo;s relying on an API or functionality that doesn&rsquo;t work in the sandbox.<\/p>\n\n<p>As the developer of several non-sandboxed apps, it seems like the right thing to do <em>is<\/em> to make every app sandboxed, potentially with some extra entitlements that wouldn&rsquo;t be allowed in the Mac App Store. In other words, run with only the permissions that the app actually needs. However, I have not seen much written about how to accomplish this sort of migration. It&rsquo;s not always clear what private entitlements are needed or whether they even exist. What will break after migrating the app&rsquo;s files into a container? What if the customer wants to go back to the previous version of the app? What if something changes in macOS or the sandbox such that the extra entitlements no longer do the job? Until recently, there have been a lot of potential headaches for little apparent benefit (protection against bugs in your app causing damage outside its container to files that it wasn&rsquo;t intentionally given access to).<\/p>\n\n<p><a href=\"https:\/\/pxlnv.com\/linklog\/chatgpt-app-sandboxing\/\">Nick Heer<\/a>:<\/p>\n<blockquote cite=\"https:\/\/pxlnv.com\/linklog\/chatgpt-app-sandboxing\/\">\n<p>Virtually all <a href=\"https:\/\/mastodon.social\/@stroughtonsmith\/112724457509297421\">media coverage<\/a> &mdash; including Peters&rsquo; article &mdash; has focused on the &ldquo;plain text&rdquo; aspect. Surely, though, the <a href=\"https:\/\/www.threads.net\/@pvieito\/post\/C882fmVIMgJ\">real privacy and security risk<\/a> identified in the ChatGPT app &mdash; such that there is any risk &mdash; was in storing its data outside the app&rsquo;s sandbox in an unprotected location. This decision made it possible for apps without any special access privileges to read its data without throwing up a permissions dialog.<\/p>\n<\/blockquote>\n\n<p>I&rsquo;ve seen lots of quoting of <a href=\"https:\/\/mastodon.social\/@pvieito\/112715900197985633\">Vieito&rsquo;s statement<\/a> that macOS 10.14 and later have blocked access to private user data, which I <a href=\"https:\/\/mastodon.social\/@pvieito\/112729044437158681\">interpreted<\/a> as saying that there are longstanding protections that ChatGPT should have taken advantage of. However, these protections only applied to certain built-in apps from Apple. With macOS Sonoma, Apple announced that macOS would <a href=\"https:\/\/mjtsai.com\/blog\/2023\/06\/15\/privacy-and-security-in-macos-14\/\">prompt the user<\/a> when accessing files inside another app&rsquo;s container. Thus, while, historically, sandboxing app A would only <em>restrict<\/em> what A could do, now making A sandboxed could also <em>protect<\/em> it from app B (whether or not B is sandboxed). macOS Sequoia expands this protection <a href=\"https:\/\/developer.apple.com\/videos\/play\/wwdc2024\/10123\/\">to group containers<\/a>.<\/p>\n\n<p>I don&rsquo;t think I ever saw one of these prompts, so I figured that Apple had at some point backtracked. And, after seeing the above discussion, I wrote a quick test app that accessed files in lots of sandboxed apps&rsquo; containers&mdash;without generating any prompts. Where&rsquo;s the protection? The answer seems to be that only containers of <a href=\"https:\/\/mastodon.social\/@pvieito\/112728935460349125\">newly installed apps<\/a> are protected from other apps. If you had <em>first<\/em> installed the app prior to updating to Sonoma, other apps can access its data, same as always. But, with ChatGPT being a <a href=\"https:\/\/www.computerworld.com\/article\/2505363\/openai-brings-its-chatgpt-app-to-all-mac-users.html\">new app<\/a> that requires macOS Sonoma, sandboxing would have offered the protections, such as they are, to everyone.<\/p>\n\n<p><a href=\"https:\/\/mastodon.social\/@arroz\/112729363866125343\">Miguel Arroz<\/a>:<\/p>\n<blockquote cite=\"https:\/\/mastodon.social\/@arroz\/112729363866125343\"><p>Mostly everything stores your data in plain text on your Mac. Data is protected via full disk encryption from anyone who steals your Mac, but not from other apps.<\/p><p>[&#8230;]<\/p><p>Everyone seems happy the latest update encrypts stored chats. Haven&rsquo;t seen anyone asking the obvious, where&rsquo;s the key? If the key is randomly generated and stored on the Mac&rsquo;s keychain, I have bad news for you.<\/p><\/blockquote>\n\n<p><a href=\"https:\/\/mastodon.social\/@lapcatsoftware\/112728932582800096\">Jeff Johnson<\/a>:<\/p>\n<blockquote cite=\"https:\/\/mastodon.social\/@lapcatsoftware\/112728932582800096\">\n<p>This seems like much ado about nothing. Very little app data on Mac is encrypted on disk at runtime.<\/p>\n<p>Sandboxed apps (e.g., from Mac App Store) can&rsquo;t access the data anyway. And if you&rsquo;ve installed a non-sandboxed malware app on your Mac, then frankly you&rsquo;re screwed no matter what. Non-sandboxed apps can get you in a million different ways. There&rsquo;s no reliable protection. Be careful of what you install. Plus there are approximately infinity TCC privilege escalation bugs.<\/p>\n<\/blockquote>\n\n<p>And, I think it&rsquo;s rather easy for sandboxed apps to trick users into granting access that they didn&rsquo;t intend.<\/p>\n\n<p><a href=\"https:\/\/mastodon.cloud\/@drewmccormack\/112724418100406837\">Drew McCormack<\/a>:<\/p>\n<blockquote cite=\"https:\/\/mastodon.cloud\/@drewmccormack\/112724418100406837\">\n<p>I think the local data storage is the least of your worries with these companies. All that data has to go to the cloud too. That is a much bigger risk IMO.<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/nozzi.social\/@joshua\/112730115303326402\">Joshua Nozzi<\/a>:<\/p>\n<blockquote cite=\"https:\/\/nozzi.social\/@joshua\/112730115303326402\">\n<p>I still don&rsquo;t see the scandal specific to ChatGPT.<\/p>\n<\/blockquote>\n<p>I don&rsquo;t either. People should be more worried about their Chrome history, for example.<\/p>\n\n<p>Previously:<\/p>\n<ul>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2024\/06\/03\/privacy-of-windows-copilot-recall\/\">Privacy of Windows Copilot+ Recall<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2023\/06\/15\/privacy-and-security-in-macos-14\/\">Privacy and Security in macOS 14<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Tim Hardwick: OpenAI has issued an update to its ChatGPT app for Mac, after a developer discovered the app was locally storing users&rsquo; conversations with the chatbot in plain text.Pedro Jos&eacute; Pereira Vieito told The Verge&rsquo;s Jay Peters: &ldquo;I was curious about why OpenAI opted out of using the app sandbox protections and ended up [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2024-07-04T20:07:46Z","apple_news_api_id":"e24e04dd-ef22-4f2b-a499-ae099d772585","apple_news_api_modified_at":"2024-07-04T21:06:41Z","apple_news_api_revision":"AAAAAAAAAAAAAAAAAAAACw==","apple_news_api_share_url":"https:\/\/apple.news\/A4k4E3e8iTyukma4JnXclhQ","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[2],"tags":[2317,456,30,32,1609,2385,2598,2361,355,53,1960],"class_list":["post-43966","post","type-post","status-publish","format-standard","hentry","category-technology","tag-chatgpt","tag-googlechrome","tag-mac","tag-macapp","tag-macos-10-14","tag-macos-14-sonoma","tag-macos-15-sequoia","tag-openai","tag-privacy","tag-sandboxing","tag-transparency-consent-and-control-tcc"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/43966","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=43966"}],"version-history":[{"count":13,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/43966\/revisions"}],"predecessor-version":[{"id":43979,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/43966\/revisions\/43979"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=43966"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=43966"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=43966"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}