Cloud-Native Security Scanner for Modern DevOps
Installation β’ Quick Start β’ Features β’ Documentation β’ Contributing
SecScanner is a high-performance, modular security scanning CLI tool built with Go. Designed for 2026 and beyond, it seamlessly integrates into CI/CD pipelines while providing rich terminal output for local development.
# Scan your project in seconds
secscanner scan .πΈ Screenshot
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β π SECSCANNER REPORT β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π SCAN SUMMARY
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Scan Duration: 1.234s
Targets Scanned: 156
Total Findings: 3
Errors: 0
π SEVERITY BREAKDOWN
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
CRITICAL [ββββββββββββββββββββββββββββββββββββββββ] 1
HIGH [ββββββββββββββββββββββββββββββββββββββββ] 2
MEDIUM [ββββββββββββββββββββββββββββββββββββββββ] 0
- 20+ Built-in Rules for AWS, GitHub, Stripe, Slack, Google, and more
- Entropy-based detection for unknown secret patterns
- Smart allowlisting to reduce false positives
- Masked output - never expose secrets in logs
- Dockerfile Security - Root user, latest tags, secrets in ENV, and more
- Kubernetes Manifests - Privileged containers, host access, missing limits
- Infrastructure as Code ready for Terraform and Helm (coming soon)
- Table (TUI) - Beautiful terminal output with colors and progress bars
- JSON - Machine-readable for custom integrations
- SARIF - Native GitHub Code Scanning integration
- Markdown - Documentation-ready reports
- Worker Pool Architecture - Concurrent scanning with configurable workers
- Memory Efficient - Stream processing for large codebases
- Fast Startup - Single binary, no runtime dependencies
# Scan current directory
secscanner scan .
# Scan specific paths
secscanner scan ./src ./configs
# Scan with specific output
secscanner scan . -f json -o results.jsonCreate .secscanner.yaml in your project root:
version: "1.0"
scan:
workers: 10
timeout: "5m"
exclude:
- "**/node_modules/**"
- "**/.git/**"
- "**/vendor/**"
- "**/test/**"
rules:
disabled:
- SEC014 # Disable generic API key detection
output:
format: table
color: true
ci:
fail_on: high
annotate_findings: true| Command | Description |
|---|---|
scan [paths...] |
Scan files for security issues |
rules |
List all available security rules |
init |
Create a configuration file |
version |
Print version information |
secscanner scan [flags]
Flags:
-f, --format string Output format: table, json, sarif, markdown (default "table")
-o, --output string Output file path
-w, --workers int Number of parallel workers (default 10)
-t, --timeout duration Scan timeout (default 5m)
-e, --exclude strings Exclude patterns (glob)
-i, --include strings Include patterns (glob)
--severity strings Filter by severity: critical,high,medium,low,info
--scanners strings Scanners to run: secrets,misconfig,all (default [all])
--fail-on string Exit with error on severity: critical,high,medium,low
--rules strings Enable specific rules by ID
--disable-rules strings Disable specific rules by ID
-v, --verbose Enable verbose output
-q, --quiet Suppress all output except errors
--no-color Disable colored output
--progress Show progress bar (default true)| Rule ID | Severity | Description |
|---|---|---|
| SEC001 | CRITICAL | AWS Access Key ID |
| SEC002 | CRITICAL | AWS Secret Access Key |
| SEC003 | HIGH | GitHub Personal Access Token |
| SEC004 | HIGH | GitHub OAuth Access Token |
| SEC005 | HIGH | GitHub App Token |
| SEC006 | CRITICAL | Stripe API Key |
| SEC007 | HIGH | Google API Key |
| SEC008 | HIGH | Google OAuth Client Secret |
| SEC009 | HIGH | Slack Bot Token |
| SEC010 | MEDIUM | Slack Webhook URL |
| SEC011 | CRITICAL | RSA Private Key |
| SEC012 | CRITICAL | SSH Private Key |
| SEC013 | MEDIUM | JSON Web Token |
| SEC014 | MEDIUM | Generic API Key |
| SEC015 | HIGH | Password in Code |
| SEC016 | HIGH | Database Connection String |
| SEC017 | HIGH | Twilio API Key |
| SEC018 | HIGH | SendGrid API Key |
| SEC019 | HIGH | npm Token |
| SEC020 | HIGH | Discord Bot Token |
| Rule ID | Severity | Description |
|---|---|---|
| DOCKER001 | HIGH | Running as Root User |
| DOCKER002 | MEDIUM | Using Latest Tag |
| DOCKER003 | MEDIUM | No Tag Specified |
| DOCKER004 | LOW | ADD Instead of COPY |
| DOCKER005 | HIGH | Secrets in Environment Variables |
| DOCKER006 | CRITICAL | Curl/Wget Piped to Shell |
| DOCKER007 | LOW | apt-get without --no-install-recommends |
| DOCKER008 | LOW | Missing apt-get Clean |
| DOCKER009 | MEDIUM | HEALTHCHECK Not Defined |
| DOCKER010 | MEDIUM | Privileged Port Exposed |
| DOCKER011 | MEDIUM | sudo Usage Detected |
| DOCKER012 | HIGH | Missing USER Instruction |
| Rule ID | Severity | Description |
|---|---|---|
| K8S001 | CRITICAL | Privileged Container |
| K8S002 | HIGH | Running as Root |
| K8S003 | MEDIUM | Root Filesystem Not Read-Only |
| K8S004 | HIGH | Privilege Escalation Allowed |
| K8S005 | HIGH | Host Network Access |
| K8S006 | HIGH | Host PID Namespace |
| K8S007 | MEDIUM | Host IPC Namespace |
| K8S008 | CRITICAL | Dangerous Capabilities Added |
| K8S009 | MEDIUM | No Resource Limits |
| K8S010 | MEDIUM | Latest Image Tag |
| K8S011 | HIGH | Host Path Volume Mount |
| K8S012 | LOW | Default Service Account |
| K8S013 | MEDIUM | Secrets in Environment Variables |
| K8S014 | MEDIUM | Missing Network Policy |
| K8S015 | CRITICAL | Writable /proc Mount |
secscanner/
βββ cmd/
β βββ main.go # Entry point
β βββ cli/
β βββ root.go # Root command & flags
β βββ scan.go # Scan command
β βββ config.go # Configuration handling
βββ pkg/
β βββ scanner/
β β βββ types.go # Core types & interfaces
β β βββ pool.go # Worker pool implementation
β β βββ secrets.go # Secret detection scanner
β β βββ misconfig.go # Misconfiguration scanner
β β βββ scanner_test.go # Unit tests
β βββ report/
β β βββ reporter.go # Report formatters
β β βββ sarif.go # SARIF format support
β βββ utils/
β βββ filewalker.go # File system traversal
β βββ progress.go # Progress indicators
βββ go.mod
βββ go.sum
βββ README.md
- Go 1.23 or later
- Git
# Development build
go build -o secscanner ./cmd
# Production build with version info
go build -ldflags "-X main.version=1.0.0 -X main.commit=$(git rev-parse HEAD)" -o secscanner ./cmd# Run all tests
go test ./...
# Run with coverage
go test -cover ./...
# Run specific package tests
go test ./pkg/scanner/...# Install golangci-lint
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
# Run linter
golangci-lint runContributions are welcome! Please read our Contributing Guide for details.
- YAML Rules (Coming Soon)
# .secscanner.yaml
rules:
custom:
- id: CUSTOM001
name: "Internal API Key"
pattern: "INTERNAL_[A-Z0-9]{32}"
severity: HIGH
remediation: "Use environment variables instead"- Go Interface
type Scanner interface {
Name() string
Description() string
Scan(ctx context.Context, target Target) ([]Finding, error)
SupportedTypes() []TargetType
}MIT License - see LICENSE for details.
- spf13/cobra - CLI framework
- fatih/color - Terminal colors
- owenrumney/go-sarif - SARIF support
- Inspired by truffleHog, gitleaks, and trivy
Built with β€οΈ by firatmio