Skip to content

Improvement/security - #545

Open
zfoong wants to merge 94 commits into
V1.4.6from
improvement/security
Open

zfoong wants to merge 94 commits into
V1.4.6from
improvement/security

Conversation

@zfoong

@zfoong zfoong commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator

What and why?
Hardens CraftBot security through configuration. CraftBot reads email, web pages and chat, then acts with the user's shell, files and accounts, so one planted instruction could run commands, leak keys or message people. This adds an action gate, modelled on OpenClaw and Hermes Agent, that judges every action by what it declares it does. Some protections are always on: destructive commands are refused, outside content is marked as data, secrets are masked in logs, there is a tamper-evident audit log, and Discord owners are matched by user ID. Opt-in protections:

  • limiting what other people's messages and scheduled tasks can do;
  • reviewing risky commands;
  • keeping keys, credentials and .env files away from the agent's tools;
  • blocking private network addresses;
  • hiding secrets in tool results;
  • quarantining memory written from outside content;
  • scanning skills, MCP packages and downloads;
  • optional approval of risky actions.

The opt-in protections are off by default, so existing users keep today's behaviour and speed unless they raise the level. The branch also fixes the MCP tool-name code execution issue (#540).

…nt command, and serve the session token to browsers only.
…t Strict, confine their writes to the workspace.
…rs by unique username with a required mention at higher levels.
…d while keeping chats, memory and the audit log.
zfoong added 30 commits December 3, 2026 11:14
… that chat, so Strict stops asking before each edit.
…s order and fall back to the next checked address, so sites stop failing on networks without IPv6.
…ent not to reach a blocked address another way.
… Browser can reach a dev server or local device, and leave names only a configured proxy can resolve to that proxy.
…t to ask the user to add a server in Settings when mcp_config.json is protected.
…etadata again, refusing only requests a browser labels cross-site, and correct the docs that said local programs could not get it.
… temp folder, and name the Also allow writing in list when a write is refused.
…change to it is held back, tell the agent when its write is held back, and keep the user's own edits made outside CraftBot.
… write that would save a hidden value over the real one.
…uses a model on this computer or the local network, so cloud models get pages and messages unaltered.
… keys are kept out, and name the variables kept out when a command fails.
…, keeping Hermes' rules for what gets flagged.
…decision or cannot decide, instead of refusing it as if it had judged the command.
…ates, and editing shell startup files only when the run read outside content or was started by someone else.
…line two rules flag once, and treat sending an environment variable to an API as a warning.
…owners work, and log once when a listed owner matches no saved ID or only a display name.
…ed it, and that GitHub may be limiting requests, when a checksum cannot be looked up.
… out, and label it as acting only on new emails.
…check, on the MCP page, and to the agent when it looks for that server's actions.
… not on screen, and clear it once the card is seen or the request ends.
…tate when the chat is cleared or deleted, and a sub-agent's when it is released.
…ft out, so the agent does not read it as no matches.
…e file guard, so a protected file cannot be sent out through an integration.
…es it picks, since anything in the address reaches that site.
…s file tools, and disable it with a note when the scan blocks it.
…s asked for, so a plain read_settings stays short.
…CraftBot hides, so a redacted report or a log scrubber's test can be written.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant