fix(task-tool): add task ID validation and improve lock acquisition safety

- Add task ID pattern validation (T-[A-Za-z0-9-]+) to prevent path traversal
- Refactor lock mechanism to use UUID-based IDs for reliable ownership tracking
- Implement atomic lock creation with stale lock detection and cleanup
- Add lock acquisition checks in create/update/delete handlers
- Expand task-reminder hook to track split tool names and clean up on session deletion
- Add comprehensive test coverage for validation and lock handling
This commit is contained in:
YeonGyu-Kim
2026-02-01 23:48:48 +09:00
parent 172446795c
commit f853d885fa
9 changed files with 206 additions and 54 deletions
+5 -27
View File
@@ -8,6 +8,9 @@
"$schema": {
"type": "string"
},
"new_task_system_enabled": {
"type": "boolean"
},
"disabled_mcps": {
"type": "array",
"items": {
@@ -83,7 +86,8 @@
"start-work",
"atlas",
"unstable-agent-babysitter",
"stop-continuation-guard"
"stop-continuation-guard",
"tasks-todowrite-disabler"
]
}
},
@@ -3005,10 +3009,6 @@
"tasks": {
"type": "object",
"properties": {
"enabled": {
"default": false,
"type": "boolean"
},
"storage_path": {
"default": ".sisyphus/tasks",
"type": "string"
@@ -3018,28 +3018,6 @@
"type": "boolean"
}
}
},
"swarm": {
"type": "object",
"properties": {
"enabled": {
"default": false,
"type": "boolean"
},
"storage_path": {
"default": ".sisyphus/teams",
"type": "string"
},
"ui_mode": {
"default": "toast",
"type": "string",
"enum": [
"toast",
"tmux",
"both"
]
}
}
}
}
}