From 85df969e82355fc441296e542afff7562b745529 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Tue, 31 Mar 2026 12:50:46 -0500 Subject: [PATCH] scrub genai API keys and onvif credentials from config endpoint --- frigate/api/app.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/frigate/api/app.py b/frigate/api/app.py index 0126e5d036..f3cc472a88 100644 --- a/frigate/api/app.py +++ b/frigate/api/app.py @@ -142,9 +142,20 @@ def config(request: Request): # remove the proxy secret config["proxy"].pop("auth_secret", None) + # remove genai api keys + for genai_name, genai_cfg in config.get("genai", {}).items(): + if isinstance(genai_cfg, dict): + genai_cfg.pop("api_key", None) + for camera_name, camera in request.app.frigate_config.cameras.items(): camera_dict = config["cameras"][camera_name] + # remove onvif credentials + onvif_dict = camera_dict.get("onvif", {}) + if onvif_dict: + onvif_dict.pop("user", None) + onvif_dict.pop("password", None) + # clean paths for input in camera_dict.get("ffmpeg", {}).get("inputs", []): input["path"] = clean_camera_user_pass(input["path"])