Production-grade secrets verifier for bot platforms
Project description
vault-check 🔒
Production-grade secrets verifier and health check utility. Ensures your environment variables, API keys, and credentials are valid, secure, and ready for production.
🚀 Quick Start
Prerequisites
- Python 3.11+
pip
Installation
One command to rule them all:
pip install vault-check
For the full suite (AWS, Databases, Security):
pip install "vault-check[db,aws,security]"
Usage Example
Run a quick dry-run check to validate formats and entropy without live network probes:
vault-check --dry-run
Or run the full suite with a dashboard:
vault-check --dashboard --dashboard-port 8080 --output-json ./reports/latest.json
✨ Key Features
- Multi-Source Loading: Seamlessly fetch secrets from
.env, Doppler, AWS SSM, or HashiCorp Vault. - Comprehensive Verifiers: Out-of-the-box checks for Database URLs, Redis, JWT secrets, Telegram Bots, Razorpay, Google OAuth, and more.
- God Level Security Checks:
- Entropy Analysis: Uses
zxcvbnto ensure your keys aren't weak (e.g., "password123"). - Live Probes: Actually connects to DBs and APIs (e.g.,
SELECT 1,/getMe) to verify credentials work.
- Entropy Analysis: Uses
- Web Dashboard: Visualize your reports with a built-in web interface.
- CI/CD Ready: JSON outputs, exit codes, and email alerts make it perfect for pipelines.
⚙️ Configuration & Advanced Usage
Environment Variables
Vault Check looks for a .env file by default (or fetching from Doppler/AWS). The verifier suite automatically detects and validates the following secret keys if they are present:
| Key | Verifier | Notes |
|---|---|---|
*_DB_URL |
DatabaseVerifier |
Validates Postgres/SQLite connection strings. |
*_REDIS_URL |
RedisVerifier |
Checks Redis connection and PING command. |
SESSION_ENCRYPTION_KEY |
SessionKeyVerifier |
God Level: Fernet key with zxcvbn entropy check (score >= 3). |
JWT_SECRET |
JWTSecretVerifier |
Checks for a high-entropy secret (>= 32 chars). |
JWT_EXPIRATION_MINUTES |
JWTExpirationVerifier |
Ensures the expiration time is a valid integer. |
API_ID / API_HASH |
TelegramAPIVerifier |
Validates Telegram MTProto API credentials. |
*_BOT_TOKEN |
TelegramBotVerifier |
God Level: Performs a live /getMe probe to the Telegram Bot API. |
OWNER_TELEGRAM_ID / ADMIN_USER_IDS |
TelegramIDVerifier |
Checks for valid Telegram user/chat IDs. |
ACCOUNTS_API_KEY |
AccountsAPIVerifier |
Validates the Accounts API key format. |
BASE_WEBHOOK_URL |
WebhookVerifier |
Ensures the URL is valid and reachable. |
RAZORPAY_KEY_ID |
RazorpayVerifier |
Verifies Razorpay credentials via a live API call. |
GOOGLE_CLIENT_ID |
GoogleOAuthVerifier |
Checks the structure of Google OAuth credentials. |
CLI Arguments
| Argument | Type | Default | Description |
|---|---|---|---|
--env-file |
string |
.env |
Path to the environment file. |
--doppler-project |
string |
bot-platform |
Doppler Project Name. |
--doppler-config |
string |
dev_bot-platform |
Doppler Config Name. |
--aws-ssm-prefix |
string |
None |
AWS SSM parameter prefix to load secrets from. |
--vault-addr |
env var |
None |
HashiCorp Vault Address (via VAULT_ADDR). |
--vault-token |
env var |
None |
HashiCorp Vault Token (via VAULT_TOKEN). |
--log-level |
choice |
INFO |
Logging level (DEBUG, INFO, WARNING, ERROR). |
--log-format |
choice |
text |
Log format (text, json). |
--color |
bool |
False |
Enable colorized output. |
--concurrency |
int |
5 |
Number of concurrent verifiers. |
--http-timeout |
float |
12.0 |
Timeout for HTTP requests (seconds). |
--db-timeout |
float |
10.0 |
Timeout for Database connections (seconds). |
--overall-timeout |
float |
60.0 |
Global execution timeout (seconds). |
--retries |
int |
3 |
Number of retries for failed checks. |
--dry-run |
bool |
False |
Validate formats only; skip network calls. |
--skip-live |
bool |
False |
Fetch secrets but skip live connectivity probes. |
--output-json |
string |
None |
Path to save the report as JSON. |
--email-alert |
list |
None |
Send email alert on failure (SMTP_SERVER FROM TO PASS). |
--verifiers |
list |
None |
Space-separated list of specific verifiers to run. |
--dashboard |
bool |
False |
Start the web dashboard for viewing reports. |
--dashboard-port |
int |
8000 |
Port for the dashboard. |
--reports-dir |
string |
. |
Directory to serve reports from. |
--version |
bool |
False |
Show version and exit. |
project_path |
string |
None |
Optional path to project directory. |
🏗️ Architecture
The project follows a modular, asynchronous architecture designed for speed and extensibility.
src/vault_check/
├── cli.py # Entry point & Argument Parsing
├── runner.py # Core Async Engine & Verifier Orchestration
├── secrets.py # Secret Fetching (Env, Doppler, AWS)
├── dashboard.py # Web Dashboard Application (aiohttp)
├── verifiers/ # Plugin-based Verification Modules
│ ├── base.py # Base Class for all Verifiers
│ ├── database.py # DB Connection Checks
│ ├── s3.py # AWS S3 Checks
│ └── ...
└── ...
Logic Flow:
- CLI parses arguments and initializes configuration.
- Secrets Loader aggregates variables from
.env, Doppler, or AWS. - Runner identifies relevant
verifiersbased on available keys. - Verifiers execute concurrently (asyncio), performing syntax checks (dry-run) or live probes.
- Output is rendered to console (Rich), JSON file, or the Web Dashboard.
🗺️ Roadmap
- Core Verification Engine (Async, Retries, Timeouts)
- Multi-Source Secrets (Dotenv, Doppler, AWS SSM)
- Web Dashboard (View JSON reports in browser)
- God Level Verifiers (Telegram Bot, Database, Redis, JWT, S3, SMTP)
- Plugin System (Load external verifiers dynamically) - Partially implemented
- Kubernetes Operator (Continuous in-cluster monitoring)
🤝 Contributing & License
We welcome contributions! Please see CONTRIBUTING.md (if available) or standard GitHub flow.
- Fork the repository.
- Create a feature branch.
- Commit your changes.
- Push to the branch.
- Open a Pull Request.
License: MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vault_check-6.0.0.tar.gz.
File metadata
- Download URL: vault_check-6.0.0.tar.gz
- Upload date:
- Size: 34.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa715470602e11c3e0c9b590e186d24fee49cf1034ad3c48b5b9ba8018299968
|
|
| MD5 |
95614eedbd880e5275b16c6b06667b13
|
|
| BLAKE2b-256 |
3066cfa28ce9ee8a4d6a1f75fab6b0175c7252a614ecfd2ff3d633fe3f0896bf
|
Provenance
The following attestation bundles were made for vault_check-6.0.0.tar.gz:
Publisher:
publish.yml on dhruv13x/vault-check
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vault_check-6.0.0.tar.gz -
Subject digest:
fa715470602e11c3e0c9b590e186d24fee49cf1034ad3c48b5b9ba8018299968 - Sigstore transparency entry: 747637230
- Sigstore integration time:
-
Permalink:
dhruv13x/vault-check@6b09e264c4c63309a4e760f93a539360ae0322bf -
Branch / Tag:
refs/tags/v6.0.0 - Owner: https://github.com/dhruv13x
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6b09e264c4c63309a4e760f93a539360ae0322bf -
Trigger Event:
push
-
Statement type:
File details
Details for the file vault_check-6.0.0-py3-none-any.whl.
File metadata
- Download URL: vault_check-6.0.0-py3-none-any.whl
- Upload date:
- Size: 39.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd84c4a49ea6b2cf818b4d51372845f9fefb747dd32ca74c336aa17d837d965a
|
|
| MD5 |
b421bb0dfc3b2fbd64559215b85b9aad
|
|
| BLAKE2b-256 |
4ac3c76e90193b83056480efa8d78393f28effb3b1946a7e5b3d25ecd452e8fa
|
Provenance
The following attestation bundles were made for vault_check-6.0.0-py3-none-any.whl:
Publisher:
publish.yml on dhruv13x/vault-check
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vault_check-6.0.0-py3-none-any.whl -
Subject digest:
fd84c4a49ea6b2cf818b4d51372845f9fefb747dd32ca74c336aa17d837d965a - Sigstore transparency entry: 747637232
- Sigstore integration time:
-
Permalink:
dhruv13x/vault-check@6b09e264c4c63309a4e760f93a539360ae0322bf -
Branch / Tag:
refs/tags/v6.0.0 - Owner: https://github.com/dhruv13x
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6b09e264c4c63309a4e760f93a539360ae0322bf -
Trigger Event:
push
-
Statement type: