🛡️ ShieldMyRepo
Scan any GitHub repo for security nightmares in 30 seconds.
Features • Quick Start • Scanners • Report Card • Badge • Contributing
🤔 What is ShieldMyRepo?
ShieldMyRepo is an open-source CLI tool that scans any code repository for security vulnerabilities, misconfigurations, and leaked secrets — then gives it a security grade from A to F with a shareable badge for your README.
Think of it as a security health check for your codebase.
$ shieldmyrepo scan .
🛡️ ShieldMyRepo — Security Report Card
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 Overall Grade: B
┌─────────────────────────┬────────┬──────────┐
│ Scanner │ Status │ Findings │
├─────────────────────────┼────────┼──────────┤
│ 🔑 Secret Detection │ ✅ PASS │ 0 │
│ 📦 Dependencies │ ⚠️ WARN │ 3 │
│ ⚙️ GitHub Actions │ ✅ PASS │ 0 │
│ 🐳 Dockerfile │ ❌ FAIL │ 2 │
│ 📄 Gitignore │ ⚠️ WARN │ 1 │
└─────────────────────────┴────────┴──────────┘
📋 Details: reports/shieldmyrepo-report.json
🏷️ Badge: reports/shieldmyrepo-badge.svg
✨ Features
- 🔑 Secret Detection — Finds leaked API keys, tokens, passwords, and private keys in your code
- 📦 Dependency Scanning — Checks
package.json,requirements.txt,Cargo.toml,go.modfor known vulnerabilities - ⚙️ GitHub Actions Audit — Detects insecure workflow configurations and supply chain risks
- 🐳 Dockerfile Security — Flags running as root, unpinned base images, secrets in build args
- 📄 Gitignore Check — Ensures sensitive files aren't being committed
- 📊 A-F Grade Report Card — Beautiful terminal output with actionable recommendations
- 🏷️ Shareable Badge — Generate an SVG badge to show your repo's security grade in your README
- 🔌 Plugin Architecture — Easy to add new scanners (great for contributors!)
🚀 Quick Start
Installation
# Clone the repository
git clone https://github.com/DhanushNehru/ShieldMyRepo.git
cd ShieldMyRepo
# Install in development mode
pip install -e .
Usage
# Scan the current directory
shieldmyrepo scan .
# Scan a specific path
shieldmyrepo scan /path/to/your/project
# Scan and generate a badge
shieldmyrepo scan . --badge
# Output report as JSON
shieldmyrepo scan . --format json
# Run only specific scanners
shieldmyrepo scan . --scanners secrets,dockerfile
🔍 Scanners
ShieldMyRepo uses a modular plugin architecture. Each scanner is a self-contained Python module that can be easily added or modified.
| Scanner | Description | File |
|---|---|---|
| 🔑 Secrets | Detects leaked API keys, tokens, and passwords | scanners/secrets.py |
| 📦 Dependencies | Checks package files for known vulnerabilities | scanners/dependencies.py |
| ⚙️ GitHub Actions | Audits workflow security configurations | scanners/github_actions.py |
| 🐳 Dockerfile | Analyzes Docker security best practices | scanners/dockerfile.py |
| 📄 Gitignore | Validates gitignore coverage | scanners/gitignore.py |
Want to add a new scanner?
Check out our Contributing Guide — adding a scanner is one of the easiest ways to contribute! Each scanner is a single Python file that follows a simple interface.
📊 Report Card
ShieldMyRepo generates a beautiful report card with:
- Overall Grade (A-F) based on weighted scanner results
- Per-scanner status (PASS / WARN / FAIL)
- Finding count with severity levels
- Actionable recommendations for each finding
- JSON export for CI/CD integration
Grading Scale
| Grade | Score Range | Description |
|---|---|---|
| A | 90-100 | Excellent — minimal security concerns |
| B | 80-89 | Good — a few minor issues |
| C | 70-79 | Fair — some issues need attention |
| D | 60-69 | Poor — significant security gaps |
| F | 0-59 | Critical — immediate action required |
🏷️ Badge
Add a security grade badge to your project's README:

Run shieldmyrepo scan . --badge to generate an SVG badge in the reports/ directory.
🛠️ Tech Stack
- Python 3.8+ — Core CLI and scanner engine
- Click — CLI framework
- Rich — Beautiful terminal output
- PyYAML — YAML parsing for workflows and configs
🤝 Contributing
We love contributions! ShieldMyRepo is designed to be contributor-friendly:
- 🟢 Easy: Add a new secret detection pattern
- 🟡 Medium: Build a new scanner module
- 🔴 Hard: Improve the grading algorithm
Check out our Contributing Guide to get started. Look for issues tagged with good first issue or help wanted.
Contributors
📄 License
This project is licensed under the MIT License — see the LICENSE file for details.
⭐ Star History
If you find ShieldMyRepo useful, please consider giving it a star! It helps others discover the project.
Made with ❤️ by Dhanush Nehru
Metadata
Release files for shieldmyrepo 0.1.0
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 |
|---|---|---|---|---|
| shieldmyrepo-0.1.0.tar.gz | 21.3 kB | Without provenance | Details for shieldmyrepo-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| shieldmyrepo-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for shieldmyrepo-0.1.0-py3-none-any.whl |
Total release size: 45.6 kB
Release files / shieldmyrepo-0.1.0.tar.gz
| Download URL | shieldmyrepo-0.1.0.tar.gz |
|---|---|
| Size | 21.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6c332a2856cb54c5146dfffe27455aa8d9696eb8db68b75230f51ab8ec8d6b98
|
|
BLAKE2b-256 checksum How to use checksums |
cc7f4f9dab8db396e692eaa2027233ce27f4bdf5149f6b17be5dae2dfd5b6ead
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.1
|
Release files / shieldmyrepo-0.1.0-py3-none-any.whl
| Download URL | shieldmyrepo-0.1.0-py3-none-any.whl |
|---|---|
| Size | 24.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e70b28f67d4038bd34ddde9b7d3ff6488b1d5435425112d0bd4ffb226092ee1b
|
|
BLAKE2b-256 checksum How to use checksums |
145e2f83764643a9c79dea5627acf5f1f6692e85f9188746bd7ba8d0e9493c87
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.1
|
Security for shieldmyrepo 0.1.0
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.