-
-
Notifications
You must be signed in to change notification settings - Fork 89
Simple Vulnerability Scanner
CarterPerez-dev edited this page Feb 11, 2026
·
1 revision
Go-based Python dependency security scanner that checks for outdated packages and known CVEs.
angela is a CLI tool that scans Python projects for outdated dependencies and known security vulnerabilities. It reads pyproject.toml or requirements.txt, checks PyPI for latest versions, queries OSV.dev for CVEs, and updates dependency files while preserving comments and formatting.
Status: Complete | Difficulty: Beginner
| Technology | Version | Purpose |
|---|---|---|
| Go | 1.24+ | Core language |
| Cobra | - | CLI framework |
| pelletier/go-toml | - | TOML parsing |
| PyPI Simple API | PEP 691 | Package metadata |
| OSV.dev API | - | Vulnerability database |
- Scan
pyproject.tomlandrequirements.txtfor outdated dependencies - Query OSV.dev for known CVEs with severity levels (CRITICAL, HIGH, MODERATE, LOW)
- Update dependency versions in-place, preserving comments and formatting
- Dry-run mode to preview changes before applying
- File-based caching with ETag support and TTL expiration
- Concurrent workers with bounded concurrency via errgroup
| Command | Description |
|---|---|
scan |
Check for outdated packages and vulnerabilities |
check |
Dry run — show what would change |
update |
Update dependency versions in-place |
update --vulns |
Update and scan for vulnerabilities |
cache clear |
Clear the local cache |
- Supply chain attacks (PyTorch torchtriton compromise, 2022)
- Dependency confusion and typosquatting
- CVE tracking across transitive dependencies
- PEP 440 version parsing for accurate resolution
cmd/angela/main.go (Entry point)
↓
internal/cli/ (Cobra commands + output formatting)
↓
┌──────────────┬──────────────┬──────────────┐
│ pypi/ │ osv/ │ pyproject/ │
│ PyPI Simple │ OSV.dev │ TOML parser │
│ API client │ batch CVE │ + writer │
│ + cache │ queries │ (preserves │
│ (ETag/TTL) │ │ comments) │
├──────────────┼──────────────┼──────────────┤
│ version.go │ client.go │ parser.go │
│ PEP 440 │ │ writer.go │
│ parser │ │ │
└──────────────┴──────────────┴──────────────┘
↓
internal/ui/ (Terminal colors and spinners)
cd PROJECTS/beginner/simple-vulnerability-scanner
# Install Go dependencies
go mod download
# Scan test data
go run ./cmd/angela scan --file testdata/pyproject.toml
# Check what would change (dry run)
go run ./cmd/angela check --file testdata/pyproject.toml
# Update dependencies
go run ./cmd/angela update --file testdata/pyproject.toml
# Update and scan for vulnerabilities
go run ./cmd/angela update --vulns --file testdata/pyproject.tomlsimple-vulnerability-scanner/
├── cmd/angela/
│ └── main.go # Entry point
├── internal/
│ ├── cli/ # Cobra commands and output
│ │ ├── update.go
│ │ └── output.go
│ ├── pypi/ # PyPI API client
│ │ ├── client.go # HTTP client with caching
│ │ ├── cache.go # File-based cache (ETag)
│ │ └── version.go # PEP 440 version parser
│ ├── osv/ # Vulnerability scanner
│ │ └── client.go # Batch CVE queries
│ ├── pyproject/ # TOML parser/writer
│ ├── requirements/ # requirements.txt parser
│ ├── config/ # Configuration loader
│ └── ui/ # Terminal colors/spinners
├── pkg/types/ # Shared type definitions
├── testdata/ # Sample files
├── Justfile
└── .golangci.yml
# Run tests
go test ./...
# Lint
golangci-lint run
# Build
go build -o angela ./cmd/angela©AngelaMos | CertGames.com | CarterPerez-dev | 2026