Skip to main content

ShieldMyRepo Logo

🛡️ ShieldMyRepo

Scan any GitHub repo for security nightmares in 30 seconds.

Stars Forks Issues License CI

FeaturesQuick StartScannersReport CardBadgeContributing


🤔 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.mod for 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:

![ShieldMyRepo Grade](path/to/shieldmyrepo-badge.svg)

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.

Star History Chart


Made with ❤️ by Dhanush Nehru

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

shieldmyrepo-0.1.0.tar.gz (21.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

shieldmyrepo-0.1.0-py3-none-any.whl (24.2 kB view details)

Uploaded Python 3

File details

Details for the file shieldmyrepo-0.1.0.tar.gz.

File metadata

  • Download URL: shieldmyrepo-0.1.0.tar.gz
  • Upload date:
  • Size: 21.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.1

File hashes

Hashes for shieldmyrepo-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6c332a2856cb54c5146dfffe27455aa8d9696eb8db68b75230f51ab8ec8d6b98
MD5 c9d50808349f1d8ef18c33d6b8be07d3
BLAKE2b-256 cc7f4f9dab8db396e692eaa2027233ce27f4bdf5149f6b17be5dae2dfd5b6ead

See more details on using hashes here.

File details

Details for the file shieldmyrepo-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: shieldmyrepo-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 24.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.1

File hashes

Hashes for shieldmyrepo-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e70b28f67d4038bd34ddde9b7d3ff6488b1d5435425112d0bd4ffb226092ee1b
MD5 1e49cec80cba30942be6695263e8fa5e
BLAKE2b-256 145e2f83764643a9c79dea5627acf5f1f6692e85f9188746bd7ba8d0e9493c87

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page