CipherMap Documentation
Command reference for the CipherMap CLI: scanning, remediation, compliance profiles, CBOM export, air-gapped vaults, and CI integration. Access is explicit throughout: Free discovers, Standalone Auditor Tier A provides readiness evidence, and DevSecOps Enterprise Tier B adds integrations and fleet operations. Proposal preview is Free. Command behavior is verifiable against the exact build under evaluation — ciphermap <command> --help is the same source of truth. A normal source-preview build exposes only Free capabilities; paid activation requires a separately controlled commercial build and licence.
Quick Start
Audit a repository locally — your source never leaves the machine. For this developer preview, run product commands with both --offline and --no-telemetry, as required by the supplied build guide. Those explicit controls keep the evaluation path local without claiming a universal OS-level no-egress proof.
Developer source preview
Native binary downloads are temporarily unavailable. Approved developers receive named, expiring access to a reviewed, sanitized, history-free source archive after accepting the Preview terms. Verify the supplied checksum, extract into an empty directory, and build locally with the pinned Go 1.26.5 toolchain. No existing Git repository, history, reusable public link, or unsigned executable is provided.
preview_archive="CIPHERMAP-FREE-DEVELOPER-SOURCE-PREVIEW-v0.6.0.1-SANITIZED.tar.gz"
preview_sha="695b708d70892711d64116c725e18533b6e7f5839f67db087b0e56e3cdd4c68c"
test "$(shasum -a 256 "$preview_archive" | awk '{print $1}')" = "$preview_sha"
tar -xzf "$preview_archive"
cd ciphermap-free-developer-source-preview-v0.6.0.1-sanitized
test "$(go env GOVERSION)" = "go1.26.5"
# One connected dependency bootstrap through your approved Go module supply chain:
GOENV=off GOWORK=off GOTOOLCHAIN=local GOFLAGS=-mod=readonly go mod download
# Then verify and build with dependency resolution disabled:
GOPROXY=off GOSUMDB=off GOENV=off GOWORK=off GOTOOLCHAIN=local GOFLAGS=-mod=readonly go mod verify
mkdir -p dist/dev
GOPROXY=off GOSUMDB=off GOENV=off GOWORK=off GOTOOLCHAIN=local GOFLAGS=-mod=readonly \
go build -trimpath -buildvcs=false -o dist/dev/ciphermap .
dist/dev/ciphermap doctor --offline --no-telemetry --color neverThe checksum, controlling build guide, exclusions notice, and support boundary are supplied during onboarding. Do not redistribute the archive or local binary. A normal source build is a Free developer build: paid Tier A and Tier B licences are intentionally disabled. Repository-wide go test ./... is unsupported for this sanitized archive because benchmark fixtures were intentionally excluded. Darwin/arm64 has bounded runtime-smoke evidence; Linux and Windows are compile-only until native qualification passes.
Future signed native release
The public installer stays fail-closed while the native release is a candidate. The command below makes no network request and installs nothing until signed release promotion.
( echo 'CipherMap v0.6.0 is a release candidate and is not available for installation.' >&2 echo 'No network request was made and no binary was installed.' >&2 exit 1 ) && export PATH="$HOME/.local/bin:$PATH" && ciphermap scan .
1. ciphermap doctor
Diagnostics & HealthHow it works: Runs each language scanner against a known-vulnerable probe and reports any scanner that fails to detect it, checks fleet-server connectivity (2-second timeout against CIPHERMAP_SERVER_URL), and reports whether the bundle signing key (CIPHERMAP_SIGNING_KEY) is configured.
Why it matters: The verdict follows the checks — a failed probe fails the command.
ciphermap doctor
2. ciphermap auth
License ActivationHow it works: Verifies your licence key 100% offline against an Ed25519 public key embedded in the binary — keys are minted server-side and the private key never ships. Expiry and clock-rewind checks run locally, and the key is saved to ~/.config/ciphermap/config.json.
Why it matters: Activates the paid licences sold on the pricing page — Standalone Auditor ($4,999/yr) and the DevSecOps Enterprise site licences (Growth $24,999/yr, Scale $49,999/yr). Tier A carries one auditor seat; Tier B carries 30 Growth or 100 Scale contributing-developer seats.
Developer-preview boundary: normal source builds disable paid licences. Do not run ciphermap auth in this Preview; activation is available only in a separately controlled commercial build.
ciphermap auth # Paste the key at the hidden prompt
▶ View Ed25519 Licence Key Specification
Format: CIPHERMAP-<TIER>-<BASE64URL_PAYLOAD>.<ED25519_SIGNATURE>
Payload Claims: { "version": 1, "customer_id": "cust_9823", "tier": "TEAM", "issued_at": 1774000000, "expires_at": 1805500000, "seats": 1 }
Verification: Ed25519 signature over ciphermap-license-v1\0 || BASE64URL_PAYLOAD, checked against the public key embedded in the binary. Offline.
Anti-Clock Rewind: reject if SystemClock < IssuedAt - 300 seconds.
Core Scanning & Remediation Studio
3. ciphermap scan [dir]
SAST & SCA ScannerHow it works: Regex-driven scanning across 11 languages (Python, JS, TS, Java, Kotlin, C/C++, C#, Rust, Swift, PHP, Ruby), plus a Go AST scanner that inspects imports and call sites and extracts literal RSA key-size arguments from supported rsa.GenerateKey calls. Also covers dependency manifests (OSV database + deprecated-package lists), IaC/TLS configuration, committed private keys, and weak PRNG usage. It finds cryptographic API usage; it does not prove reachability or perform data-flow analysis.
Why it matters:Inventories quantum-vulnerable cryptography across your codebase before harvest-now-decrypt-later attacks make it someone else's inventory.
Access: Base scanning, text/JSON/SARIF output, severity and diff controls, and the --fail-on CI gate are Free. Compliance profiles and audit formats require Tier A. Slack and OTLP delivery require Tier B.
ciphermap scan . --fail-on high --format sarif -o results.sarif
4. ciphermap tui
Interactive Terminal StudioHow it works: Full-screen Charmbracelet bubbletea/lipgloss TUI over your scan results: a findings list, per-rule explainer drawer (static reference text), a migration timeline estimator, diff views, and read-only remediation proposal inspection.
Why it matters: Inspection and proposal review do not modify the workspace. Production source publication, including TUI and LSP write actions, remains disabled until Gate 2 is promoted.
Access: Ctrl+E encrypted vault export requires Standalone Auditor Tier A or higher; TUI inspection remains read-only for every tier in this release.
ciphermap tui . # read-only findings and proposal review
▶ View TUI Keymap Reference Table
| Keybinding | Action |
|---|---|
| e / ? | Toggle explainer drawer (static reference text for the selected finding) |
| m | Toggle migration timeline estimator |
| enter | Toggle diff view for the selected finding |
| a | Inspect the supported proposal; source publication is unavailable in this release |
| ctrl+e | Export AES-256-GCM encrypted vault (Tier A+; requires CIPHERMAP_VAULT_PASSPHRASE) |
| q / ctrl+c | Quit |
5. ciphermap fix
Remediation EnginePython: bounded MD5/SHA-1 constructor proposals with string/comment masking and guards; a digest used as a persisted identifier is declined. Go: bounded MD5/SHA-1 call-shape proposals target SHA-256. RSA, DES, RC4, protocol, dependency, and unsupported migrations are not treated as drop-in replacements; they are declined with a stated reason.
Release boundary: --dry-run previews the candidate plan without changing source. Production publication, backup creation, verifier execution, and apply actions remain disabled until the isolated Gate 2 transaction and recovery evidence are promoted.
Access: read-only preview is Free. A Tier B licence does not unlock source writes in this release.
ciphermap fix . --dry-run # preview only; no source writes
Measured Performance
Reference offline scans (CIPHERMAP_OFFLINE=1) of public corpora on a development MacBook. These numbers are frozen in test_benchmarks/BASELINES.json and regenerated and diffed by a test — drift has to be attributed and refrozen in the same commit.
NIST PQC Code Migration Reference Table
Standardized algorithm replacement mapping according to NIST FIPS 203, 204, and 205 guidelines.
| Legacy Cryptographic Routine | NIST PQC Replacement Standard | Primary Use Case |
|---|---|---|
| RSA-2048 / RSA-4096 / ECDH | NIST FIPS 203 (ML-KEM-768) | General Key Encapsulation & Exchange |
| ECDSA / RSA-PSS Signatures | NIST FIPS 204 (ML-DSA-65) | Digital Signatures & Code Signing |
| Stateful Signatures (LMS / XMSS) | NIST FIPS 205 (SLH-DSA) | Stateless Hash-Based Signatures |
Compliance Reports & Bill of Materials
6. ciphermap report
HTML Compliance ReportsHow it works: Renders audit findings into a self-contained HTML report in an executive or technical style. --vertical (hipaa, pci-dss, fedramp) emphasises a compliance programme; --attestsigns the finished report with your organisation's Ed25519 key (CIPHERMAP_ATTESTATION_KEY), writing a detached .sig.
Why it matters: A printable, hand-off-able record of a scan, signed so recipients can verify it was not edited after the fact.
Access: Standalone Auditor Tier A or DevSecOps Enterprise Tier B.
ciphermap report --style executive --vertical pci-dss -o board-report.html
7. ciphermap cbom
CycloneDX CBOM & OpenVEXHow it works: Serializes detected cryptographic assets into a CycloneDX 1.6 Cryptographic Bill of Materials with real cryptoProperties — algorithm identity is grounded per rule, and undetermined fields are omitted, never invented. Also emits SPDX 2.3 and OpenVEX (with honest coverage disclosure). Tier B can push the CycloneDX output to OWASP Dependency-Track. --bundle produces an auditor vault zip whose manifest carries an HMAC-SHA256 integrity tag — a symmetric tag, plainly labeled as such, keyed by your own CIPHERMAP_SIGNING_KEY (there is deliberately no default key).
Why it matters: A machine-readable CBOM is how you evidence a cryptographic inventory to auditors and downstream customers.
Access: Local CBOM/SPDX/OpenVEX generation and auditor bundles require Tier A; Dependency-Track delivery requires Tier B.
ciphermap cbom --format cyclonedx --output cbom.json
Policy Schema (.ciphermap-policy.yml)
Policy file read by ciphermap ci-review --policy. When the file is absent, the defaults shown here apply. PR review automation is a Tier B capability; the plain scan --fail-on gate remains Free.
version: "v1"
mode: "blocking" # or "advisory"
ignored_paths:
- "**/vendor/**"
- "**/testdata/**"
- "**/*.min.js"
rules:
allow_rsa: false
min_rsa_bits: 3072
allow_md5: false
blocked_algos:
- "RSA-1024"
- "RSA-2048"
- "MD5"
- "SHA1"
- "DES"
- "3DES"
- "RC4"Diagnostics & Troubleshooting FAQ
Q: What if our network blocks all outbound traffic?
A: Run ciphermap scan . --offline (or set CIPHERMAP_OFFLINE=1). The detection ruleset is embedded in the binary; offline mode is an egress kill switch that also disables OSV lookups and telemetry, so nothing leaves the machine.
Q: What if a licence key returns a validation error?
A: Check the expiry date in your purchase email, then run ciphermap doctor and verify the system clock — validation rejects keys when the system clock predates the key's issue date (with a 5-minute grace window).
Air-Gapped Vault Workflows
8. ciphermap export
Vault ExporterHow it works:Encrypts the scan's compliance documents into a single archive with AES-256-GCM under a passphrase-derived key, and writes a companion .sha256 checksum manifest. --cmmc includes an automated, partial NIST SP 800-171 cryptographic control review built from the scan findings — controls that static analysis cannot assess are reported as NOT_ASSESSED rather than given a verdict. It is a working paper, not a certification.
Why it matters: Moves scan results across a network boundary on physical media without exposing their contents.
Access: Standalone Auditor Tier A or DevSecOps Enterprise Tier B.
ciphermap export --output vault.enc --passphrase "<passphrase>"
9. ciphermap import
Vault IngestionHow it works: Decrypts an AES-256-GCM encrypted .enc vault archive and extracts its compliance documents.
Why it matters: Lets an analyst on an isolated network read audit results produced on the other side of the air gap.
Access: Standalone Auditor Tier A or DevSecOps Enterprise Tier B.
ciphermap import vault.enc --passphrase "<passphrase>"
10. ciphermap verify
Vault Checksum VerificationHow it works: Verifies the SHA-256 checksum manifest (vault.enc.sha256) against the encrypted vault package before extraction. Verification is free, so an auditor who is not a customer can still check a bundle's integrity.
Why it matters: Detects corruption or truncation after physical media transfer, before you attempt decryption.
ciphermap verify vault.enc
Vault Binary Layout
On-disk framing of an exported vault package.
[ 16-Byte Random Salt ] [ 12-Byte GCM Nonce ] [ AES-256-GCM Encrypted Zip Payload + 16-Byte Tag ]
Key Derivation: Key = PBKDF2-HMAC-SHA256(Passphrase, Salt, 10000 iterations, 32 bytes)
IDE LSP & CI Automation
Language Server Protocol (LSP) Setup
CipherMap runs a JSON-RPC stdio language server (ciphermap lsp) providing inline diagnostics, hover documentation, code actions, and code lenses. The server uses the same dispatch table as the CLI, so the editor and the CLI cannot disagree about a finding. Diagnostics and documentation are read-only. Proposal inspection is available where supported, but code actions that write source remain disabled for every tier until Gate 2 is promoted. Point an LSP client at:
{
"name": "CipherMap LSP",
"command": "ciphermap",
"args": ["lsp"],
"filetypes": ["go", "typescript", "python", "java", "cpp", "rust"]
}GitHub Actions PR Review
ciphermap ci-review runs the Tier B PR review bot for GitHub, GitLab, Azure DevOps or Bitbucket Cloud. The plain CI gate via scan --fail-on is Free. Exit-code contract: 0 clean, 1 gate tripped, 2 error — a read failure exits 2 rather than passing silently. Basic provider templates, the composite GitHub Action, and the pre-commit hook also remain Free; writing PR comments or checks is the Tier B boundary.
The workflow below describes the future signed native release. During the Free developer source preview, install.sh remains unavailable and approved users receive a separate checksum-bound source archive; this Tier B provider workflow is not activated by that build.
name: CipherMap PQC Audit
on: [pull_request]
jobs:
pqc-audit:
runs-on: ubuntu-24.04
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
with:
fetch-depth: 0
- name: Install pinned CipherMap CLI
shell: bash
run: |
set -euo pipefail
installer="$(mktemp)"
trap 'rm -f "$installer"' EXIT
expected='4b3d06aad504407155750da1b9995af56ac347bfa78236d950110888c501ed0c'
curl --proto '=https' --tlsv1.2 --fail --silent --show-error --location --max-time 60 --output "$installer" https://www.ciphermap.io/install.sh
actual="$(sha256sum "$installer" | awk '{print $1}')"
[ "$actual" = "$expected" ]
bash "$installer"
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
- run: ciphermap ci-review . --provider github --pr ${{ github.event.number }}
env:
GITHUB_TOKEN: ${{ github.token }}
CIPHERMAP_LICENSE: ${{ secrets.CIPHERMAP_LICENSE }}Prometheus Metrics
The self-hosted fleet server (ciphermap server) exports Prometheus-format metrics at /metrics — ciphermap_fleet_complete_scan_score, ciphermap_scans_processed_total, and ciphermap_repos_monitored_total. Fleet operation requires DevSecOps Enterprise Tier B. Only /healthz is public. Metrics, the console, reports, policy and management APIs require the admin token. Keep the server-only ingest signing key out of CI; mint a separate write token for each canonical repository. A repository token cannot write another repository or read fleet data. Repository badges use a separately revocable badge token.
# Operator: mint one repository-scoped CI credential CIPHERMAP_SERVER_INGEST_KEY="$SERVER_KEY" \ ciphermap server --mint-ingest-token acme/payments # CI: publish only this repository's scan evidence CIPHERMAP_SERVER_INGEST_TOKEN="$ACME_PAYMENTS_TOKEN" ciphermap sync . # Admin/Prometheus: read fleet metrics curl -s -H "Authorization: Bearer $CIPHERMAP_SERVER_TOKEN" \ http://localhost:8080/metrics | grep ciphermap_fleet_complete_scan_score
Rule Explorer
The scanner ships 73 signed dynamic rules across 11 regex-driven languages, plus three static IaC rules, Go AST analysis, and additional committed-key, entropy, dependency, FIPS, and profile families. A sample is below; ciphermap rule --list enumerates every rule ID the scanner can emit, and ciphermap rule <id> documents each one with severity guaranteed to match scan output.
| Rule ID | Target Primitive | Severity |
|---|---|---|
| PQC-GO-AST-001 | Deprecated primitive import (crypto/md5, crypto/sha1, crypto/rc4, crypto/des) | CRITICAL |
| PQC-GO-AST-007 | RSA modulus ≤ 3072 bits at rsa.GenerateKey call site | HIGH |
| PQC-KEY-001 | PEM private key committed to the repository | CRITICAL |
| PQC-PYTHON-009 | Deprecated hash primitive (hashlib.md5 / hashlib.sha1) | CRITICAL |
| PQC-JAVASCRIPT-002 | RSA usage (generateKeyPairSync('rsa'), RS256/384/512) | HIGH |
| PQC-ENTROPY-001 | Weak PRNG where cryptographic entropy is required (math/rand, Math.random) | HIGH |
| PQC-IAC-001 | Legacy TLS protocols/ciphers in server configuration | CRITICAL |
| PQC-STATE-002 | LMS/XMSS stateful signatures without visible OTS state tracking | HIGH |