Why cryptographic discovery matters

The first step in any quantum readiness journey is understanding what cryptographic assets exist in your organization. You can't protect what you can't see.

The Harvest Now, Decrypt Later Threat Adversaries are actively collecting encrypted data today, waiting for quantum computers capable of breaking current encryption. Data with long-term sensitivity (health records, financial data, trade secrets) is particularly at risk.

Most organizations face significant challenges in cryptographic visibility:

  • Scattered implementations - Cryptography is embedded throughout codebases, configurations, and dependencies
  • Lack of documentation - Teams often don't document which algorithms and key sizes are used
  • Legacy systems - Older code may contain deprecated or weak cryptographic implementations
  • Third-party dependencies - Libraries and frameworks bring their own cryptographic choices

CryptoScan solves this by automatically scanning your codebase and producing a comprehensive inventory of all cryptographic assets, classified by quantum risk level.

What is CryptoScan

CryptoScan is an open-source cryptographic discovery tool designed for the post-quantum era. It scans codebases to identify cryptographic algorithms, keys, configurations, and dependencies.

50+ detection patterns

Detects RSA, ECDSA, AES, DES, MD5, SHA-1, TLS configurations, private keys, and more across multiple languages.

Quantum risk classification

Every finding is classified as Vulnerable, Partial Risk, Safe, or Unknown based on quantum threat level.

Multiple output formats

Generate reports in text, JSON, CSV, SARIF (for GitHub Security), and CBOM (Cryptographic Bill of Materials).

Remote repository scanning

Scan remote Git repositories directly by URL without cloning locally.

Getting started

Installation

Download the release binary for your platform and check it against the published checksums. Releases carry builds for macOS, Linux and Windows on both amd64 and arm64, plus .deb and .rpm packages:

V=1.4.0
P=darwin_arm64    # or linux_amd64, linux_arm64, windows_amd64, ...
BASE=https://github.com/csnp/cryptoscan/releases/download/v$V

curl -LO $BASE/cryptoscan_${V}_${P}.tar.gz
curl -LO $BASE/checksums.txt

# Verify before you run it
shasum -a 256 -c checksums.txt --ignore-missing

tar xzf cryptoscan_${V}_${P}.tar.gz
./cryptoscan version

All releases: github.com/csnp/cryptoscan/releases

To build from source instead, which skips the checksum check and needs a Go toolchain:

git clone https://github.com/csnp/cryptoscan.git
cd cryptoscan
go build -o cryptoscan ./cmd/cryptoscan

Basic usage

Scan a local directory:

# Scan current directory
cryptoscan scan .

# Scan a specific path
cryptoscan scan /path/to/your/project

# Scan a remote Git repository
cryptoscan scan https://github.com/org/repo.git

Common options

# Focus on critical and high severity issues
cryptoscan scan . --min-severity high

# Output as JSON for automation
cryptoscan scan . --format json --output findings.json

# Generate SARIF for GitHub Security
cryptoscan scan . --format sarif --output results.sarif

# Generate Cryptographic Bill of Materials
cryptoscan scan . --format cbom --output crypto-bom.json

# Group findings by file
cryptoscan scan . --group-by file
Some flags are accepted but not yet active. In 1.4.0 the report always shows three lines of source context, so --context changes nothing: the output is identical at --context 1, 5 and 9. The same is true of --max-depth and --git-history, and of --group-by for any value other than file. The tool marks these NOT YET IMPLEMENTED in cryptoscan scan --help, which is the list to check before relying on one.

Understanding quantum risk levels

CryptoScan classifies every cryptographic finding by its vulnerability to quantum attacks:

Risk Level Meaning Examples Action Required
VULNERABLE Broken by quantum computers using Shor's algorithm RSA, ECDSA, DSA, DH, ECDH Plan migration to PQC algorithms
PARTIAL Weakened by Grover's algorithm; security effectively halved AES-128, SHA-256 Double key sizes (AES-256)
SAFE Quantum-resistant or already adequate AES-256, SHA-384, SHA-512 No immediate action needed
UNKNOWN Requires manual review Custom implementations, unclear contexts Investigate and classify
Why RSA is Vulnerable RSA's security relies on the difficulty of factoring large numbers. Shor's algorithm, running on a sufficiently powerful quantum computer, can factor these numbers efficiently, completely breaking RSA encryption and signatures regardless of key size.

Output formats

SARIF (GitHub security integration)

SARIF (Static Analysis Results Interchange Format) integrates directly with GitHub's Security tab:

cryptoscan scan . --format sarif --output results.sarif

Upload to GitHub using the CodeQL action:

# .github/workflows/crypto-scan.yml
name: Crypto Scan
on: [push, pull_request]

jobs:
  scan:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Setup Go
        uses: actions/setup-go@v5
        with:
          go-version: '1.21'

      - name: Install CryptoScan
        run: |
          git clone https://github.com/csnp/cryptoscan.git /tmp/cryptoscan
          cd /tmp/cryptoscan && go build -o /usr/local/bin/cryptoscan ./cmd/cryptoscan

      - name: Run Scan
        run: cryptoscan scan . --format sarif --output results.sarif

      - name: Upload SARIF
        uses: github/codeql-action/upload-sarif@v3
        with:
          sarif_file: results.sarif

CBOM (cryptographic bill of materials)

Generate a CycloneDX-compatible CBOM for compliance and supply chain transparency:

cryptoscan scan . --format cbom --output crypto-bom.json

CBOMs are increasingly required for software supply chain compliance, particularly in government and regulated industries.

