blob: 1444af03248da6948a212f2c14acf5779a3d8563 [file] [log] [blame] [view] [edit]
# Security
At the moment, rust-analyzer assumes that all code is trusted. Here is a
**non-exhaustive** list of ways to make rust-analyzer execute arbitrary
code:
- proc macros and build scripts are executed by default
- `.cargo/config` can override `rustc` with an arbitrary executable
- `rust-toolchain.toml` can override `rustc` with an arbitrary
executable
- VS Code plugin reads configuration from project directory, and that
can be used to override paths to various executables, like `rustfmt`
or `rust-analyzer` itself.
- rust-analyzers syntax trees library uses a lot of `unsafe` and
hasnt been properly audited for memory safety.