Skip to content

DhanushNehru/ShieldMyRepo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

13 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

ShieldMyRepo Logo

πŸ›‘οΈ ShieldMyRepo

Scan any GitHub repo for security nightmares in 30 seconds.

Forks Issues License CI

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.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