Open Interpreter is working on providing an experimental safety toolkit to help you feel more confident running the code generated by Open Interpreter.
Install Open Interpreter with the safety toolkit dependencies as part of the bundle:
pip install open-interpreter[safe]
Alternatively, you can install the safety toolkit dependencies separately in your virtual environment:
pip install semgrep
- No Auto Run: Safe mode disables the ability to automatically execute code
- Code Scanning: Scan generated code for vulnerabilities with
semgrep
You can enable safe mode by passing the --safe
flag when invoking interpreter
or by configuring safe_mode
in your config file.
The safe mode setting has three options:
off
: disables the safety toolkit (default)ask
: prompts you to confirm that you want to scan codeauto
: automatically scans code
model: gpt-4
temperature: 0
debug_mode: false
safe_mode: ask
Some upcoming features that enable even more safety:
You can adjust the system_message
in your config file to include instructions for the model to scan packages with guarddog
before installing them.
model: gpt-4
debug_mode: false
safe_mode: ask
system_message: |
# normal system message here
BEFORE INSTALLING ANY PACKAGES WITH pip OR npm YOU MUST SCAN THEM WITH `guarddog` FIRST. Run `guarddog pypi scan $package` for pip packages and `guarddog npm scan $package` for npm packages. `guarddog` only accepts one package name at a time.