fix(security): sanitize logs, redact secrets, harden XML parsing

Address actionable CodeQL security-extended findings and extend the same redaction to the debug JSONL logger
This commit is contained in:
imSp4rky
2026-06-09 19:08:41 -06:00
parent 2d43c2601e
commit 7064d261c2
11 changed files with 123 additions and 46 deletions
+6 -1
View File
@@ -862,11 +862,16 @@ class dl:
self.service_config = yaml.safe_load(service_config_path.read_text(encoding="utf8"))
self.log.info("Service Config loaded")
if self.debug_logger:
# log key names only -- the full config carries service certificates,
# device fingerprints and endpoints that bloat the log and may be sensitive
self.debug_logger.log(
level="DEBUG",
operation="load_service_config",
service=self.service,
context={"config_path": str(service_config_path), "config": self.service_config},
context={
"config_path": str(service_config_path),
"config_keys": sorted(self.service_config or []),
},
)
except KeyError:
pass