T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:4- Finding
Excessive Tool Permissions Violate Least-Privilege Requirements
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:4-9
Vulnerability Type: Excessive command-execution, filesystem-write, and cron permissions
Risk Level: MediumVulnerable Code:
yaml tools: - read - write - exec - cronTechnical Analysis
The Skill requests
write,exec, andcroncapabilities even though the reviewed implementation does not require all of them for its current in-memory scheduling behavior.In particular, recurring scheduling is only a placeholder in
lib/scheduler.py:119-126:python def schedule_task(self, description: str, cron: str, priority: TaskPriority = TaskPriority.MEDIUM, handler: Optional[Callable] = None) -> str: """Schedule a recurring task (placeholder for cron)""" # For now, just create immediate task # Full cron support would require a separate scheduler task = self.create_task(description, priority, handler) return task.idThis method ignores the supplied cron expression and immediately creates an in-memory task. No reviewed code imports a cron library, modifies a user or system crontab, registers a service, or establishes another cross-session startup mechanism.
The CLI daemon at
scripts/main.py:109-125also starts only an in-process worker:python async def cmd_daemon(args): """Run scheduler daemon""" scheduler = TaskScheduler(max_concurrency=args.concurrency) print(f"🚀 Starting Task Scheduler") print(f" Concurrency: {args.concurrency}") print(f" WebSocket port: {args.ws_port}") await scheduler.start() try: print("\n✅ Scheduler running. Press Ctrl+C to stop.") while True: await asyncio.sleep(1) except KeyboardInterrupt: print("\n🛑 Stopping scheduler...") await scheduler.stop() print("✅ Scheduler stopped")The
--ws-portvalue is pr ...[truncated 1603 chars]- Remediation
View remediation
Remediation Suggestions
- Remove
cronfrom the declared tools until genuine recurring scheduling is implemented and reviewed. - Remove
execif tasks can be limited to registered in-process Python handlers. - If command execution is required, use an explicit allowlist of executables and arguments rather than granting general shell access.
- Restrict writes to a dedicated application-state directory with restrictive filesystem permissions.
- Require explicit user approval before creating any future scheduled task or persistent service.
- Document why each requested tool is necessary and ensure host-side authorization is scoped per operation.
- Add tests that compare declared capabilities against capabilities exercised by the implementation.
- Remove
