Go Module Dependency Health Checker - A powerful CLI tool that analyzes your Go project's dependencies for security vulnerabilities, outdated versions, and license compliance using real-time data from the OSV database.
- π Real Vulnerability Scanning - Uses the OSV (Open Source Vulnerability) database API - the same database GitHub Dependabot uses
- π¦ Version Update Detection - Identifies outdated packages with severity levels (major/minor/patch)
- π License Detection - Automatically detects common open source licenses
- β‘ Concurrent Analysis - Fast parallel processing with goroutines
- π¨ Beautiful Output - Colored terminal output with progress bars
- π― Health Scoring - Overall dependency health score (0-100)
- π― Real CVE Detection - Finds actual CVEs like CVE-2020-26160, CVE-2020-14040, etc.
When you run go-flush on a vulnerable project, it detects REAL CVEs:
π¨ Security Issues Found: 3
β’ github.com/dgrijalva/jwt-go v3.2.0 - CVE-2020-26160
Fix: upgrade to latest version
β’ golang.org/x/text v0.3.0 - CVE-2020-14040
Fix: upgrade to latest version
CVE-2020-26160 is an authentication bypass vulnerability that affected thousands of production systems!
# Clone the repository
git clone https://github.com/DesmondSanctity/go-flush.git
cd go-flush
# Build the binary
go build -o go-flush main.go
# Optional: Install globally
go installgo install github.com/DesmondSanctity/go-flush@latest# Run in current directory (scans ./go.mod)
./go-flush
# Or if installed globally
go-flush# Scan a different directory
go-flush -path /path/to/project
# Output as JSON (for CI/CD integration)
go-flush -json
# Filter by vulnerability severity
go-flush -severity high
# Fail with exit code 1 if vulnerabilities found (CI/CD)
go-flush -fail-on-vuln
# Verbose output with detailed information
go-flush -verboseπ¦ Go Dependency Health Checker
ββββββββββββββββββββββββββββββββββββββββββββββββββ
π Found 15 dependencies
Analyzing 100% [ββββββββββββββββββββββββββββββββ] (15/15)
β
No security vulnerabilities found
π Outdated Packages: 3
β’ github.com/gin-gonic/gin: v1.9.0 β v1.9.1 [patch]
β’ github.com/spf13/cobra: v1.7.0 β v1.8.0 [minor]
β’ golang.org/x/sys: v0.10.0 β v0.15.0 [minor]
π License Summary:
β’ MIT: 8 packages
β’ BSD-3-Clause: 5 packages
β’ Apache-2.0: 2 packages
Health Score: 85/100
π Some updates recommended
We provide test data to demonstrate the tool's vulnerability detection:
# Test on the vulnerable sample project
go-flush -path testdata/vulnerable-project
# Expected: Will find CVE-2020-26160 and other real CVEsThis tool is designed to be impressive in a 30-minute live coding session:
- Start Strong: Show the final result finding real CVEs
- Build Momentum: Walk through the code structure
- The Wow Moment: Demonstrate OSV API integration
- Finish Strong: Run on a real vulnerable project
- Parse go.mod - Extracts direct dependencies
- Concurrent Analysis - Processes up to 5 dependencies in parallel
- Version Checking - Uses
go list -m -json pkg@latest - Vulnerability Scanning - Queries OSV API for each package/version
- License Detection - Pattern matching against known licenses
- Health Scoring - Calculates overall project health
POST https://api.osv.dev/v1/query
{
"package": {
"name": "github.com/dgrijalva/jwt-go",
"ecosystem": "Go"
},
"version": "v3.2.0"
}
Returns real CVEs with IDs, descriptions, severity levels, and fix recommendations.
Base Score: 100
- Vulnerabilities: -20 points each
- Outdated packages: -5 points each
90-100: π Excellent
70-89: π Good (some updates recommended)
0-69: β οΈ Needs attention
This project maintains high code quality standards with multiple linters:
# Format code
make fmt
# Run all linters
make lint
# Run specific linters
make vet # go vet
make staticcheck # staticcheck
make golangci-lint # golangci-lint
# Build
make build
# Run tests
make test- go fmt - Code formatting
- go vet - Suspicious constructs
- staticcheck - Advanced static analysis
- golangci-lint - Comprehensive linting (30+ linters)
- errcheck, gosimple, ineffassign, unused
- revive, misspell, gosec, goconst
- gocyclo, gocognit, dupl, and more
See .golangci.yml for full configuration.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Run linters:
make lint - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
All PRs must pass linting and tests.
This project is licensed under the MIT License - see the LICENSE file for details.
- OSV.dev - For the amazing vulnerability database API
- golang.org/x/mod - For go.mod parsing
- fatih/color - For beautiful colored output
- schollz/progressbar - For progress bars
- Security Audits - Regular dependency scanning
- CI/CD Integration - Automated vulnerability detection
- Live Demos - Show real security scanning capabilities
- Learning Tool - Understand Go module security
- Project Health Checks - Regular maintenance scanning
0- Success (no vulnerabilities or when not using-fail-on-vuln)1- Error or vulnerabilities found (when using-fail-on-vuln)
Found a bug? Have a feature request? Please open an issue.
Built with β€οΈ for the Go community
Detecting real vulnerabilities, protecting real projects π‘οΈ