GriffinCanCode/scantron
A file scanner for secret management and more -- faster than the speed of light.
Grep on steroids
Scantron is a sophisticated scanning engine that crawls ANY text-based files on your system and extracts structured information based on customizable patterns. Perfect for DevOps engineers managing multiple projects with different tech stacks.
scantron/
├── backend/ # Perl/Mojolicious API server
│ ├── lib/Scantron/
│ │ ├── API/ # REST API controllers
│ │ ├── Scanner/ # Core scanning engine
│ │ ├── Types/ # Type definitions
│ │ └── Utils/ # Utilities and storage
│ ├── t/ # Perl tests
│ ├── script/ # Startup scripts
│ └── cpanfile # Perl dependencies
├── frontend/ # Elm web application
│ ├── src/
│ │ ├── Types/ # Elm type definitions
│ │ ├── Pages/ # UI pages/views
│ │ ├── Components/# Reusable UI components
│ │ └── API.elm # Backend communication
│ ├── public/ # Static assets
│ ├── tests/ # Elm tests
│ └── elm.json # Elm configuration
├── cli/ # Rust CLI application
│ ├── src/
│ │ ├── cli/ # Command implementations
│ │ ├── client.rs # HTTP client for backend
│ │ ├── output.rs # Output formatters
│ │ ├── server.rs # Server management
│ │ └── types.rs # Data structures
│ ├── Cargo.toml # Rust dependencies
│ └── README.md # CLI documentation
│ ├── security-audit.json
│ ├── aws-migration.json
│ └── dependency-audit.json
└── README.md
# Install all dependencies and build everything
make install
# Build CLI and web app
make build
# Start development servers (web UI)
make dev
# Or use the fast CLI
./cli/target/release/scantron --help
cd cli
# Build CLI
cargo build --release
# Install to system (optional)
cargo install --path .
# Quick security scan
./target/release/scantron scan --profile security-audit ./
# Backend setup
cd backend
cpanm --installdeps .
./script/scantron daemon -l http://localhost:3000
# Frontend setup
cd frontend
npm install -g elm
elm make src/Main.elm --output=public/elm.js --debug
# Open http://localhost:3000 in browser
# Build everything
make build
# Start server and background workers
make start
# Or manually:
# Backend with Hypnotoad (production PSGI server)
cd backend
./script/scantron prefork &
# Start background job workers
./script/scantron-worker --queues default &
# CLI is ready to use
./cli/target/release/scantron scan --profile security-audit ./
# Start/stop everything
make start # Start server + workers
make stop # Stop server + workers
# Individual control
make start-workers # Start job queue workers only
make stop-workers # Stop job queue workers only
make worker-logs # View worker logs
# Optional: Custom data directory
SCANTRON_DATA_DIR=/var/lib/scantron
# Optional: Log level
MOJO_LOG_LEVEL=info
{
"name": "Security Audit",
"description": "Find security issues in code",
"patterns": [
{
"name": "hardcoded-password",
"regex": "password\\s*=\\s*[\"']([^\"']+)[\"']",
"description": "Hardcoded passwords"
},
{
"name": "api-keys",
"regex": "api[_-]?key\\s*[=:]\\s*[\"']?([a-zA-Z0-9]{20,})",
"description": "API keys and tokens"
}
],
"extractors": [
{
"type": "yaml",
"path": "database.password",
"description": "Extract DB passwords from YAML"
}
],
"file_filter": {
"extensions": ["py", "js", "yaml", "json"],
"exclude_patterns": ["node_modules", "*.min.js"],
"max_size": 1048576
}
}
cd backend
prove -l t/
cd frontend
elm-test
# Start backend in test mode
cd backend
./script/scantron test
# Run API tests
curl -X GET http://localhost:3000/api/v1/scans
# 1. Security audit with built-in profile
scantron scan --profile security-audit ./my-project
# 2. Find AWS references for migration
scantron scan --profile aws-migration ./infrastructure
# 3. Track dependencies across projects
scantron scan --profile dependency-audit ./
# 4. Custom pattern search
scantron scan --pattern "TODO|FIXME" --ext js,py,ts ./src
# 5. CI/CD integration (fail if secrets found)
scantron scan --profile security-audit --fail-on-match --quiet ./
Built-in profile templates available in backend/profile-templates/
:
Security Audit (security-audit.json
)
AWS Migration (aws-migration.json
)
Dependency Audit (dependency-audit.json
)
We welcome contributions! Please see our guidelines:
MIT License - see LICENSE file for details.
Plugin System: Custom scanner plugins for specialized file types
Cloud Integration: Native support for AWS, Azure, GCP scanning
AI-Powered Patterns: Machine learning to suggest scan patterns
Continuous Monitoring: Git hooks and CI/CD integration
Team Features: User management and shared scan profiles
Advanced Visualizations: Graph analysis and trend charts
Mobile App: Native iOS/Android apps for monitoring
Scantron - Making large-scale code analysis simple, fast, and beautiful.