How CryptoScan maps to QRAMM

CryptoScan tags every finding with QRAMM Dimension 1, Cryptographic Visibility and Inventory, and with one of its three practices: 1.1 Discovery and inventory for the algorithms and keys it finds, 1.3 Dependency mapping for the cryptographic libraries your code depends on, and 1.2 Vulnerability assessment for configuration and protocol findings and for anything rated Vulnerable or Partial (see quantum risk levels). The summary at the end of each scan then gives you a readiness level for each of the three practices.

In the text report

What cryptoscan scan prints on the crypto-samples directory of the CryptoScan repository (trimmed):

┌─ QUANTUM MIGRATION READINESS ──────────────────────────────────┐
│  Score: █████████░░░░░░░░░░░░░░░░ 37.5% [CRITICAL]│
│─────────────────────────────────────────────────────────────────│
│  INVENTORY                                                     │
│    ✓ Safe (PQC):        32       ✗ Vulnerable:    39      │
│    ◐ Hybrid:            3        [!] Critical:      13      │
│    ◑ Partial:           23       Total:          110     │
│─────────────────────────────────────────────────────────────────│
│  QRAMM DIMENSION 1: Cryptographic Visibility & Inventory (CVI) │
│    Practice 1.1 Discovery:   Level 3/5 ●●●○○                    │
│    Practice 1.2 Assessment:  Level 3/5 ●●●○○                    │
│    Practice 1.3 Mapping:     Level 3/5 ●●●○○                    │

Captured on 2026-10-15 from CryptoScan 1.4.0, run from a clone of the repository with cryptoscan scan crypto-samples --no-color.

In the JSON report

With --format json, each finding carries a qrammMapping object, and migrationScore carries the same readiness levels as qrammReadiness. Part of what cryptoscan scan crypto-samples --format json --pretty writes, with the other keys left out:

{
  // "tool" left out
  "findings": [
    {
      "id": "MD5-001-96-8",
      "type": "MD5 Hash Function",
      "findingType": "algorithm",
      // category, algorithm, primitive and migrationStatus left out
      "qrammMapping": {
        "dimension": "CVI",
        "practice": "1.2",
        "evidence": "Quantum vulnerability assessment and classification"
      },
      // file, line, column, match, context, sourceContext and severity left out
      "quantumRisk": "VULNERABLE",
      // the remaining keys left out
    },
    // the other findings left out
  ],
  // "summary" left out
  "migrationScore": {
    // score, level, the counts, byPrimitive, byAlgorithm and topRiskFiles left out
    "qrammReadiness": {
      "cviScore": 60,
      "discoveryLevel": 3,
      "assessmentLevel": 3,
      "mappingLevel": 3,
      "recommendations": [
        "CRITICAL: Remove broken algorithms (MD5, SHA-1, DES, RC4) immediately.",
        "Plan migration from quantum-vulnerable algorithms to PQC (ML-KEM, ML-DSA)."
      ]
    }
  },
  // the remaining keys left out
}

This MD5 finding is an algorithm, but it is tagged 1.2 rather than 1.1 because its quantum risk is Vulnerable.

A scan sees your code, not your organization. These levels describe what the scan could see, not how mature your organization is, and a scan never reports higher than Level 3. For the full picture across all four dimensions, take the quick assessment and then work through the assessment toolkit.

CI/CD integration

Integrate CryptoScan into your CI/CD pipeline to catch cryptographic issues before they reach production:

GitHub Actions

name: Security Scan
on: [push, pull_request]

jobs:
  crypto-scan:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Setup Go
        uses: actions/setup-go@v5
        with:
          go-version: '1.21'

      - name: Install CryptoScan
        run: |
          git clone https://github.com/csnp/cryptoscan.git /tmp/cryptoscan
          cd /tmp/cryptoscan && go build -o /usr/local/bin/cryptoscan ./cmd/cryptoscan

      - name: Run CryptoScan
        run: cryptoscan scan . --min-severity high --format sarif --output crypto.sarif

      - name: Upload Results
        uses: github/codeql-action/upload-sarif@v3
        with:
          sarif_file: crypto.sarif

Pre-commit hook

Catch issues before commit:

#!/bin/bash
# .git/hooks/pre-commit

cryptoscan scan . --min-severity critical
if [ $? -ne 0 ]; then
    echo "Critical cryptographic issues found. Please fix before committing."
    exit 1
fi

Best practices

1. Start with discovery

Run CryptoScan across your entire codebase to establish a baseline inventory. Don't try to fix everything at once - first understand what you have.

2. Prioritize by risk

Focus on VULNERABLE findings first, particularly those in:

  • Authentication and authorization systems
  • Data encryption at rest and in transit
  • Digital signatures and certificate management
  • Key exchange mechanisms

3. Use inline ignores sparingly

CryptoScan supports inline ignore comments for false positives:

// cryptoscan:ignore - This is test data, not a real key
key := "test-rsa-key-for-unit-tests"

Document why each ignore is added and review them periodically.

4. Integrate early in development

Add CryptoScan to your CI pipeline to catch issues before they accumulate. It's easier to fix one new issue than remediate hundreds of legacy findings.

5. Generate regular reports

Track your cryptographic posture over time:

# Generate weekly inventory
cryptoscan scan . --format cbom --output crypto-inventory-$(date +%Y%m%d).json

Ready to discover your cryptographic assets?

Get started with CryptoScan today - it's free, open source, and takes just minutes to set up.

View on GitHub Take QRAMM assessment

Related resources