MaunPrekshak — मौन प्रेक्षक
"The Silent Observer. Nothing hides from it."
MaunPrekshak (मौन = Silent, प्रेक्षक = Observer) is a fast, privacy-first Python security toolkit designed to catch vulnerabilities, exposed credentials, and insecure code patterns right in your terminal.
⚡ Highlights
- 🔍 Dependency Vulnerabilities (SCA): Real-time CVE discovery against OSV.dev for
requirements.txt,pyproject.toml, andPipfile. - 🔑 Secrets & Credential Detection: 40+ high-precision regex detectors for AWS keys, GCP keys, GitHub tokens, Stripe keys, RSA/SSH private keys, JWTs, and database URIs with false-positive suppression.
- 🛡️ Static Code Analysis (SAST): Python AST visitor checking for
eval(),exec(),pickle.loads(),subprocess(..., shell=True),yaml.load(), insecure hashing (MD5/SHA1), and command injection. - 🎨 Rich Terminal UX: Beautiful formatted console output, severity badges, and export to JSON or Markdown.
- 🔒 100% Privacy & Local-First: Scans run entirely on your local CPU. Your source code never leaves your computer.
- 🤖 Optional AI Remediation: Plug in your own Google Gemini API key to get an instant executive summary and tailored remediation steps.
🚀 Quick Start
Installation
pip install maunprekshak
🐧 Linux (1-Line Standalone Install — No Python Required)
curl -sSL https://raw.githubusercontent.com/PramanKasliwal/maunprekshak/main/install.sh | bash
🐍 Via PyPI (Any OS)
pip install maunprekshak
# or using pipx (recommended for Ubuntu 24.04+)
pipx install maunprekshak
Basic Scan
Scan the current directory:
mp scan .
Fast Scan without AI (No API Key Required)
mp scan . --no-ai
Export Results to JSON or Markdown
# Export as JSON for pipelines
mp scan ./my-project --output json > report.json
# Export formatted Markdown
mp scan ./my-project --output markdown > SECURITY.md
CI/CD Mode (Exit with Non-Zero on Threshold Breach)
# Fail CI build if any CRITICAL issue is found
mp scan . --ci --fail-on critical
# Fail CI build on HIGH or CRITICAL issues
mp scan . --ci --fail-on high
🖥️ Sample Console Output
╭──────────────────────────────────────────────────────────────────────────────╮
│ Risk Level: HIGH (Score: 78) │
╰──────────────────────────────────────────────────────────────────────────────╯
┌──────────────────────────────────────────────────────────────────────────────┐
│ Scan Summary │
├──────────────┬──────────┬─────────┬────────┬───────┬────────────────────────┤
│ Module │ CRITICAL │ HIGH │ MEDIUM │ LOW │ Total │
├──────────────┼──────────┼─────────┼────────┼───────┼────────────────────────┤
│ Dependencies │ 1 │ 2 │ 0 │ 0 │ 3 vulnerabilities │
│ Secrets │ 1 │ 1 │ 0 │ 0 │ 2 exposed credentials │
│ SAST │ 0 │ 3 │ 4 │ 1 │ 8 insecure patterns │
└──────────────┴──────────┴─────────┴────────┴───────┴────────────────────────┘
Top Findings:
[CRITICAL] CVE-2023-32681 — requests==2.25.1 (Fixed in 2.31.0)
[HIGH] AWS Access Key ID exposed in config.py:12
[HIGH] MP004: subprocess.run() called with shell=True in deploy.py:45
📖 CLI Command Reference
| Option | Default | Description |
|---|---|---|
path |
. |
Directory or project path to scan |
--only |
all |
Restrict scan to: deps, secrets, or sast |
--output |
console |
Output format: console, json, markdown |
--output-file |
stdout |
Write report directly to a file |
--ci |
false |
Compact machine-readable summary + exit code |
--fail-on |
critical |
Threshold: critical, high, medium, low |
--no-ai |
false |
Skip AI summary generation (instant execution) |
--exclude |
None |
Comma-separated directories to exclude |
🤖 Bringing Your Own Gemini AI Key (Optional)
If you'd like AI-generated remediation summaries, set your Gemini API key in your environment or a .env file:
export GEMINI_API_KEY="AIzaSy..."
mp scan .
Get a free API key at Google AI Studio.
🤝 Contributing
We welcome community contributions! Please read our CONTRIBUTING.md to get started.
- Found a bug or missing a secret pattern? Open an Issue.
- Want to contribute a new SAST check? PRs are warmly welcomed!
📄 License
Distributed under the MIT License. See LICENSE for details.
In ancient Sanskrit, मौन (Maun) signifies the all-knowing silence, and प्रेक्षक (Prekshak) is the ever-vigilant observer. MaunPrekshak protects your code quietly, thoroughly, and without compromise.
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 maunprekshak-0.1.0.tar.gz.
File metadata
- Download URL: maunprekshak-0.1.0.tar.gz
- Upload date:
- Size: 22.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b6f629cf3b3176d620cc05ec02b9316bb1ce73c3a30235fea50538edf261b20
|
|
| MD5 |
b2dc8c065f3fdda10813fb434181068b
|
|
| BLAKE2b-256 |
07b598b38453e99ee88596c7648b5a9b2cd729bb85ae7ced6152df590a9dae6f
|
File details
Details for the file maunprekshak-0.1.0-py3-none-any.whl.
File metadata
- Download URL: maunprekshak-0.1.0-py3-none-any.whl
- Upload date:
- Size: 19.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0291bb2519bc883861cc5f00acb1846937ac2a53e51b0a6ae411fee2f8213b50
|
|
| MD5 |
43cc46fff96c2d9fe315956647e53161
|
|
| BLAKE2b-256 |
244828f871f2eb6728961f336eb23beecdce85ce763039f43c844cd2a2a13428
|