feat(logging): mask sensetive data in log output
test / test (push) Successful in 2m0s

This commit is contained in:
2026-10-04 16:29:08 +03:00
parent b459eef34b
commit 549979ced6
5 changed files with 26 additions and 3 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ from .entry import Entry
class EmptyEntry(Entry):
def __init__(self):
super().__init__([], Path(), Path())
super().__init__([], {}, Path(), Path())
def __bool__(self):
return False
+9
View File
@@ -3,6 +3,7 @@ from pathlib import Path
from typing import NamedTuple, Self
from ..common.command import CommandExecutor
from ..preset.model import Variables
logger = logging.getLogger("entry")
@@ -57,13 +58,21 @@ class Entry:
def __init__(
self,
tasks: list[Task],
variables: Variables,
basepath: Path,
rootpath: Path,
):
self._tasks = tasks
self._variables = variables
self._basepath = basepath
self._roopath = rootpath
@property
def sensentive_data(self):
for k, v in self._variables.items():
if "pass" in k.lower():
yield v
def show(self):
self._logger.info("🔵 %s", self)
level = logging.root.level