Trust
A bot is a script. On the page, each bot runs in a Web Worker of its own, so a slow or broken bot cannot stall or crash the game, and that is the only separation there is: the bot has a worker's privileges, can use the network, and nothing stops it from sending what it is shown somewhere else. Adding a bot from a file is the same decision as running any other script from whoever gave it to you; the page says so where a bot is added. The command line runs a bot inside its own Node.js process, with Node's privileges: your files and your network.
A built BWAPI bot is WebAssembly. On the page it runs as part of the page, with the page's
access to this browser, and it cannot start threads or open connections of its own. Add
only a .scmbot file you built or trust.
The game's whole state is in the page, so the rule that a bot sees only what its player would see is a rule of the interface, kept by BWAPI, and not a security boundary.