Capabilities / Cryptography and post-quantum
Inventory cryptography in code (post-quantum readiness)
What it checks
Scan a zip or tar.gz of source code for cryptographic algorithms and libraries in Python, JavaScript/TypeScript, Go, Java/Kotlin, C/C++, Rust, C#, Ruby and PHP, plus keys and certificates in the tree. Flags broken algorithms (MD5, SHA-1, DES, RC4, ECB) and quantum-vulnerable public-key use (RSA, ECDSA, ECDH, DH, Ed25519), and notes post-quantum algorithms already in use. Returns findings and a CycloneDX 1.6 cryptography bill of materials (CBOM).
In the example run below, the report listed what it checked:
- 2 source files in python
- PEM keys and certificates anywhere in the tree
What it does not check
Every report lists this in coverage.not_checked. In the example run:
- Cryptography inside dependencies and binaries
- TLS settings chosen at runtime or in config files
- Data flow (whether a hit is security-relevant)
- Directories .git, .venv, __pycache__, build, dist, node_modules, target, third_party, vendor, venv
A clean result means these checks found nothing. It does not mean the target is secure.
Input
| Field | Type | Required | Meaning |
|---|---|---|---|
file | file id | yes | A .zip or .tar.gz of source code |
Output: A findings report (schema security-findings/v1). One artifact: cbom.cdx.json (CycloneDX 1.6).
Price
$0.001 per MB scanned, at least $0.005 and at most $0.25 per run. The most one run can cost is $0.25, so pass max_usd of at least 0.25. That amount is held while the run works; you pay the actual charge and the rest returns to your balance. Failed runs are free. Time limit: 300 seconds.
Call it
REST
# 1. Upload a zip or tar.gz (git archive includes only tracked files)
git archive --format=zip HEAD -o repo.zip
FILE=$(curl -s "https://api.brainbacked.com/v1/files?name=repo.zip" \
-H "Authorization: Bearer $BRAINBACKED_API_KEY" \
-H "content-type: application/zip" --data-binary @repo.zip | jq -r .id)
# 2. Run the check on it
curl -s https://api.brainbacked.com/v1/runs \
-H "Authorization: Bearer $BRAINBACKED_API_KEY" \
-H "content-type: application/json" \
-d '{
"capability": "crypto.inventory",
"input": {"file":"'"$FILE"'"},
"max_usd": 0.25
}'
MCP tool calls
upload_file {"name":"repo.zip","content_base64":"<base64 of the archive>"}
run {
"capability": "crypto.inventory",
"input": {
"file": "<file_id from upload_file>"
},
"max_usd": 0.25
}
Example response
A real run, recorded 2026-12-04 01:25 UTC. The request input was {"file":"file_lhJdT1Zxf1kI0KFIPRBbxRP3"}.
| Severity | Finding | Where | Fix |
|---|---|---|---|
| high | MD5 used in 1 file(s) (broken today)app/crypto_utils.py:6: return hashlib.md5(data).hexdigest() | app/crypto_utils.py:6CWE-327 | Use SHA-256 or SHA-3 for integrity; for passwords use Argon2id, scrypt or bcrypt. |
| low | RSA used in 1 file(s) (vulnerable to future quantum computers)app/crypto_utils.py:10: return rsa.generate_private_key(public_exponent=65537, key_size=2048) | app/crypto_utils.py:10 | Plan migration: ML-KEM (FIPS 203) for key establishment, ML-DSA (FIPS 204) for signatures, hybrid with the classical algorithm during transition. |
Checked
- 2 source files in python
- PEM keys and certificates anywhere in the tree
Not checked
- Cryptography inside dependencies and binaries
- TLS settings chosen at runtime or in config files
- Data flow (whether a hit is security-relevant)
- Directories .git, .venv, __pycache__, build, dist, node_modules, target, third_party, vendor, venv
Automated checks with stated coverage. A clean result means these checks found nothing, not that the target is secure.
Raw JSON response
{
"id": "run_cMv0OAVOwC9cz0ArggAr",
"capability": "crypto.inventory",
"version": 1,
"status": "succeeded",
"output": {
"schema": "security-findings/v1",
"capability": "crypto.inventory",
"target": "demo.zip",
"generated_at": "2026-12-04T01:25:08.387975Z",
"coverage": {
"checked": [
"2 source files in python",
"PEM keys and certificates anywhere in the tree"
],
"not_checked": [
"Cryptography inside dependencies and binaries",
"TLS settings chosen at runtime or in config files",
"Data flow (whether a hit is security-relevant)",
"Directories .git, .venv, __pycache__, build, dist, node_modules, target, third_party, vendor, venv"
]
},
"summary": {
"critical": 0,
"high": 1,
"medium": 0,
"low": 1,
"info": 0,
"unknown": 0
},
"findings": [
{
"id": "fnd_c0022cade3acbdb3",
"kind": "weak_crypto",
"title": "MD5 used in 1 file(s) (broken today)",
"severity": "high",
"severity_basis": "broken algorithm: practical attacks exist",
"confidence": "medium",
"basis": "pattern",
"asset": {
"type": "repository",
"ref": "demo.zip"
},
"location": {
"path": "app/crypto_utils.py",
"line": 6
},
"evidence": [
"app/crypto_utils.py:6: return hashlib.md5(data).hexdigest()"
],
"source": {
"engine": "cryptoscan",
"engine_version": "1",
"rule": "md5"
},
"identifiers": [
"CWE-327"
],
"remediation": {
"summary": "Use SHA-256 or SHA-3 for integrity; for passwords use Argon2id, scrypt or bcrypt.",
"action": "replace_algorithm"
},
"references": [],
"limitations": [
"Pattern match on source text, not data flow: a hit can be a test, a comment or a compatibility path. MD5/SHA-1 used for non-security checksums are fine but still listed."
]
},
{
"id": "fnd_412741d2bcd2bb35",
"kind": "quantum_vulnerable",
"title": "RSA used in 1 file(s) (vulnerable to future quantum computers)",
"severity": "low",
"severity_basis": "quantum-vulnerable, no practical attack today; matters for data that must stay secret or authentic for years",
"confidence": "medium",
"basis": "pattern",
"asset": {
"type": "repository",
"ref": "demo.zip"
},
"location": {
"path": "app/crypto_utils.py",
"line": 10
},
"evidence": [
"app/crypto_utils.py:10: return rsa.generate_private_key(public_exponent=65537, key_size=2048)"
],
"source": {
"engine": "cryptoscan",
"engine_version": "1",
"rule": "rsa"
},
"identifiers": [],
"remediation": {
"summary": "Plan migration: ML-KEM (FIPS 203) for key establishment, ML-DSA (FIPS 204) for signatures, hybrid with the classical algorithm during transition.",
"action": "replace_algorithm"
},
"references": [
"https://csrc.nist.gov/projects/post-quantum-cryptography"
],
"limitations": [
"Pattern match on source text, not data flow: a hit can be a test, a comment or a compatibility path. MD5/SHA-1 used for non-security checksums are fine but still listed."
]
}
],
"facts": {
"files_scanned": 2,
"languages": {
"python": 2
},
"algorithms": {
"MD5": 1,
"RSA": 1
},
"post_quantum_in_use": [],
"quantum_vulnerable_in_use": [
"RSA"
],
"key_and_cert_files": [],
"readiness": "quantum-vulnerable public-key cryptography in use, no post-quantum algorithms found"
},
"notice": "Automated checks with stated coverage. A clean result means these checks found nothing, not that the target is secure."
},
"artifacts": [
{
"file_id": "file_bJoDD7W4G4buxZ947Kq6n562",
"name": "cbom.cdx.json",
"content_type": "application/json",
"size": 1352,
"expires_at": "2026-12-11T01:25:08.498Z"
}
],
"cost_usd": 0.005,
"max_cost_usd": 0.25,
"error": null,
"created_at": "2026-12-04T01:25:08.110Z",
"finished_at": "2026-12-04T01:25:08.813Z",
"duration_ms": 600
}Data and network
Reads only the files you upload. Runs in an isolated container with no internet access. Each account gets its own container. Archives are unpacked with limits on paths, file types, file counts and sizes, and the code inside is never run.
Nothing you send leaves our servers. Uploaded files and result files are deleted after 7 days. Customer data is never used to train models.
License basis: Our code (pattern rules written by us).