Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'docs/book/src/security.md')
| -rw-r--r-- | docs/book/src/security.md | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/docs/book/src/security.md b/docs/book/src/security.md new file mode 100644 index 0000000000..1444af0324 --- /dev/null +++ b/docs/book/src/security.md @@ -0,0 +1,19 @@ +# 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-analyzer’s syntax trees library uses a lot of `unsafe` and + hasn’t been properly audited for memory safety.
\ No newline at end of file |