CipherMap Documentation
Command reference for the CipherMap CLI: 12-language Post-Quantum Cryptography (PQC) scanning, preflight readiness, Gate 2 AST remediation, compliance profiles, CycloneDX 1.6 CBOM export, air-gapped vaults, and the Tier B Enterprise 12-Language Immunity Engine (immunity, mcp, CycloneDX 1.6 CISA IBOM). Access is explicit throughout: Free covers 12-language PQC discovery (scan), PQC preflight, fix --dry-run PQC previews, offline signature/proof verification, herd-immunity, and demo; Tier A Standalone Auditor ($4,999/yr + 7-day Pro Trial) produces PQC readiness evidence (signed CBOM, SPDX 2.3, PQC OpenVEX 0.2.0, compliance profiles, Gate 2 PQC fix --apply, and air-gapped vaults); and Tier B Enterprise Fleet ($9,999–$49,999/yr) unlocks the complete 12-Language Immunity Engine (immunity scan, 4-Gate extinguish --apply, fix --with-immunity --apply, signed CISA IBOM via immunity attest, ciphermap mcp, emit-agent-rules, monotonic ratchet, PR bots, and server). Command behavior is verifiable against the exact build under evaluation — ciphermap <command> --help is the same source of truth.
preflight, immunity, mcp, --with-immunity) or tierciphermap scan . --fail-on high --format sarifFree12-language PQC vulnerability discovery & CI failure gate with SARIF 2.1.0 output
ciphermap preflight . --exclude-vendoredFreeRead-only PQC readiness scorecard (Free/Tier A) + unified PQC & Immunity pre-migration shield (Tier B)
ciphermap fix . --dry-runFreePreview PQC remediation diffs & --immunity-precheck safety warnings without touching disk
ciphermap cbom . -o cbom.cdx.jsonTier ASigned CycloneDX 1.6 CBOM, SPDX 2.3 & PQC OpenVEX 0.2.0 inventory export
ciphermap report . --omb-m23-02 --cmmcTier A12-language SAST/AST report with OMB M-23-02 inventory separation & CMMC 2.0 controls
ciphermap fix . --zero-attestation --applyTier AApply Gate 2 compiler-verified classical crypto AST hash and cipher upgrades
Company evaluation readiness
Start with the downloadable evaluation package and its known fixture. The 7-day Pro trial covers one repository; a guided enterprise pilot is scoped separately. Evaluation-package availability is distinct from the general installer’s signed-release promotion. Verify updates against the published package checksums.
Use the exact binary's --help output as command truth. Pending or unavailable commands are not promises of current support.
Complete a task and verify your result in one command
Your first scan
Done when: Prints 'Scanned 4 file(s)' and writes scan.json with coverage_status: 'complete'.
If exit code is 2, check scan.json 'errors' array for unreadable or syntax-broken files.
Understand your findings
Done when: Shows NIST SP 800-53 controls and separates Tier 1 mechanical rewrites from Tier 3 blueprints.
If a rewrite is declined, run 'ciphermap fix ./sample-vault --explain --offline --no-telemetry' to see the semantic safety boundary.
Generate your first CBOM
Done when: Emits CycloneDX 1.6 JSON (specVersion: '1.6') with detected cryptoProperties; undetermined fields are omitted.
Requires a 7-Day Pro Trial Key (Tier A). Free builds emit scan.json and SARIF 2.1.0.
Add a CI gate
Done when: Exits 0 when no HIGH/CRITICAL findings exist; exits 1 on policy violation; exits 2 on parse error.
Use --diff --diff-base origin/main with a trusted base and sufficient Git history to scan committed changed lines. Confirm scope before gating.
Quick Start
Audit a repository locally — your source never leaves the machine. The Free scan path requires no CipherMap account or backend. Use --offline and --no-telemetry where your policy requires explicit controls; those flags do not claim a universal OS-level no-egress proof.
Start with the native Evaluation Pack
Download the package for your operating system, check its SHA-256, then scan sample-vault with explicit offline controls. The package’s free scan and preview commands work without a license. Commercial features require a compatible trial or paid credential.
Open the offline fixture quickstart →Signed Offline Evaluation Pack
Signed public installer downloads (/install.sh) remain staged while SHA-256-verified native evaluation binaries are available on /eval-pack. CipherMap ships static native executables (CGO_ENABLED=0) signed with Apple Developer ID (ZLF7244KA7) on macOS and Microsoft Authenticode on Windows, paired with SHA-256 archive checksums and an embedded Ed25519 .text tamper seal. Proprietary CipherMap Go source code is never distributed.
eval_zip="ciphermap-customer-eval-pack.zip" # 1. Verify published SHA-256 checksum & Apple Developer ID (ZLF7244KA7) signature: shasum -a 256 "$eval_zip" unzip -qo "$eval_zip" codesign --verify --deep --strict --verbose=2 ./customer-eval-pack/ciphermap # 2. Verify embedded Ed25519 .text tamper seal & run Free 100% offline PQC scan, preflight & demo sandbox: ./customer-eval-pack/ciphermap doctor --offline --no-telemetry --color never ./customer-eval-pack/ciphermap scan ./customer-eval-pack/sample-vault --offline --no-telemetry ./customer-eval-pack/ciphermap preflight ./customer-eval-pack/sample-vault --offline ./customer-eval-pack/ciphermap demo
See /eval-pack for current per-platform SHA-256 digests across macOS, Linux, and Windows (x64 & ARM64), evaluation terms, and the Standard 2-Page Enterprise Order Form. Unlicensed runs expose Free PQC discovery (scan, preflight, fix --dry-run, demo); signed 7-day Pro Trial (Tier A) credentials unlock CycloneDX 1.6 CBOM & compliance profiles via ciphermap auth, and Tier B Enterprise Fleet leases unlock ciphermap immunity scan ., 4-Gate extinguish, CISA IBOM, and ciphermap mcp.
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 v1.0.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 --offline --no-telemetry
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.
Access: The credential’s signed claims determine its tier, expiry, and permitted scope. See the current pricing and trial terms for the commercial plan that fits your evaluation.
Build boundary: The signed offline evaluation binary accepts compatible signed Tier A trial and commercial credentials; unlicensed runs expose Free discovery capabilities only. Inspect ciphermap version --format json before activating a key.
ciphermap auth --offline --no-telemetry # Paste the key at the hidden prompt
▶ View Ed25519 Licence Key & Zero-PII PRF_seat Nullifier Specification
Format: CIPHERMAP-<TIER>-<BASE64URL_PAYLOAD>.<ED25519_SIGNATURE>
Payload Claims: { "version": 2, "customer_id": "cust_9823", "tier": "TEAM", "issued_at": 1774000000, "expires_at": 1805500000, "seats": 1, "tier_cek": "<43-char-base64url-cek>" }
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.
Zero-PII Seat Nullifier (Enterprise): PRF_seat = BLAKE2b-256("CM_SEAT_NULLIFIER_V1" || OrgCommitment || SeatSecret || Epoch) with BlindedEntitlementCert so air-gapped runners enforce seat caps without leaking organizational identity.
2b. Workspace Setup (demo, init, hook, license, config, test) & Exit Codes
Free · Setup, Self-Test & CI Exit ContractProvision a disposable local sandbox with ciphermap demo, initialize repository defaults and Git pre-commit gating with ciphermap init and ciphermap hook, inspect active entitlements via ciphermap license, and run the built-in offline verification suite with ciphermap test.
| Exit Code | Meaning | CI / Automation Behavior |
|---|---|---|
| 0 | Clean / Verified | Complete scan coverage and zero findings at or above the configured --fail-on threshold. |
| 1 | Policy Gate Tripped | One or more findings met the --fail-on severity gate or monotonic immunity ratchet check. |
| 2 | Incomplete Coverage / Error | Fail-closed on corrupted archives, unreadable files (coverage_status: incomplete), invalid flags, or missing entitlement. Never passes silently. |
ciphermap demo # provision synthetic multi-language sandbox & run guided tour ciphermap init # generate .ciphermap.yaml & optional local Git pre-commit hook ciphermap hook install # install or refresh local Git pre-commit PQC & secret gate ciphermap license --format json # inspect active tier, seat cap, expiry & unlocked capabilities ciphermap config # show effective configuration and source precedence ciphermap test --offline --no-telemetry # run built-in offline scanner & verifier self-test suite
2c. ciphermap update & ciphermap version
Free · Explicit SHA-256 & Ed25519 Verified UpgradeZero background phone-home: During ciphermap scan, fix, or cbom, the CLI never polls an update server in the background—preserving strict air-gap and zero-egress compliance. When you explicitly run ciphermap update --check, the terminal checks the signed release manifest and prints a notice if a newer release or rulepack is available; running ciphermap update verifies the archive SHA-256 and Ed25519 signature before performing an atomic binary swap.
ciphermap version --format json # inspect binary version, commit & embedded Ed25519 public key ciphermap update --check # check signed release manifest & print terminal update notice ciphermap update # verify SHA-256 + Ed25519 signature & perform atomic upgrade
Core Scanning & Remediation Studio
3. ciphermap scan [dir]
12-Language SAST, AST, Bytecode & HSM ScannerScans all 12 supported programming languages (Go, Python, JavaScript, TypeScript, Java, Kotlin, C#, Rust, C/C++, Ruby, PHP, Swift), including a Go AST scanner that inspects imports and call sites and extracts literal RSA key-size arguments from supported rsa.GenerateKey calls (101+ total rules; enumerate via ciphermap scan --list-rules). Text summaries distinguish classical hygiene and post-quantum migration concerns. Review weak hashes, legacy ciphers, weak RNG, and committed keys separately from quantum-vulnerable asymmetric targets such as RSA, ECDSA, ECDH, and Ed25519.
Opt-in --include-archives inspects supported .jar/.war/.ear/.whl archives (PQC-ARCHIVE-*), .pem/.crt X.509 certs, and .jks/.p12 keystores.
OASIS PKCS#11 v3.2 CKM_ML_KEM / CKM_ML_DSA (PQC-HSM-001/002) and 3DES DUKPT PIN blocks (PQC-BANK-001).
Wire-incompatible Kyber, Dilithium, and SPHINCS+ drafts (PQC-PRE-*), plus TLS, SSH, JWT, K8s, IaC, and OSV manifests.
| CLI Flag | Behavior & Scope | Tier |
|---|---|---|
| --offline · --no-telemetry | Enforce zero network egress (OS-level socket guard) and disable all telemetry | FREE |
| --lang go,python · --rule PQC-* · --list-rules | Slice monorepos by language or rule ID prefix, or list all 101+ built-in rules | FREE |
| --include-archives · --agility | Inspect .jar/.war/.ear/.whl bytecode & .jks/.p12 keystores; compute decoupled vs hardcoded agility score | FREE |
| --diff --diff-base <git-ref> | Incremental PR delta scan across committed changed lines against a trusted base branch | FREE |
| --fail-on high · -f text|json|sarif · -o <file> | CI exit-code gate (0 clean, 1 gate tripped, 2 incomplete coverage/error), JSON & SARIF 2.1.0 output | FREE |
| --omb-m23-02 · --cmmc | Separates passive [OBSERVED] / [128-BIT CLASSICAL ASSET] inventory from active vulnerabilities; DoD CMMC 2.0 SC.L2-3.13.8/11 | TIER A+ |
| --target cnsa-2.0 | fips-140-3 | nist-sp-800-56b | bsi-tr-02102 | anssi-pqc | Sovereign and federal policy profile evaluation | TIER A+ |
ciphermap scan . --offline --no-telemetry --fail-on high --format sarif -o results.sarif ciphermap scan . --lang go,python --rule PQC-GO-AST --offline --no-telemetry ciphermap scan . --target cnsa-2.0 --offline --no-telemetry ciphermap report . --omb-m23-02 --cmmc --bsi-tr-02102 --offline --no-telemetry # Licensed profiles; actual findings and coverage depend on the selected repository.
4. ciphermap preflight [path]
Read-Only Readiness Scorecard & Pre-Migration ShieldHow it works: Runs a fast, strictly read-only readiness assessment across local language manifests (go.mod, package.json, pyproject.toml/requirements.txt, Cargo.toml, .csproj, pom.xml/build.gradle) and local compilers without mutating files. Categorizes findings into four actionable buckets: ready_for_auto_upgrade, co_hardening_recommended, architectural_or_mcp_assisted, and environment_setup_needed.
Access: Free & Tier A evaluate PQC cryptographic readiness and local toolchain prerequisites; Tier B Enterprise Fleet adds unified PQC + 12-Language Immunity Pre-Migration Safety Shield analysis to flag PQC call sites co-located in the same handler/scope as unguarded IMM-* sinks.
| CLI Flag | Behavior & Scope | Tier |
|---|---|---|
| -f, --format text | json | Human-readable scorecard or machine JSON (ciphermap.preflight/v1) | FREE |
| -o, --output <file> | Write preflight report to path | FREE |
| --exclude-vendored | Exclude third-party and vendored directories from readiness scan | FREE |
ciphermap preflight . --offline --no-telemetry ciphermap preflight ./services/api --exclude-vendored -f json -o preflight.json
5. ciphermap tui / ciphermap fix --studio
Interactive Terminal StudioHow it works: Full-screen Charmbracelet bubbletea/lipgloss TUI over your scan results: a findings list, per-rule explainer drawer with 12-language NIST FIPS 203 (ML-KEM-768) and FIPS 204 (ML-DSA-65) migration blueprints, planning views, candidate diffs, and a remediation studio (ciphermap fix . --studio).
Access: Read-only inspection and proposal preview are Free. Ctrl+E encrypted vault export requires Tier A+. Source actions require a compatible entitlement, eligibility, and the relevant project-verification setup.
ciphermap tui . --offline --no-telemetry # interactive findings & FIPS 203/204 blueprint viewer ciphermap fix . --studio --offline --no-telemetry # interactive Gate 2 remediation studio (Tier B)
▶ View TUI Keymap Reference Table
| Keybinding | Action |
|---|---|
| e / ? | Toggle explainer & 12-language NIST FIPS 203/204 blueprint drawer |
| m | Toggle migration timeline estimator |
| enter | Toggle diff & hybrid KEM sidecar preview for the selected finding |
| a | Inspect candidate remediation; apply depends on entitlement and verification |
| ctrl+e | Export AES-256-GCM encrypted vault (Tier A+; requires CIPHERMAP_VAULT_PASSPHRASE) |
| q / ctrl+c | Quit |
6. ciphermap fix & --with-immunity
Candidate Plans, Gate 2 PQC & Co-RemediationStart with a preview: Dry-run lists candidate plans and decline reasons without modifying files. Use --patch to inspect candidate diffs and --blueprint for migration guidance. By default, --immunity-precheck (true) runs the Pre-Migration Safety Shield on PQC target files and warns when PQC call sites share an enclosing handler/scope with unguarded IMM-* bug classes. Eligibility varies by language, call shape, module format, and persistence or protocol context.
Before applying: Gate 2 classical PQC --apply requires Tier A (Standalone Auditor) or Tier B, a trusted repository, discoverable project verification, and explicit --allow-verify-exec consent. Passing --with-immunity with --apply requires Tier B Enterprise Fleet (immunity.extinguish + remediation.write) on a clean Git worktree, committing 4-Gate verified Immunity fixes first and running the Gate 2 PQC transaction on top. A syntax check is different from compiling or passing application tests; review the selected verifier and its output.
| CLI Flag | Behavior & Verification Scope | Tier |
|---|---|---|
| --dry-run · --patch · --blueprint · --explain | Preview candidate diffs, 12-language FIPS 203/204 blueprints, and semantic decline reasons without modifying files | FREE |
| --zero-attestation --apply --allow-verify-exec | Gate 2 classical AST hash/cipher remediation verified against local compiler & tests with automatic rollback | TIER A+ |
| --with-immunity --apply --allow-verify-exec | Unified single-pass 4-Gate Immunity pre-hardening + Gate 2 PQC migration on a clean Git worktree | TIER B |
ciphermap fix . --dry-run --offline --no-telemetry ciphermap fix . --patch --offline --no-telemetry ciphermap fix . --blueprint --offline --no-telemetry # Tier A+: Gate 2 classical crypto remediation after reviewing eligibility & project verification: ciphermap fix . --zero-attestation --apply --allow-verify-exec --offline --no-telemetry # Tier B Enterprise: single-pass 4-Gate Immunity pre-hardening + Gate 2 PQC migration: ciphermap fix . --with-immunity --apply --allow-verify-exec --offline --no-telemetry
7. ciphermap immunity
Tier B Enterprise · 12-Language Bug-Class ExtinctionOperationalizes the CISA Secure-by-Design Pledge across all 12 supported languages (Go, TypeScript, JavaScript, Python, Java, Kotlin, C#, Rust, C/C++, Ruby, PHP, and Swift) for 6 structural vulnerability classes: IMM-SQLI-001, IMM-PATH-001, IMM-CMD-001, IMM-BOUND-001, IMM-DESER-001, and IMM-AUTH-001 (AutoExtinguish: false; routed to ciphermap mcp).
Commercial tier boundary: Discovering AppSec vulnerabilities (immunity scan), applying 4-Gate compiler-verified AST patches (immunity extinguish --apply), generating CycloneDX 1.6 CISA IBOM & OpenVEX 0.2.0 (immunity attest), enforcing monotonic policy ratchets (immunity ratchet), and writing IDE agent guardrails (immunity emit-agent-rules --write) require Tier B Enterprise Fleet. Offline proof and attestation verification (extinguish --verify-proof, attest --verify) and the self-contained ciphermap demo sandbox run Free without a paid credential.
| Subcommand | Verified CLI Flags | Tier |
|---|---|---|
| immunity scan [path] | -f/--format text|json|sarif, --fail-on info|low|medium|high|critical|none, -o/--output <file>, --rule <ids>, --lang <langs> | TIER B |
| immunity extinguish [path] | --apply, --proof-out <file>, --verify-proof <file> (Free offline verify), --rule <id>, --race (default true), -f/--format text|json | TIER B / FREE VERIFY |
| immunity attest [path] | --out-dir <dir> (ibom.cdx.json, ibom.openvex.json, ibom.pqc.sig), --proof <file>, --verify <dir> (Free offline verify), --expected-ed25519-pub <hex>, -f/--format text|json | TIER B / FREE VERIFY |
| immunity ratchet [path] | --init, --stage <stage_0_observe..stage_3_class_extinct>, --advance <stage>, --rule <id|*>, --evaluate, --proof <file>, --org-policy <file>, -f/--format text|json | TIER B |
| immunity emit-agent-rules [path] | --write (writes .cursor/rules/ciphermap-immunity.mdc & updates CLAUDE.md), -f/--format text|json | TIER B |
# Tier B Enterprise Fleet workflow: ciphermap immunity scan . --fail-on high --format sarif -o immunity.sarif ciphermap immunity extinguish . --apply --proof-out proof-bundle.json ciphermap immunity attest . --proof proof-bundle.json --out-dir ./attest ciphermap immunity ratchet . --init --stage stage_1_diff_extinct ciphermap immunity emit-agent-rules . --write # Free offline auditor verification (no paid license required): ciphermap immunity extinguish --verify-proof ./proof-bundle.json ciphermap immunity attest --verify ./attest
Before & After: Tier A AST Autofix vs. Tier B Hybrid ML-KEM-768 Sidecars
Select a language family below to inspect how CipherMap upgrades deprecated digests/ciphers in Tier A (--zero-attestation --apply) and generates compile-verified ML-KEM-768 + X25519 hybrid KEM sidecars in Tier B (--hybrid --blueprint --apply).
1. Vulnerable Source (Detected)
// Flagged: PQC-GO-AST-001 (crypto/sha1) & PQC-GO-AST-007 (RSA-2048 < 3072 bits) h := sha1.New() privKey, err := rsa.GenerateKey(rand.Reader, 2048)
2. Tier A Deterministic AST Autofix
// Tier A (ciphermap fix . --zero-attestation --apply) // Deterministic AST upgrade + Gate 2 go vet/build check h := sha256.New() privKey, err := rsa.GenerateKey(rand.Reader, 3072)
3. Tier B Hybrid ML-KEM-768 Sidecar
// Tier B (ciphermap fix . --hybrid --blueprint --apply) // Generated sidecar: pqc_hybrid_kem.go (FIPS 203 ML-KEM-768 + X25519) dk, err := mlkem.GenerateKey768() sharedPQ, ct := dk.EncapsulationKey().Encapsulate() combinedSecret := hkdfSHA256(append(sharedX25519, sharedPQ...), "CipherMap-Hybrid-KEM-v1")
Measure Your Evaluation
Record the binary version, ruleset, scan options, hardware, files scanned, duration, and coverage errors. Compare the same repository snapshot and options across runs. Fixture timings do not predict a production repository’s runtime, and a clean scan does not verify that generated code compiles or passes application tests.
ciphermap version --format json ciphermap scan . --offline --no-telemetry --format json -o scan.json
NIST PQC Code Migration Reference Table
Algorithm families to consider during a protocol-specific migration. These are not interchangeable APIs or a guarantee of regulatory compliance.
| Legacy / Pre-Standard Routine | NIST PQC Replacement Standard | Primary Use Case |
|---|---|---|
| RSA-2048 / RSA-4096 / ECDH / X25519 | ML-KEM (FIPS 203); hybrid construction depends on the protocol | General Key Encapsulation & Hybrid TLS/KEM Exchange |
| ECDSA / Ed25519 / RSA-PSS Signatures | NIST FIPS 204 (ML-DSA-65 / ML-DSA-87) | Digital Signatures, Certificates & Artifact Attestation |
| Pre-Standard Kyber / Dilithium / SPHINCS+ | Final FIPS 203 (ML-KEM) / FIPS 204 (ML-DSA) / FIPS 205 (SLH-DSA) | Review version and wire compatibility before upgrading |
| Stateful Signatures (LMS / XMSS) | NIST FIPS 205 (SLH-DSA) | Stateless alternative where protocol and requirements permit |
Compliance Reports & Bill of Materials
8. ciphermap report & verify-report
HTML Rollup Reports & .pqc.sig AttestationGenerate an executive or technical HTML report with scope and coverage evidence. Control mappings support readiness review and are not a compliance assessment.
Ed25519 signing: Provision the organization-controlled hex-encoded seed/private key in CIPHERMAP_ATTESTATION_KEY through your secret-management process. --attest creates a detached .sig over the report bytes.
Auditor trust: Obtain the organization’s public-key file (CipherMap Ed25519 public-key v1 format) and fingerprint through a separate authenticated channel. The key included with the report is not a trust anchor. Verification authenticates bytes, not conclusions.
Optional PQC provenance: --pqc-attest additionally requires provisioned --pqc-cert and --pqc-device-key material; ordinary --attest does not create a PQC signature. Report generation requires Tier A or B. Detached report verification is free.
# Prerequisites: signing key configured; auditor trust key authenticated separately. ciphermap report . --style executive --attest -o board-report.html --offline --no-telemetry ciphermap verify-report board-report.html --signature board-report.html.sig --trusted-public-key org-report-signing.pub --offline --no-telemetry
9. ciphermap cbom
CycloneDX 1.6 CBOM, SPDX 2.3 & OpenVEXExport detected cryptographic assets as CycloneDX 1.6 with cryptoProperties, or select SPDX/OpenVEX. Unknown fields are omitted and coverage limits still apply.
Bundle integrity: --bundle --output audit.zip packages the documents with an HMAC-SHA256 manifest. Configure an organization-controlled CIPHERMAP_SIGNING_KEYand use the same secret for verification. HMAC is not a public-key digital signature.
Optional PQC bundle provenance: Supply both --pqc-cert and --pqc-device-key using separately provisioned credentials. A license alone does not configure signing or verifier trust. Local generation, posture comparison, and bundles require Tier A; configured Dependency-Track delivery requires Tier B.
ciphermap cbom . --format cyclonedx --output cbom.json --offline --no-telemetry # Bundle creation and verification use the same configured CIPHERMAP_SIGNING_KEY: ciphermap cbom . --bundle --output audit.zip --offline --no-telemetry ciphermap cbom --verify audit.zip --offline --no-telemetry ciphermap cbom --diff baseline-cbom.json,release-cbom.json --output cbom-diff.json --offline --no-telemetry
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"Workspace Config (.ciphermap.yaml) & Rule / Catalog Inspection
Store repository-wide defaults in .ciphermap.yaml (generated via ciphermap init or passed via --config), and use ciphermap explain, ciphermap rule, ciphermap catalog, and ciphermap integrate to inspect offline remediation guidance, decline guardrails, 12-language PQC library support, and CI/CD templates.
# .ciphermap.yaml — workspace configuration read automatically by scan, fix, cbom & report offline: true no_telemetry: true target: "cnsa-2.0" # cnsa-2.0 | fips-140-3 | nist-sp-800-56b | bsi-tr-02102 | anssi-pqc min_severity: "low" # info | low | medium | high | critical fail_on: "high" # CI exit-code 1 threshold include_tests: false exclude: - "vendor/**" - "node_modules/**" - "testdata/**" # Offline Rule, Decline, Library Catalog & CI Template Inspection (Free): ciphermap explain PQC-GO-AST-007 ciphermap explain declined_protocol_guardrail ciphermap rule --list ciphermap catalog --format json ciphermap integrate github-actions
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
10. 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.
# Configure CIPHERMAP_VAULT_PASSPHRASE through your secret-management process (16+ characters). ciphermap export . --output vault.enc --offline --no-telemetry
11. 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.
# Requires the vault passphrase supplied via CIPHERMAP_VAULT_PASSPHRASE. ciphermap import vault.enc --output ./audit --offline --no-telemetry
12. 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 --offline --no-telemetry
Vault & HPKE Policy Capsule Binary Layout
On-disk framing of an exported airgap vault package and hybrid HPKE rule capsules.
Airgap Vault: [ 16-Byte Random Salt ] [ 12-Byte GCM Nonce ] [ AES-256-GCM Encrypted Zip Payload + 16-Byte Tag ]
Vault Key Derivation: Key = PBKDF2-HMAC-SHA256(Passphrase, Salt, 10000 iterations, 32 bytes)
HPKE Policy Capsule (pkg/sdk/capsule): Hybrid ML-KEM-768 (FIPS 203) + X25519 KEM combined via HKDF-SHA256 ("CipherMap-Capsule-v1-Hybrid-KEM") with restricted local keystore wrapping (Unix mode 0600 / optional external KMS or HSM key-provider command) and runtime anti-debugging integrity checks.
Provenance Companion (.pqc.sig): Composite Ed25519 + ML-DSA-65 (FIPS 204) signature over SHA-256 artifact digest with optional RFC 3161-style PQC TSA countersignature.
Signed Rule Snapshot (ciphermap-pqc-rule-snapshot-v1): Composite Ed25519 + ML-DSA-65 signed dynamic rule bundle + sorted zero-PII PRF_seat nullifier revocation list for air-gapped policy distribution.
Local MCP Referee, IDE LSP, CI & Herd Immunity
13. ciphermap mcp [workspace]
Tier B Enterprise · Zero-Egress Stdio MCP RefereeStarts CipherMap's 100% local, zero-network-egress Model Context Protocol (MCP) JSON-RPC 2.0 server over stdio (supporting both newline-delimited and Content-Length framing across Claude Code, Cursor, Windsurf, and IDE agents). Confines workspace access to --workspace <dir> via os.OpenRoot, enforces offline/no-telemetry mode automatically, and executes candidate verification inside an ephemeral copy within an OS network-denied sandbox (25-second verification budget per call; live workspace files are never mutated).
Enumerate PQC + 12-language Immunity findings and required safe primitives.
Retrieve offline NIST FIPS / CWE contracts and before/after examples.
Test candidate edits inside an ephemeral offline sandbox and return structured counterexamples.
Verify zero remaining target findings and validate Ed25519 + ML-DSA-65 ProofBundles.
# Register in Claude Code / Cursor / Windsurf MCP configuration (Tier B Enterprise):
{
"mcpServers": {
"ciphermap": {
"command": "ciphermap",
"args": ["mcp", "--workspace", "."]
}
}
}12-Language Server Protocol (LSP) Setup
CipherMap runs a JSON-RPC stdio language server (ciphermap lsp) across the supported languages, providing inline diagnostics (filtering passive inventory observations), hover documentation with NIST FIPS 203 (ML-KEM-768) and FIPS 204 (ML-DSA-65) migration blueprints, code actions, and code lenses. Point an LSP client at:
{
"name": "CipherMap LSP",
"command": "ciphermap",
"args": ["lsp"],
"filetypes": ["go", "python", "javascript", "typescript", "java", "kotlin", "csharp", "rust", "c", "cpp", "ruby", "php", "swift"]
}GitHub / GitLab / Bitbucket PR Review & Automated Jira Reconciliation
ciphermap ci-review runs the Tier B PR review bot for GitHub, GitLab, Azure DevOps, Bitbucket Cloud, or Bitbucket Server using idempotent [ciphermap-fingerprint:...] markers so repeated pipeline runs reconcile matching comments. Select the review domain with --domain crypto | immunity | all (default crypto) and attach composite-signed Vericoding evidence via --proof <proof-bundle.json> (auto-detected from .ciphermap-immunity-proof.json in persisted HEAD when present). Pair it on post-merge with ciphermap jira . --resolve-remediated --apply, which deduplicates open issues via ciphermap-fp-* labels and automatically transitions remediated findings to Done / Resolved. 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.
This connected example assumes an approved Linux x64 binary is provisioned at /opt/ciphermap/ciphermap on an isolated, trusted runner, a compatible Tier B credential, and provider permissions. Set the protected repository variable CIPHERMAP_BINARY_SHA256 to that binary’s independently verified digest. The general installer remains a separate release gate. Use this only for approved internal pull requests, not untrusted forks. It checks out the exact PR head with full history; configure a protected policy and base before enabling blocking mode.
name: CipherMap PR Review
on: [pull_request]
jobs:
review:
runs-on: [self-hosted, linux, x64, ciphermap-approved]
permissions:
contents: read
pull-requests: write
checks: write
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
persist-credentials: false
- name: Verify the provisioned binary
env:
CIPHERMAP_BINARY_SHA256: ${{ vars.CIPHERMAP_BINARY_SHA256 }}
run: |
[[ "$CIPHERMAP_BINARY_SHA256" =~ ^[a-fA-F0-9]{64}$ ]]
printf '%s /opt/ciphermap/ciphermap\n' "$CIPHERMAP_BINARY_SHA256" | sha256sum --check --status
- run: /opt/ciphermap/ciphermap ci-review . --provider github --pr ${{ github.event.number }} --domain all --mode blocking --fail-on critical
env:
GITHUB_TOKEN: ${{ github.token }}
CIPHERMAP_LICENSE: ${{ secrets.CIPHERMAP_LICENSE }}14. ciphermap herd-immunity (alias: herd)
Free · Strictly Opt-In Zero-Code AST ReceiptsInspect, list, and optionally share strictly bounded 6-field, 12-token closed-vocabulary AST skeleton receipts (.ciphermap/herd-patterns/HERD-*.json) when a polyglot edge-case declines automatic remediation. Every identifier name, string literal, numeric literal, comment, file path, and repository identity is stripped locally before disk persistence. Persistent flags: --workspace <dir> and -f, --format text | json.
# 1. Preview exact 6-field zero-code receipt locally (zero network egress): ciphermap herd-immunity preview ./src/db.rs --line 42 --rule IMM-SQLI-001 --compiler-code E0308 --no-save # 2. List queued local pattern receipts in .ciphermap/herd-patterns/: ciphermap herd-immunity list --format json # 3. Explicitly opt in to share a verified receipt: ciphermap herd-immunity share .ciphermap/herd-patterns/HERD-A1B2C3D4E5F6.json
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 . --server-url "$CIPHERMAP_SERVER_URL" # 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 (101+ PQC Rules & 6 Enterprise IMM-* Bug Classes Across 12 Languages)
The PQC scanner ships 73 signed dynamic rules across 11 regex-driven languages, plus Go AST analysis, pre-standard Round 3 PQC rules (PQC-PRE-001..005), configuration scanners (PQC-TLS-*, PQC-SSH-*, PQC-JWT-*, PQC-K8S-*, PQC-IAC-001 CRITICAL legacy TLS/IaC rules), committed-key, entropy, dependency, and sovereign profile families (101+ documented PQC rules in total). Alongside PQC, the Tier B Enterprise 12-Language Immunity Engine adds 6 structural vulnerability families (IMM-SQLI-001, IMM-PATH-001, IMM-CMD-001, IMM-BOUND-001, IMM-DESER-001, IMM-AUTH-001) across all 12 supported languages. ciphermap rule --list (or ciphermap scan --list-rules) enumerates every rule ID the scanner can emit, and ciphermap rule <id> documents each one with severity and remediation guidance. The exact finding and profile determine severity; examples still require application-specific review.
| Rule ID | Detected Primitive / Threat Vector | Standard | Severity | Guide |
|---|---|---|---|---|
IMM-SQLI-001TIER B | Dynamic SQL string interpolation or concatenation across 12-language DB drivers (AutoExtinguish: true) | CISA SbD · CWE-89 · SI-10 | CRITICAL | Blueprint |
IMM-PATH-001TIER B | Unjailed filesystem path traversal or symlink escape across polyglot I/O (AutoExtinguish: true) | CISA SbD · CWE-22 · AC-3 | CRITICAL | Blueprint |
IMM-CMD-001TIER B | Dynamic shell command execution (sh -c, shell=True, system, exec) across 12 languages (AutoExtinguish: true) | CISA SbD · CWE-78 · SI-10 | CRITICAL | Blueprint |
IMM-BOUND-001TIER B | Unbounded network/request/archive stream allocation without explicit byte cap (AutoExtinguish: true) | CISA SbD · CWE-770 · SC-5 | HIGH | Blueprint |
IMM-DESER-001TIER B | Unsafe polymorphic deserialization or permissive boundary decoding (AutoExtinguish: true in 11 langs) | CISA SbD · CWE-20 · SI-10 | MEDIUM | Blueprint |
IMM-AUTH-001TIER B | Unauthenticated or unguarded state-mutating endpoint / Server Action (AutoExtinguish: false · MCP Referee) | CISA SbD · CWE-306 · AC-3 | HIGH | Blueprint |
PQC-GO-AST-001 | Deprecated digest/cipher import (crypto/md5, crypto/sha1, crypto/rc4, crypto/des) | NIST SP 800-131A | CRITICAL | Blueprint |
PQC-GO-AST-007 | RSA modulus <= 3072 bits extracted at rsa.GenerateKey call site | CNSA 2.0 · FIPS 203 | HIGH | Blueprint |
PQC-PRE-001 | Pre-standard NIST Round 3 Kyber draft (wire-incompatible with final FIPS 203 ML-KEM) | NIST FIPS 203 | HIGH | Blueprint |
PQC-PRE-002 | Pre-standard NIST Round 3 Dilithium draft (migrate to final FIPS 204 ML-DSA) | NIST FIPS 204 | HIGH | Blueprint |
PQC-PRE-003 | Pre-standard SPHINCS+ Round 3 parameter set (migrate to final FIPS 205 SLH-DSA) | NIST FIPS 205 | HIGH | Blueprint |
PQC-HSM-001 | Classical PKCS#11 v2.40/v3.0 RSA/ECC/DH HSM mechanism (migrate to PKCS#11 v3.2 CKM_ML_KEM / CKM_ML_DSA) | OASIS PKCS#11 v3.2 | HIGH | Blueprint |
PQC-HSM-002 | Hardcoded PKCS#11 HSM PIN / static C_Login secret in source | PCI-DSS v4.0 · FIPS 140-3 | CRITICAL | Blueprint |
PQC-BANK-001 | Legacy payment-rail 3DES DUKPT / ISO 9564 Format 0/1/3 PIN block (migrate to AES-256 DUKPT & Format 4) | ANSI X9.24-3 · ISO 9564-1 | CRITICAL | Blueprint |
PQC-ARCHIVE-002 | Quantum-vulnerable RSA/ECDSA/DH JCA constant-pool reference inside compiled .jar/.war/.ear/.whl | CNSA 2.0 · OMB M-23-02 | HIGH | Blueprint |
PQC-ARCHIVE-003 | Embedded X.509 certificate or private key with classical RSA/ECDSA subject key inside archive | CNSA 2.0 · FIPS 204 | HIGH | Blueprint |
PQC-KEY-001 | PEM private key material committed directly to source control | NIST SP 800-57 | CRITICAL | Blueprint |
PQC-PYTHON-009 | Deprecated hash primitive (hashlib.md5 / hashlib.sha1) | NIST SP 800-131A | CRITICAL | Blueprint |
PQC-JAVASCRIPT-002 | Node/WebCrypto RSA keygen & RS256/RS384/RS512 JWT signing | FIPS 203 · FIPS 204 | HIGH | Blueprint |
PQC-ENTROPY-001 | Non-cryptographic PRNG used in security context (math/rand, Math.random, random.random) | NIST SP 800-90A | HIGH | Blueprint |
PQC-BSI-001 | BSI TR-02102-1 asymmetric key length & hybrid post-quantum policy violation | BSI TR-02102-1 | HIGH | Blueprint |
PQC-ANSSI-001 | ANSSI hybrid post-quantum transition & classical key-size requirement | ANSSI PQC Guide | HIGH | Blueprint |
PQC-IAC-001 | Legacy TLS 1.0/1.1 or weak cipher suite in Ingress / Nginx / Terraform / K8s manifest | NIST SP 800-52r2 | CRITICAL | Blueprint |
PQC-STATE-002 | Stateful hash-based signature (LMS / XMSS / XMSS^MT) without monotonic OTS state tracking | NIST SP 800-208 | HIGH | Blueprint |