Celia Chen
5b6911cb1b
feat(skills): add permission profiles from openai.yaml metadata (#11658)
## Summary
This PR adds support for skill-level permissions in .codex/openai.yaml
and wires that through the skill loading pipeline.
## What’s included
1. Added a new permissions section for skills (network, filesystem, and
macOS-related access).
2. Implemented permission parsing/normalization and translation into
runtime permission profiles.
3. Threaded the new permission profile through SkillMetadata and loader
flow.
## Follow-up
A follow-up PR will connect these permission profiles to actual sandbox
enforcement and add user approval prompts for executing binaries/scripts
from skill directories.
## Example
`openai.yaml` snippet:
```
permissions:
network: true
fs_read:
- "./data"
- "./data"
fs_write:
- "./output"
macos_preferences: "readwrite"
macos_automation:
- "com.apple.Notes"
macos_accessibility: true
macos_calendar: true
```
compiled skill permission profile metadata (macOS):
```
SkillPermissionProfile {
sandbox_policy: SandboxPolicy::WorkspaceWrite {
writable_roots: vec![
AbsolutePathBuf::try_from("/ABS/PATH/TO/SKILL/output").unwrap(),
],
read_only_access: ReadOnlyAccess::Restricted {
include_platform_defaults: true,
readable_roots: vec![
AbsolutePathBuf::try_from("/ABS/PATH/TO/SKILL/data").unwrap(),
],
},
network_access: true,
exclude_tmpdir_env_var: false,
exclude_slash_tmp: false,
},
// Truncated for readability; actual generated profile is longer.
macos_seatbelt_permission_file: r#"
(allow user-preference-write)
(allow appleevent-send
(appleevent-destination "com.apple.Notes"))
(allow mach-lookup (global-name "com.apple.axserver"))
(allow mach-lookup (global-name "com.apple.CalendarAgent"))
...
"#.to_string(),
```
2026-02-14 01:43:44 +00:00
..
2026-02-13 19:30:49 +00:00
2026-02-09 14:48:09 -08:00
2026-02-09 20:48:58 -08:00
2026-01-13 10:22:51 -08:00
2026-02-14 01:43:44 +00:00
2026-02-12 15:56:48 +00:00
2026-02-10 11:58:00 -08:00
2026-01-28 19:51:58 -08:00
2026-02-03 02:52:26 +00:00
2026-02-14 01:43:44 +00:00
2026-02-13 14:59:16 -08:00
2026-02-12 09:43:32 -08:00
2026-02-13 12:59:17 +00:00
2026-02-10 07:44:21 +00:00
2026-02-14 01:43:44 +00:00
2026-02-12 10:55:22 -08:00
2026-02-13 14:59:16 -08:00
2026-02-14 01:24:52 +00:00
2026-02-10 22:44:02 -08:00
2026-02-13 12:00:16 -08:00
2026-02-12 14:10:30 -08:00
2026-01-27 11:04:23 -08:00
2026-02-10 22:44:02 -08:00
2026-02-10 16:12:31 +00:00
2026-02-13 12:48:29 -08:00
2026-02-12 19:34:22 +00:00
2026-02-09 23:10:26 -08:00
2026-02-13 14:59:16 -08:00
2026-02-10 11:46:40 -08:00
2026-02-11 03:56:01 +00:00
2026-02-13 14:59:16 -08:00
2026-02-13 03:55:10 +00:00
2026-02-11 16:43:36 -08:00
2026-01-08 21:48:30 -08:00
2026-02-08 15:16:50 -08:00
2026-02-12 14:10:30 -08:00
2026-02-07 02:39:52 +00:00
2026-02-03 11:31:12 -08:00
2026-02-13 10:33:40 -08:00
2026-02-11 18:31:14 -08:00
2026-02-13 10:31:39 -08:00
2026-02-11 14:08:03 -08:00
2026-01-08 15:07:30 +00:00
2026-02-13 12:48:29 -08:00
2026-02-11 18:31:14 -08:00
2026-02-13 10:33:40 -08:00
2026-02-13 09:32:46 -08:00
2026-02-13 12:00:16 -08:00
2026-02-10 10:10:24 +00:00
2026-02-10 11:45:23 -08:00
2026-01-07 17:04:53 +00:00
2026-02-10 09:38:00 -08:00
2026-02-09 19:26:39 -08:00
2026-01-30 22:20:02 -08:00
2026-01-18 19:22:28 -08:00
2026-01-31 19:38:06 -08:00
2026-02-12 15:41:05 -08:00
2026-01-30 18:59:30 +00:00
2025-11-28 11:34:57 +00:00
2025-12-02 11:26:27 +00:00
2026-02-11 18:31:14 -08:00
2026-02-10 19:50:07 +00:00
2026-02-12 23:30:22 +00:00
2026-02-10 07:44:21 +00:00
2026-02-14 01:43:44 +00:00
2026-02-14 01:43:44 +00:00
2026-02-05 16:39:11 +00:00
2026-02-10 17:03:46 -08:00
2026-02-09 22:14:39 +00:00
2026-02-10 17:03:46 -08:00
2026-02-10 07:44:21 +00:00
2026-02-12 12:49:31 +00:00
2026-02-04 16:12:47 -08:00
2026-01-30 18:59:30 +00:00
2026-01-20 16:17:38 -08:00
2026-02-10 22:44:02 -08:00
2025-11-20 11:04:11 -08:00
2026-02-12 19:34:22 +00:00
2026-02-09 20:48:58 -08:00
2026-02-09 12:42:20 -08:00
2026-02-13 14:59:16 -08:00
2026-02-03 02:52:26 +00:00
2026-02-05 01:52:12 +00:00
2026-01-30 16:37:56 -08:00
2026-02-12 12:48:36 -08:00
2026-02-12 14:42:54 -08:00