A powerful CLI tool for detecting cryptographic algorithm usage in source code repositories. Crypto Finder scans codebases using multiple scanning engines (OpenGrep, Semgrep) and outputs results in standardized formats including JSON and CycloneDX CBOM (Cryptography Bill of Materials).
# Configure your API key (one-time setup)
crypto-finder configure --api-key YOUR_API_KEY
# Scan a project using remote rulesets
crypto-finder scan /path/to/code
# Generate CycloneDX CBOM
crypto-finder scan --format cyclonedx --output cbom.json /path/to/codeBefore you begin, ensure you have the following installed:
-
Go - version 1.25 or higher (for building from source)
# macOS brew install go # Linux # Download from https://go.dev/dl/
-
OpenGrep or Semgrep - for running scans (included in Docker images)
# OpenGrep (recommended) # Download from https://github.com/opengrep/opengrep # Semgrep pip install semgrep
Option 1: Build from Source
git clone https://github.com/scanoss/crypto-finder.git
cd crypto-finder
make build
sudo make installOption 2: Go Install
go install github.com/scanoss/crypto-finder/cmd/crypto-finder@latestOption 3: Docker
# Full image with scanners included (recommended)
docker pull ghcr.io/scanoss/crypto-finder:latest
# Slim image (bring your own scanner)
docker pull ghcr.io/scanoss/crypto-finder:latest-slimScan with remote rulesets (recommended):
crypto-finder scan /path/to/codeScan with local rules:
crypto-finder scan --no-remote-rules --rules-dir ./rules /path/to/codeGenerate CycloneDX CBOM:
crypto-finder scan --format cyclonedx --output cbom.json /path/to/codeCI/CD Integration:
# Fail build if cryptographic assets are detected
crypto-finder scan --fail-on-findings /path/to/codeCustom Rule Combination:
# Combine remote rules with local custom rules
crypto-finder scan --rules-dir ./custom-rules /path/to/codeForce Fresh Rules:
# Bypass cache and force fresh download
crypto-finder scan --no-cache /path/to/codeFormat Conversion:
# Convert existing results to CycloneDX
crypto-finder convert results.json --output cbom.json
# Or pipe from scan
crypto-finder scan /path/to/code | crypto-finder convert --output cbom.jsonThe application can be configured via command-line flags, environment variables, or configuration files.
# Set API key
crypto-finder configure --api-key YOUR_API_KEY
# Set custom API URL
crypto-finder configure --api-url https://custom.scanoss.comEnvironment Variables:
export SCANOSS_API_KEY=your-key
export SCANOSS_API_URL=https://custom.scanoss.comProject-level configuration via scanoss.json:
{
"settings": {
"skip": {
"patterns": {
"scanning": ["node_modules/", "target/", "venv/"]
}
}
}
}For detailed configuration options, see Configuration Documentation.
crypto-finder scan [flags] <target>Common options:
--rules <file>- Custom rule file (repeatable)--rules-dir <dir>- Rule directory (repeatable)--no-remote-rules- Disable remote ruleset fetching--no-cache- Force fresh download, bypass cache--scanner <name>- Scanner to use:opengrep(default),semgrep--format <format>- Output format:json(default),cyclonedx--output <file>- Output file path (default: stdout)--languages <langs>- Override language detection (comma-separated)--fail-on-findings- Exit with error if findings detected--timeout <duration>- Scan timeout (default: 10m)--verbose,-v- Enable verbose logging--help- Display help information
For a complete list of commands and options, run crypto-finder --help.
- Multi-Scanner Support - OpenGrep (default) and Semgrep with advanced taint analysis
- Remote Rulesets - Automatically fetch curated rules from SCANOSS API with local caching
- Flexible Configuration - Combine remote and local rules, configure via CLI, env vars, or config files
- Multiple Output Formats - Interim JSON and CycloneDX 1.6 CBOM formats
- CI/CD Ready - Docker images for GitHub Actions, GitLab CI, Jenkins, and more
- Smart Caching - TTL-based cache with automatic stale cache fallback (opt-out with
--strict)
- Remote Rulesets - API configuration, caching strategies, and troubleshooting
- Output Formats - Interim JSON and CycloneDX CBOM format specifications
- Docker Usage - Container usage and CI/CD integration examples
- Configuration - Detailed configuration guide and skip patterns
We welcome contributions! For more details, see CONTRIBUTING.md and our Code of Conduct.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Run tests (
make test) - Run linter (
make lint) - Commit your changes (
git commit -m 'feat: add an amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
See CHANGELOG.md for a detailed history of changes.
Copyright (C) 2026 SCANOSS.COM
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the LICENSE file for the full license text.
SPDX-License-Identifier: GPL-2.0-only
For questions, issues, or feature requests, please use the GitHub Issues page.