From 5a4499891fccea0a8f48de97da25092ea5dbfccf Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 9 Apr 2026 04:49:59 +0000 Subject: [PATCH] security: Make redis dependency optional The redis crate was compiled unconditionally despite only being used behind #[cfg(feature = "redis")]. Making it optional reduces the default attack surface and binary size. Closes #100 https://claude.ai/code/session_013ESWXrnaeoc5M2agSVcKAj --- Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index f458e55..f9b528b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ log = "0.4" env_logger = { version = "0.11.8", optional = true } chrono = { version = "0.4", optional = true } clap = { version = "4.5.53", features = ["color", "derive", "help", "usage", "std", "env"] } -redis = { version = "0.25.4", features = [ "ahash", "aio", "tokio-comp" ] } +redis = { version = "0.25.4", features = [ "ahash", "aio", "tokio-comp" ], optional = true } sha2 = "0.10.9" [dev-dependencies] @@ -26,4 +26,4 @@ tower = "0.4" default = ["logging"] logging = ["dep:env_logger"] json-logging = ["dep:chrono", "logging"] -redis = [] +redis = ["dep:redis"]