Launching October 14, 2031
cfg-guard

cfg-guard

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

FreeCodeSecurity1 impressionslaunches Oct 141 comment

Comments

>log in to comment
  • A Meobius[maker]· 20h ago

    Hi! cfg-guard — A lock and a witness for config files too many hands edit:…. Open source, MIT. Source, docs and issue tracker: https://gitlab.com/ameobius-ai/cfg-guard. Feedback on the rule set is welcome.

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. Python, MIT licensed, standard library first. Source and docs: https://gitlab.com/ameobius-ai/cfg-guard

cfg-guard is a Python library that provides file-level locking and change-witnessing for configuration files using flock, content-hash compare-and-swap, and inotify.

for
Developers who need safe concurrent edits of config files in Python projects
pricing
open source
works withPython

Key features

6 features of cfg-guard
  • Flock-based lock — Uses OS file lock (flock) to prevent simultaneous writes.
  • Content-hash compare-and-swap — Refuses a write if the base file bytes have changed since read.
  • Inotify + /proc writer identification — Detects and reports the process that attempted an out-of-order write.
  • Standard-library only — No external dependencies; works with Python's stdlib.
  • Simple installation — Install via pip with a single command.
  • MIT licensed source — Open-source code hosted on GitLab.

Use cases

  • Prevent concurrent CI jobs from overwriting shared config files
  • Audit which process modified a configuration during deployment
  • Ensure config integrity when multiple developers edit the same file
  • Guard critical service configuration against accidental corruption

cfg-guard vs alternatives

cfg-guardTrivySnykGitea
Best forFile locking with change auditVulnerability and misconfiguration scanningStatic code security analysisSelf-hosted Git repositories
PricingOpen sourceFreeSubscriptionFree
DevHunt upvotes1000
LaunchedOct 2031———

cfg-guard FAQ

How do I install cfg-guard?+

Run pip install cfg-guard to add the library to your Python environment.

What kind of files does it protect?+

It is designed for configuration files that may be edited by multiple processes or users.

Does cfg-guard require any external services?+

No, it relies only on the Python standard library and OS primitives.

How does it identify the writer of a conflicting change?+

It uses inotify together with /proc to name the process that attempted to write around the lock.

Is the project open source?+

Yes, the code is MIT licensed and hosted on GitLab.

Summarized by DevHunt from ameobius-products.ameobius-lane.workers.dev · Oct 24, 2026. Details may change; check the official site.