Tripwires
Deliberately simple file change detection for rapid development cycles.
Tripwires tracks the effective content of specific files using fast non-cryptographic hashes for change detection, alerting you when they change unexpectedly. It simply asks: "Did this critical file change unexpectedly?"
Works with UTF-8 text files only - binary files are automatically excluded.
This is about governance, not security. Any developer with repository access can update both tracked files and the manifest. Tripwires simply adds a deliberate step to catch accidental or unexpected changes during development.
Ideal for catching unintended modifications during AI-assisted coding, refactoring sessions, or dependency updates.
Preserve your deliberate decisions. Catch the accidents.
When to use tripwires
✅ Useful when: Rapid iteration cycles, AI-assisted refactoring, protecting sensitive configuration files, team development with frequent changes, or catching accidental modifications during dependency updates.
⛔ Not useful when: Defending against malicious actors, working with frequently-changing binary assets, or in environments where the manifest itself isn't trusted or properly reviewed.
Installation
pip install tripwires
Simple Workflow
- 🎯 Have sensitive files you want to monitor? → Set tripwires to track them
- ⚙️ Set tripwires →
tripwires initand add your critical files - ✏️ File gets changed → Someone (or something) modifies monitored code
- 🚨 Tripwire triggers →
tripwires checkdetects the change and alerts you - ✅ Confirm changes are deliberate → Review, then
tripwires updateto reset monitoring - 🔄 Fully CI-friendly → Integrates seamlessly with any CI/CD pipeline
Commands
Tripwires has just three commands - that's it.
tripwires init
Initialize a new tripwires manifest file.
tripwires init # Create ./tripwires.yml
tripwires init --path /path/to/project # Create tripwires.yml in specified directory
tripwires init -p /path/to/project # Same as above (short form)
tripwires init --manifest custom.yml --force # Custom name, overwrite if exists
tripwires init -m custom.yml -f # Same as above (short form)
Important: Always commit your manifest file (e.g.,
tripwires.yml) to source control. The manifest contains the expected hashes that your team and CI/CD pipeline will validate against.
tripwires check
Check all files in the manifest against their expected hashes.
tripwires check # Use ./tripwires.yml
tripwires check --manifest path/to/manifest.yml
tripwires check -m path/to/manifest.yml # Same as above (short form)
Exit codes:
0- All files match their expected hashes1- Hash mismatches detected2- Configuration, decoding, or other errors
Output: By default, tripwires provides simple CLI-friendly messages with clear visual feedback. The output format can be customized via a simple output interface - see docs/OUTPUT.md for details.
Note for DevOps: Failed checks return non-zero exit codes, making tripwires compatible with any CI/CD tool that checks command exit status.
tripwires update
Recompute and update all file hashes in the manifest.
tripwires update # Use ./tripwires.yml
tripwires update --manifest path/to/manifest.yml
tripwires update -m path/to/manifest.yml # Same as above (short form)
CI/CD Integration
Tripwires integrates seamlessly with any CI/CD pipeline. Failed checks return non-zero exit codes, making them compatible with any tool that checks command exit status.
See docs/CI_INTEGRATION.md for a GitHub Actions example and setup details.
Manifest Structure
Tripwires supports flexible manifest structures to organize your tracked files:
# Simple flat structure
paths:
"src/auth.py": "abc123..."
"config/settings.py": "def456..."
# Or organized groups
groups:
core-logic:
description: "Core business logic"
paths:
"src/auth.py": "abc123..."
See docs/MANIFEST.md for detailed examples and best practices.
Features
- Cross-platform normalization - Consistent hashes across Linux/macOS/Windows
- Binary file detection - Automatically excludes binary files
- Pathlib integration - Robust path handling for all platforms
- Emoji-friendly output - Clear, visual feedback
- Extensible output - Easy to add new output formats
License
Apache 2.0 License - see LICENSE file for details.
Metadata
Release files for tripwires 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tripwires-0.1.1.tar.gz | 19.9 kB | Without provenance | Details for tripwires-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tripwires-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for tripwires-0.1.1-py3-none-any.whl |
Total release size: 41.0 kB
Release files / tripwires-0.1.1.tar.gz
| Download URL | tripwires-0.1.1.tar.gz |
|---|---|
| Size | 19.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9120c0d4ac2b0f4e5aee713bf9805b65ff72b6d518300dc23581b37f8d6d0363
|
|
BLAKE2b-256 checksum How to use checksums |
eeb04b948c3c8f639f7db8bc220bc80480e5e72ea81797d10d5e9c67c0c5cbe4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.10.19 Linux/6.11.0-1018-azure
|
Release files / tripwires-0.1.1-py3-none-any.whl
| Download URL | tripwires-0.1.1-py3-none-any.whl |
|---|---|
| Size | 21.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
49df5cb3d5874d0b77cae531d087829670ad0cf2dc242fb478f5f95084fb8374
|
|
BLAKE2b-256 checksum How to use checksums |
b88ccced41d9733f6d99200cd5c48c7e6f4df2b999d4f06a0805099915e3ae6f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.10.19 Linux/6.11.0-1018-azure
|
Security for tripwires 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.