Mimosa adds local-first code-security guardrails to ZCode. It checks candidate edits before they are written, reviews changes at the end of a turn, guards Git commit/push commands, and provides an optional MCP server for explicit sealed repository scans.
This package is a pure Node.js build with no native executables. It is intended for current ZCode releases on macOS, Linux, and Windows, and requires node to be available in PATH. No separate model API key is required for the local hooks or native scan engine.
The vendor payload is stored unchanged under payload/. Its Ed25519-signed inventory is verified before protected code is loaded; the outer directory only supplies ZCode-standard manifests and cross-platform process hook definitions and a stdout transport adapter.
PreToolUseandPostToolUsechecks for file edits and shell commands.UserPromptSubmit,SessionStart, andStoplifecycle hooks./mimosa-scan,/mimosa-status, and/mimosa-deep-auditcommands.- The
mimosa-security-scanskill for explicit deep security reviews. - A
mimosastdio MCP server for explicit sealed repository scans. The plugin does not override the host's activation state.
Open Settings → Plugins, search for Code Security Protection, and install mimosa from the official marketplace. For local verification, add the zcode-plugins repository root as a local marketplace, then install mimosa from that source.
Start a new task after installing, enabling, disabling, or changing plugin options because ZCode snapshots hooks and MCP configuration at task startup.
- Run
/mimosa-statusto inspect the current project's latest Mimosa state. - Ask ZCode to create an intentionally unsafe SQL or command-execution snippet in a disposable project. The pre-write hook should reject a confirmed high-risk candidate and return remediation context.
- Confirm that the
mimosaMCP server is active in ZCode, start a new task, and run/mimosa-deep-auditfor an explicit sealed scan.
Hook checks, end-of-turn review, and Git gates do not depend on invoking an MCP deep scan.
The bundled native engine works without Semgrep. To explicitly install the pinned Semgrep CE runtime into Mimosa's user data directory, run:
node payload/dist/cli.js semgrep install --accept-licenseThis optional installation accesses the network, does not use sudo, and does not modify the system Python installation.
engine: static engine for the optional MCP server. The default isnative.MIMOSA_HOOK_FAILURE_MODE=open|strict: controls edit-hook infrastructure failure behavior.MIMOSA_GIT_GATE_FAILURE_MODE=open|strict: controls Git-gate infrastructure failure behavior.MIMOSA_HOOK_STATUS=quiet|important|all: controls hook status output.MIMOSA_HOOK_PROJECT=1: enables non-blocking cross-file warnings.
The plugin writes project-relative state under .mimosa/ and persistent scan history outside the project under the user's Mimosa data directory. It does not write runtime data back into the installed plugin directory.
Hooks execute local code with the user's permissions. Review third-party plugins before enabling them. A completed static scan is evidence for the scanned scope, not a guarantee that a project is vulnerability-free; partial coverage must be reported as inconclusive.
MIT. See LICENSE.
Hook commands now run through a small Node.js transport adapter. The unchanged signed vendor payload writes its decision to a private temporary file; the adapter waits for the complete JSON to reach the host pipe before exiting. This prevents immediate process exit from dropping a security decision under stdout backpressure. Adapter failures block PreToolUse instead of reporting a successful empty result. Temporary output files are removed after each run. Start a new ZCode task after upgrading so the new hook entry points take effect.