mirror of
https://github.com/openai/codex.git
synced 2026-04-27 08:05:51 +00:00
POC - Configurable ReadAcess in WorkspaceWrite SandboxPolicy
This commit is contained in:
@@ -7548,6 +7548,14 @@
|
||||
"description": "When set to `true`, outbound network access is allowed. `false` by default.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"read_access": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/WorkspaceReadAccess"
|
||||
}
|
||||
],
|
||||
"description": "Controls whether the workspace-write policy has full read access or an explicit read allowlist."
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"workspace-write"
|
||||
@@ -9684,6 +9692,52 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"WorkspaceReadAccess": {
|
||||
"description": "Controls read access semantics for `workspace-write` sandbox policies.",
|
||||
"oneOf": [
|
||||
{
|
||||
"description": "Preserve current behavior where all file-system paths are readable.",
|
||||
"properties": {
|
||||
"type": {
|
||||
"enum": [
|
||||
"full-read-access"
|
||||
],
|
||||
"title": "FullReadAccessWorkspaceReadAccessType",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type"
|
||||
],
|
||||
"title": "FullReadAccessWorkspaceReadAccess",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"description": "Restrict reads to an explicit allowlist plus implicitly readable paths.",
|
||||
"properties": {
|
||||
"readable_roots": {
|
||||
"description": "Additional folders that should be readable from inside the sandbox.",
|
||||
"items": {
|
||||
"$ref": "#/definitions/AbsolutePathBuf"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"restricted-read-access"
|
||||
],
|
||||
"title": "RestrictedReadAccessWorkspaceReadAccessType",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type"
|
||||
],
|
||||
"title": "RestrictedReadAccessWorkspaceReadAccess",
|
||||
"type": "object"
|
||||
}
|
||||
]
|
||||
},
|
||||
"v2": {
|
||||
"AbsolutePathBuf": {
|
||||
"description": "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
|
||||
@@ -13464,6 +13518,9 @@
|
||||
"default": false,
|
||||
"type": "boolean"
|
||||
},
|
||||
"readAccess": {
|
||||
"$ref": "#/definitions/v2/WorkspaceReadAccess"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"workspaceWrite"
|
||||
@@ -13501,6 +13558,9 @@
|
||||
"default": false,
|
||||
"type": "boolean"
|
||||
},
|
||||
"read_access": {
|
||||
"$ref": "#/definitions/v2/WorkspaceReadAccess"
|
||||
},
|
||||
"writable_roots": {
|
||||
"default": [],
|
||||
"items": {
|
||||
@@ -16055,6 +16115,49 @@
|
||||
"title": "WindowsWorldWritableWarningNotification",
|
||||
"type": "object"
|
||||
},
|
||||
"WorkspaceReadAccess": {
|
||||
"oneOf": [
|
||||
{
|
||||
"properties": {
|
||||
"type": {
|
||||
"enum": [
|
||||
"fullReadAccess"
|
||||
],
|
||||
"title": "FullReadAccessWorkspaceReadAccessType",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type"
|
||||
],
|
||||
"title": "FullReadAccessWorkspaceReadAccess",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"readableRoots": {
|
||||
"default": [],
|
||||
"items": {
|
||||
"$ref": "#/definitions/v2/AbsolutePathBuf"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"restrictedReadAccess"
|
||||
],
|
||||
"title": "RestrictedReadAccessWorkspaceReadAccessType",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type"
|
||||
],
|
||||
"title": "RestrictedReadAccessWorkspaceReadAccess",
|
||||
"type": "object"
|
||||
}
|
||||
]
|
||||
},
|
||||
"WriteStatus": {
|
||||
"enum": [
|
||||
"ok",
|
||||
|
||||
Reference in New Issue
Block a user