Skip to content

Commit f1c82f3

Browse files
chore(mdm): expand TCC skip to cover Photos, Media Library, App Management
1 parent 5f0c4f9 commit f1c82f3

2 files changed

Lines changed: 28 additions & 12 deletions

File tree

docs/macos-tcc-permissions.md

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,27 @@ modern macOS (anchored at the logged-in user's `$HOME`):
4040
~/Movies ~/Library/Reminders
4141
~/Music ~/Library/HomeKit
4242
~/Public ~/Library/Suggestions
43-
~/.Trash ~/Library/Application Support/AddressBook
44-
~/Library/Mobile Documents ~/Library/Application Support/CallHistoryDB
45-
~/Library/CloudStorage ~/Library/Application Support/CallHistoryTransactions
46-
~/Library/IdentityServices
47-
~/Library/Metadata/CoreSpotlight
48-
~/Library/PersonalizationPortrait
49-
~/Library/Containers/com.apple.mail
50-
~/Library/Group Containers/group.com.apple.calendar
51-
~/Library/Group Containers/group.com.apple.notes
43+
~/.Trash ~/Library/IdentityServices
44+
~/Library/Mobile Documents ~/Library/Metadata/CoreSpotlight
45+
~/Library/CloudStorage ~/Library/PersonalizationPortrait
46+
~/Library/Containers ~/Library/Application Support/AddressBook
47+
~/Library/Group Containers ~/Library/Application Support/CallHistoryDB
48+
~/Library/Application ~/Library/Application Support/CallHistoryTransactions
49+
Scripts ~/Library/Application Support/com.apple.TCC
5250
5351
/Volumes/.timemachine* (Time Machine local snapshots, prefix match)
5452
```
5553

54+
The two parent skips that look broad (`~/Library/Containers` and
55+
`~/Library/Group Containers`) collapse per-app sandbox containers in
56+
one go. Apple gates many of those subtrees behind separate TCC
57+
services on modern macOS — Photos for `com.apple.Photos`, Media
58+
Library for `com.apple.Music`, and the Sonoma "App Management" /
59+
"Data from other apps" prompt for arbitrary `<app>/Data` subdirs. The
60+
contents (per-app sandbox state) aren't meaningful inventory data for
61+
the agent's purpose, so the broader skip avoids three distinct popup
62+
categories without losing useful coverage.
63+
5664
If a search dir is explicitly named (`--search-dirs ~/Documents`) the
5765
walk root itself is honored — the skip only applies to TCC paths
5866
encountered as descendants of the walked root.

internal/tcc/tcc_darwin.go

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,20 @@ var protectedSuffixes = []string{
3131
"Library/Application Support/AddressBook",
3232
"Library/Application Support/CallHistoryDB",
3333
"Library/Application Support/CallHistoryTransactions",
34+
"Library/Application Support/com.apple.TCC",
3435
"Library/IdentityServices",
3536
"Library/Metadata/CoreSpotlight",
3637
"Library/PersonalizationPortrait",
37-
"Library/Containers/com.apple.mail",
38-
"Library/Group Containers/group.com.apple.calendar",
39-
"Library/Group Containers/group.com.apple.notes",
38+
39+
// App sandbox containers — skipped wholesale because any descent into
40+
// these triggers per-service prompts (Photos for com.apple.Photos,
41+
// Media Library for com.apple.Music, the macOS Sonoma "App Management"
42+
// / "Data from other apps" prompt for arbitrary <app>/Data subdirs).
43+
// Nothing inside an app's sandbox is meaningful inventory data for
44+
// dev-machine-guard's purpose, so the broader skip is a clean win.
45+
"Library/Containers",
46+
"Library/Group Containers",
47+
"Library/Application Scripts",
4048

4149
"Library/Mobile Documents",
4250
"Library/CloudStorage",

0 commit comments

Comments
 (0)