mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-13 22:16:23 +00:00
Add/improve docs on security
This commit is contained in:
1 parent
774333befc
commit
1ec18595be
2 files changed
+12
-20
No files matched your search
@@ -0,0 +1,12 @@
|
||||
## Security Considerations
|
||||
|
||||
As fundamental abilities for a coding agent, Serena contains tools for executing shell commands and modifying files.
|
||||
Therefore, if the respective tool calls are not monitored or restricted (and execution takes place in a sensitive environment),
|
||||
there is a risk of unintended consequences.
|
||||
|
||||
Therefore, to reduce the risk of unintended consequences when using Serena, it is recommended to
|
||||
* back up your work regularly (e.g. use a version control system like Git),
|
||||
* monitor tool executions carefully (e.g. via your MCP client, provided that it supports it),
|
||||
* consider enabling read-only mode for your project (set `read_only: True` in project.yml) if you only want to analyze code without modifying it,
|
||||
* restrict the set of allowed tools via the [configuration](050_configuration),
|
||||
* use a sandboxed environment for running Serena (e.g. by [using Docker](020_running.md#using-docker-experimental)).
|
||||
@@ -10,26 +10,6 @@ The use of all tools is generally recommended, as this allows Serena to provide
|
||||
Only by executing shell commands (in particular, tests) can Serena identify and correct mistakes
|
||||
autonomously.
|
||||
|
||||
#### Shell Execution and Editing Tools
|
||||
|
||||
Many clients have their own shell execution tool, and by default Serena's shell tool will be disabled in them
|
||||
(e.g., when using the `ide-assistant` or `codex` context). However, when using Serena through something like
|
||||
Claude Desktop or ChatGPT, it is recommended to enable Serena's `execute_shell_command` tool to allow
|
||||
agentic behavior.
|
||||
|
||||
It should be noted that the `execute_shell_command` tool allows for arbitrary code execution.
|
||||
When using Serena as an MCP Server, clients will typically ask the user for permission
|
||||
before executing a tool, so as long as the user inspects execution parameters beforehand,
|
||||
this should not be a problem.
|
||||
However, if you have concerns, you can choose to disable certain commands in your project's configuration file.
|
||||
If you only want to use Serena purely for analyzing code and suggesting implementations
|
||||
without modifying the codebase, you can enable read-only mode by setting `read_only: true` in your project configuration file.
|
||||
This will automatically disable all editing tools and prevent any modifications to your codebase while still
|
||||
allowing all analysis and exploration capabilities.
|
||||
|
||||
In general, be sure to back up your work and use a version control system in order to avoid
|
||||
losing any work.
|
||||
|
||||
### Prepare Your Project
|
||||
|
||||
#### Structure Your Codebase
|
||||
|
||||
Reference in new issue
Block a user