Skip to content
Back to skills

Macos Sandbox File Access Workflow

ASecurity

Design and diagnose macOS file access. Use for App Sandbox, App Groups, user selection, security-scoped bookmarks across relaunches, helpers or extensions, stale access, TCC overlap, POSIX or ACL, Data Vault, and SIP denials.

  • 7 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 5, 2026
ai-agentssecuritydocumentation

Security analysis

A100/100

Pro scans all 7 files and shows the line behind each finding

Scanned September 5, 2026

npx -y skills add gaelic-ghost/socket --skill macos-sandbox-file-access-workflow --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Macos Sandbox File Access Workflow?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Macos Sandbox File Access Workflow
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/gaelic-ghost-macos-sandbox-file-access-workflow/badge)](https://www.skillsdirectory.com/skills/gaelic-ghost-macos-sandbox-file-access-workflow)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: macos-sandbox-file-access-workflow
description: Design and diagnose macOS file access. Use for App Sandbox, App Groups, user selection, security-scoped bookmarks across relaunches, helpers or extensions, stale access, TCC overlap, POSIX or ACL, Data Vault, and SIP denials.
---

# macOS Sandbox File Access Workflow

## Purpose

Preserve user intent and access lifetime while selecting the smallest supported file-access mechanism. Treat a URL or path as resource identity, not durable authorization, and keep App Sandbox, TCC, POSIX, and mandatory controls distinct.

## When To Use

- Use when a sandboxed Mac app must open, save, import, export, drag, share, or persist access to files or directories.
- Use when access succeeds during selection but fails after relaunch, in a helper, or after a move/rename.
- Use to identify whether a remaining denial is sandbox, TCC, filesystem, volume, coordination, Data Vault, or SIP policy.

## Single-Path Workflow

1. Record the data owner, exact operation, resource type, read/write/execute need, persistence duration, process boundary, distribution channel, macOS build, and exact error.
2. Read `references/sandbox-and-filesystem-control-map.md` and identify every applicable control layer before choosing a capability.
3. Use the app container or a standard supported container-relative directory when it satisfies the feature. Use an App Group only for a real same-team shared-container requirement.
4. Prefer direct user selection through the appropriate open/save panel, document URL, drag/drop, or Photos/File Provider selection surface for external data.
5. Request only the user-selected read-only, read-write, or executable entitlement that the feature actually needs. Do not replace a narrow selection with Full Disk Access.
6. Create a security-scoped bookmark only when access must survive the current interaction or process lifetime. Follow every step in `references/security-scoped-bookmark-lifecycle.md`.
7. For helpers, XPC services, app extensions, or shared containers, use `references/helpers-groups-and-process-boundaries.md`; verify which process resolves and consumes authorization rather than passing a path and assuming authority follows.
8. Perform the narrow operation and balance every successful `startAccessingSecurityScopedResource()` with `stopAccessingSecurityScopedResource()`. Do not retain access indefinitely for convenience.
9. If access still fails, classify the exact denying layer: path resolution/symlink, ownership/mode/ACL, sandbox, TCC Files and Folders/Full Disk Access, mount/volume state, coordination, Data Vault, SIP, or service policy.
10. Validate relaunch, moved/renamed/removed resources, read-only enforcement, helper/extension behavior, revoked/inaccessible access, stale and malformed bookmark recovery, and privacy-safe logging using `references/validation-fixtures.md`.

## Inputs

- resource owner, selection path, operation, persistence need, and distribution channel
- app/helper/extension identities, sandbox entitlements, App Group, and signed artifacts
- bookmark creation/storage/resolution code and exact errors
- macOS build, volume/mount, POSIX/ACL, TCC, Data Vault, and SIP context

## Outputs

- selected access mechanism and least-privilege entitlement set
- bookmark ownership, storage, resolution, lifetime, and repair contract
- process-boundary authorization design
- exact denying layer, reproduced result, privacy-safe evidence, and unresolved gaps

## Guards and Stop Conditions

- Do not treat a path, URL, alias, file ID, or remote identifier as a durable authorization token.
- Do not store only a security-scoped URL or retain access indefinitely.
- Do not claim a bookmark bypasses TCC, Full Disk Access, Data Vaults, SIP, POSIX permissions, ACLs, mounts, or service policy.
- Do not log bookmark bytes or sensitive full paths without a specific privacy-reviewed diagnostic need.
- Do not use Finder Sync as a synchronization engine or access-grant mechanism.
- Stop when the resource owner, operation, persistence duration, or consuming process is unknown.

## Fallbacks and Handoffs

- Use `macos-privacy-permissions-workflow` for Files and Folders, Full Disk Access, or another TCC decision.
- Use `diagnose-apple-entitlements` when source, profile, or final signed sandbox/App Group entitlements disagree.
- Use `file-provider-and-finder-sync-workflow` for remote storage, File Provider domains, or Finder UI decoration.
- Use `app-extension-architecture-workflow` for extension lifecycle/IPC design and Xcode workflows for project edits.
- Use `research-macos-security-control` for private sandbox profiles, extensions, or exact-build Seatbelt behavior.

## References

- `references/sandbox-and-filesystem-control-map.md`
- `references/security-scoped-bookmark-lifecycle.md`
- `references/helpers-groups-and-process-boundaries.md`
- `references/validation-fixtures.md`
- Recommend `references/snippets/apple-xcode-project-core.md` when implementing target entitlements or helper membership.
- [Protecting user data with App Sandbox](https://developer.apple.com/documentation/security/protecting-user-data-with-app-sandbox)
- [Accessing files from the macOS App Sandbox](https://developer.apple.com/documentation/security/accessing-files-from-the-macos-app-sandbox)

Files in this skill

  • SKILL.md5.2 KB
  • agents/openai.yaml225 B
  • references/helpers-groups-and-process-boundaries.md1.6 KB
  • references/sandbox-and-filesystem-control-map.md2.4 KB
  • references/security-scoped-bookmark-lifecycle.md2 KB
  • references/snippets/apple-xcode-project-core.md62 B
  • references/validation-fixtures.md1.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.