T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/task_manager.py:16- Finding
Missing Task Ownership and Caller Isolation
- Content
View full analysis
' to create one.") return lines = ["**📋 Your Tasks:**"] for t in tasks: status = "✅" if t["done"] else "⬜" lines.append(f" {status} `[{t['id']}]` {t['text']}") print("\n".join(lines)) def cmd_complete(task_id): tasks = load_tasks() task = next((t for t in tasks if t["id"] == int(task_id)), None) if not task: print(f"❌ Task #{task_id} not found.") return task["done"] = True save_tasks(tasks) # Remove completed task tasks = [t for t in tasks if not (t["id"] == int(task_id))] save_tasks(tasks) print(f"✅ Task #{task_id} completed and removed: {task['text']}") def cmd_delete(task_id): tasks = load_tasks() task = next((t for t in tasks if t["id"] == int(task_id)), None) if not task: print(f"❌ Task #{task_id} not found.") return tasks = [t for t in tasks if t["id"] != int(task_id)] save_tasks(tasks) print(f"🗑️ Task #{task_id} deleted: {task['text']}") ``` ### Technical Analysis All commands read from and write to the same `tasks.json` file ...[truncated 1556 chars]- Remediation
View remediation
