Commit 8943d08
committed
Move crawl_n_mask to regexp based logic
We're moving crawl_n_mask to regexp based logic which is able
to mask any type of file (json, yaml, txt, log).
Regexps search for exact words for avoiding false positives (We don't
want to maske SecretName when searching for Secret keyword. This is
the reason of increase PROTECT_KEYS impacts positive in the performance.
New version also capable to mask two secrets in the same log line.
Avoiding masking Ansible headers such Task and Play.
Added multiprocessing support for parallel file masking.
Added file masking integration tests, with temporary files.
RFE: Necessary to maintain same format from intput and output, check test case:
"mysql_root_password=MyPassword",
"mysql_root_password = My**********rd",
AI-Assisted: This change was developed with assistance from Claude
(Anthropic's AI assistant) for code refactoring, test development,
and PEP 8 compliance."1 parent 8ca944b commit 8943d08
File tree
3 files changed
+498
-160
lines changed- plugins/modules
- roles/artifacts/tasks
- tests/unit/modules
3 files changed
+498
-160
lines changed
0 commit comments