cfg-guard

A lock and a witness for config files too many hands edit: flock plus…

What it is

A lock and a witness for config files too many hands edit: flock plus a content-hash compare-and-swap refuse a write whose base bytes moved, and inotify with /proc names whoever writes around the lock. Stdlib only.

Замок и свидетель для конфигов, которые правят много рук: flock плюс compare-and-swap по хэшу содержимого не дают затереть чужую правку, а inotify и /proc называют того, кто пишет мимо замка. Только stdlib.

Install

pip install cfg-guard

Python. Standard library first: the tool reads the data you point it at and sends nothing anywhere.

Where it fits

Use it when the output has to hold up to parsing or review, not when the voice is the point. Every rule can produce a false positive, so treat the findings as candidates for a rewrite.

Repository

https://gitlab.com/ameobius-ai/cfg-guard — source, issue tracker and documentation.

Other projects by the same author: ameobius-ai.gitlab.io.

Live product: https://gitlab.com/ameobius-ai/cfg-guard.