summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLinus Färnstrand <linus@mullvad.net>2024-03-28 14:29:44 +0100
committerLinus Färnstrand <linus@mullvad.net>2024-04-02 10:37:14 +0200
commitd406ab9fa087ae61c51972d51b592d0b9e458b1d (patch)
tree516b4316bf7f5a383ebe89363c9626f77be689e2
parentba779e988e7d48c5d7051e1eb59b77da195da1a6 (diff)
downloadmullvadvpn-d406ab9fa087ae61c51972d51b592d0b9e458b1d.tar.xz
mullvadvpn-d406ab9fa087ae61c51972d51b592d0b9e458b1d.zip
Deny non-ascii Rust identifiers
Prevents some cases of supply chain attacks where code is made to look like one thing, but does something else
-rw-r--r--Cargo.toml5
-rw-r--r--test/Cargo.toml5
2 files changed, 10 insertions, 0 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 6cc9f3c797..c79b3969ff 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -40,7 +40,12 @@ members = [
"tunnel-obfuscation",
]
+# Keep all lints in sync with `test/Cargo.toml`
[workspace.lints.rust]
+# Security
+non_ascii_idents = "forbid"
+
+# Modern, easy to read style and opinionated best practices
rust_2018_idioms = "deny"
[workspace.lints.clippy]
diff --git a/test/Cargo.toml b/test/Cargo.toml
index 4a3fe414ec..35c87980e9 100644
--- a/test/Cargo.toml
+++ b/test/Cargo.toml
@@ -15,7 +15,12 @@ members = [
"connection-checker",
]
+# Keep all lints in sync with `../Cargo.toml`
[workspace.lints.rust]
+# Security
+non_ascii_idents = "forbid"
+
+# Modern, easy to read style and opinionated best practices
rust_2018_idioms = "deny"
[workspace.lints.clippy]