Repository navigation
Stabilization and bug-fix release.
Security
-
Secrets are encrypted at rest. Microsoft token caches, the Discord bot token and webhook URL, and login-plugin passwords are sealed with AES-256-GCM. The data key is kept by the desktop app's main process, protected by the OS keychain (Windows DPAPI through Electron
safeStorage), and handed to the backend over the existing process channel. -
Microsoft sign-in uses an in-memory token cache that persists only the sealed form, so token JSON is no longer written to disk in clear text.
-
Existing plaintext files (
*_live-cache.json,*_mca-cache.json,*_xbl-cache.json,discord-secrets.json,login-secrets.json) are encrypted on first start and the plaintext copies are overwritten and deleted. -
When encryption is not available (plain
npm run dev, or no OS keychain), the panel shows a warning banner instead of failing silently. -
The MCP bearer token is sealed the same way in
mcp-token.json.sealedand no longer stored inmcp.json. An existing token is moved on first start (the oldmcp.jsonis wiped and rewritten without it), so connected MCP clients keep working. -
The data folder is restricted to the current user (by SID) and SYSTEM on Windows. The ACL is set on the folder itself and inherited by everything inside, not applied file by file. It no longer skips this when
USERNAMEis empty. -
Recovery for files locked by the earlier per-file (
/T) ACL run: on every start the panel first resets the ACLs inside the data folder to inherit from it (icacls /reset /T), taking ownership first if the reset is refused, and only then hardens the folder. Manual recovery, run as the same Windows user with the panel closed:icacls "%APPDATA%\caya-bot-panel\data" /reset /T /C /Q
If that reports "Access is denied", take ownership first, then repeat the reset:
takeown /F "%APPDATA%\caya-bot-panel\data" /R /D Y
-
The REST API, Socket.IO and
/mcpcheck theHostandOriginheaders. Requests from other web pages (CSRF) and DNS-rebinding hosts are refused with 403. MCP clients and scripts that send noOriginkeep working. Extra host names can be allowed withCAYA_ALLOWED_HOSTS. -
Discord webhook calls, including Test webhook, only go to
https://discord.com/api/webhooks/…(ordiscordapp.com). Other URLs are rejected before any request and redirects are not followed.
Fixes
- Login-plugin passwords are stored exactly as typed. Leading and trailing spaces are no longer trimmed.
- Closing the Microsoft sign-in dialog, or letting the device code expire, now moves the bot to stopped with a clear message instead of leaving it in an error or connecting state.
- The 3D bot view checks free memory first and limits how many views run at once (1–3, by CPU count). A second tab on the same bot reuses the running view instead of restarting it. The view closes when the bot disconnects or reconnects, instead of staying attached to the old connection.
- Web panel review: see the 3.0.6 UI notes in the pull request (states, validation, secret fields, translations, layout, accessibility).
Packaging
- The Windows release ships only the Setup (NSIS) installer plus
SHA256SUMS.txt. The portable exe is no longer built. npm run test:packagingchecks the build config and that the viewer, Discord, canvas and headless GL modules are production dependencies, so they are copied into the installed app.
Tests
- New
npm run test:security: crypto round trip, tamper detection, migration of plaintext files, the encrypted token cache, untrimmed passwords, webhook URL rules, Host/Origin rules, the Windows ACL arguments and the viewer limits.