fix(codex): close symlink escape on GET /file, pin project writes to server cwd

This commit is contained in:
2026-09-08 20:07:57 +07:00
parent 32839332f2
commit 29ed86d672
7 changed files with 246 additions and 89 deletions
+29 -18
View File
@@ -9017,16 +9017,8 @@ paths:
tags:
- CodexConfig
summary: Create or overwrite a text artifact
description: Writes skills/agents/rules/memory/config. `name` is required for skills/agents/rules and forbidden for memory/config (fixed filenames). Backs up any existing file first; broadcasts `codex_config_changed` on success.
description: Writes skills/agents/rules/memory/config. `name` is required for skills/agents/rules and forbidden for memory/config (fixed filenames). `project` scope always resolves against the dashboard server's own cwd — there is no `?cwd=` override on writes, unlike the read routes, so a caller cannot point a write at an arbitrary directory. Backs up any existing file first; broadcasts `codex_config_changed` on success.
operationId: codexConfigPutFile
parameters:
- name: cwd
in: query
required: false
schema:
type: string
description: Override the working directory used to resolve the project root and project .codex dir. Defaults to the dashboard server's own cwd.
example: /repo
requestBody:
required: true
content:
@@ -9091,16 +9083,8 @@ paths:
tags:
- CodexConfig
summary: Delete a text artifact
description: Deletes skills/agents/rules/memory/config. Backup is mandatory and runs first. Broadcasts `codex_config_changed` on success.
description: Deletes skills/agents/rules/memory/config. `project` scope always resolves against the dashboard server's own cwd — no `?cwd=` override, same as PUT. Backup is mandatory and runs first. Broadcasts `codex_config_changed` on success.
operationId: codexConfigDeleteFile
parameters:
- name: cwd
in: query
required: false
schema:
type: string
description: Override the working directory used to resolve the project root and project .codex dir. Defaults to the dashboard server's own cwd.
example: /repo
requestBody:
required: true
content:
@@ -9233,6 +9217,15 @@ paths:
stdout: ''
stderr: |
✘ marketplace "nope" is not registered
'502':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
example:
error:
code: ECLIBADOUTPUT
message: could not parse `codex` JSON output
'503':
content:
application/json:
@@ -9287,6 +9280,15 @@ paths:
stdout: ''
stderr: |
✘ marketplace "nope" is not registered
'502':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
example:
error:
code: ECLIBADOUTPUT
message: could not parse `codex` JSON output
'503':
content:
application/json:
@@ -9341,6 +9343,15 @@ paths:
stdout: ''
stderr: |
✘ marketplace "nope" is not registered
'502':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
example:
error:
code: ECLIBADOUTPUT
message: could not parse `codex` JSON output
'503':
content:
application/json: