Highlights
Auth Bypass: 15 prior fixes. Scrutinize any change in this area.
packages/koishi-core/src/command.ts: most-fixed (2 issues). Treat as high-risk during review.
10 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns
The bug types that recur here, drawn from past fixes, not open vulnerabilities.
Auth Bypass: User authority levels were bypassed entirely when authority was 0 due to unsafe truthiness evaluations instead of strict type checks. Developers must avoid loose truthiness comparisons on numeric authority values.
Auth Bypass: Asynchronous security hooks and authorization checks (such as '_checkUser') were not properly awaited in the execution lifecycle, allowing target command actions to complete execution before validation logic completed.
Sandbox Escape: VM sandbox escape allowed untrusted code execution outside the isolated execution context by failing to decontextify module namespaces before registering them as globals in the worker.