pqaudit 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +180 -0
  3. package/dist/cli.d.ts +3 -0
  4. package/dist/cli.d.ts.map +1 -0
  5. package/dist/cli.js +69 -0
  6. package/dist/cli.js.map +1 -0
  7. package/dist/index.d.ts +7 -0
  8. package/dist/index.d.ts.map +1 -0
  9. package/dist/index.js +6 -0
  10. package/dist/index.js.map +1 -0
  11. package/dist/reporter/cbom.d.ts +8 -0
  12. package/dist/reporter/cbom.d.ts.map +1 -0
  13. package/dist/reporter/cbom.js +153 -0
  14. package/dist/reporter/cbom.js.map +1 -0
  15. package/dist/reporter/json.d.ts +3 -0
  16. package/dist/reporter/json.d.ts.map +1 -0
  17. package/dist/reporter/json.js +4 -0
  18. package/dist/reporter/json.js.map +1 -0
  19. package/dist/reporter/sarif.d.ts +7 -0
  20. package/dist/reporter/sarif.d.ts.map +1 -0
  21. package/dist/reporter/sarif.js +91 -0
  22. package/dist/reporter/sarif.js.map +1 -0
  23. package/dist/reporter/text.d.ts +3 -0
  24. package/dist/reporter/text.d.ts.map +1 -0
  25. package/dist/reporter/text.js +84 -0
  26. package/dist/reporter/text.js.map +1 -0
  27. package/dist/scanner/dependency-scanner.d.ts +3 -0
  28. package/dist/scanner/dependency-scanner.d.ts.map +1 -0
  29. package/dist/scanner/dependency-scanner.js +133 -0
  30. package/dist/scanner/dependency-scanner.js.map +1 -0
  31. package/dist/scanner/engine.d.ts +3 -0
  32. package/dist/scanner/engine.d.ts.map +1 -0
  33. package/dist/scanner/engine.js +109 -0
  34. package/dist/scanner/engine.js.map +1 -0
  35. package/dist/scanner/file-scanner.d.ts +5 -0
  36. package/dist/scanner/file-scanner.d.ts.map +1 -0
  37. package/dist/scanner/file-scanner.js +163 -0
  38. package/dist/scanner/file-scanner.js.map +1 -0
  39. package/dist/scanner/rules.d.ts +4 -0
  40. package/dist/scanner/rules.d.ts.map +1 -0
  41. package/dist/scanner/rules.js +25 -0
  42. package/dist/scanner/rules.js.map +1 -0
  43. package/dist/types.d.ts +102 -0
  44. package/dist/types.d.ts.map +1 -0
  45. package/dist/types.js +9 -0
  46. package/dist/types.js.map +1 -0
  47. package/package.json +62 -0
  48. package/rules/crypto-patterns.yaml +350 -0
@@ -0,0 +1,102 @@
1
+ /** Severity of a cryptographic finding */
2
+ export type Severity = "critical" | "high" | "medium" | "low" | "safe";
3
+ /** Category of cryptographic operation */
4
+ export type CryptoCategory = "kem" | "signature" | "hash" | "symmetric" | "protocol" | "kdf";
5
+ /** How the finding was detected */
6
+ export type DetectionMethod = "regex" | "ast" | "dependency" | "network";
7
+ /** Migration effort required */
8
+ export type MigrationEffort = "trivial" | "moderate" | "complex" | "breaking";
9
+ /** A single cryptographic finding in a codebase */
10
+ export interface Finding {
11
+ /** Unique rule ID that triggered this finding */
12
+ ruleId: string;
13
+ /** Human-readable description */
14
+ description: string;
15
+ /** Severity classification */
16
+ severity: Severity;
17
+ /** Cryptographic category */
18
+ category: CryptoCategory;
19
+ /** The algorithm or protocol identified */
20
+ algorithm: string;
21
+ /** Recommended PQC replacement */
22
+ replacement: string | null;
23
+ /** Migration effort estimate */
24
+ effort: MigrationEffort;
25
+ /** Source location */
26
+ location: FindingLocation;
27
+ /** How this was detected */
28
+ detectionMethod: DetectionMethod;
29
+ /** Confidence score 0.0-1.0 */
30
+ confidence: number;
31
+ }
32
+ export interface FindingLocation {
33
+ /** File path relative to scan root */
34
+ file: string;
35
+ /** Line number (1-indexed), if known */
36
+ line?: number;
37
+ /** Column number (1-indexed), if known */
38
+ column?: number;
39
+ /** The matched source text snippet */
40
+ snippet?: string;
41
+ }
42
+ /** A detection rule loaded from YAML */
43
+ export interface DetectionRule {
44
+ /** Unique rule identifier */
45
+ id: string;
46
+ /** Human-readable description */
47
+ description: string;
48
+ /** Severity when matched */
49
+ severity: Severity;
50
+ /** Cryptographic category */
51
+ category: CryptoCategory;
52
+ /** Algorithm name for display */
53
+ algorithm: string;
54
+ /** Recommended replacement */
55
+ replacement: string | null;
56
+ /** Migration effort */
57
+ effort: MigrationEffort;
58
+ /** Languages this rule applies to (empty = all) */
59
+ languages: string[];
60
+ /** Regex patterns to match */
61
+ patterns: string[];
62
+ }
63
+ /** Scan configuration */
64
+ export interface ScanConfig {
65
+ /** Root directory to scan */
66
+ target: string;
67
+ /** Output format */
68
+ format: "json" | "cbom" | "sarif" | "html" | "text";
69
+ /** Output file path (stdout if not set) */
70
+ output?: string;
71
+ /** File patterns to include */
72
+ include?: string[];
73
+ /** File patterns to exclude */
74
+ exclude?: string[];
75
+ /** Minimum severity to report */
76
+ minSeverity: Severity;
77
+ /** Scan dependencies */
78
+ scanDependencies: boolean;
79
+ /** Custom rules directory */
80
+ rulesDir?: string;
81
+ }
82
+ /** Scan result summary */
83
+ export interface ScanResult {
84
+ /** Timestamp of scan */
85
+ timestamp: string;
86
+ /** Target that was scanned */
87
+ target: string;
88
+ /** All findings */
89
+ findings: Finding[];
90
+ /** Summary statistics */
91
+ summary: ScanSummary;
92
+ }
93
+ export interface ScanSummary {
94
+ filesScanned: number;
95
+ findingsTotal: number;
96
+ bySeverity: Record<Severity, number>;
97
+ byCategory: Record<CryptoCategory, number>;
98
+ pqcReady: boolean;
99
+ }
100
+ /** Severity ordering for comparisons */
101
+ export declare const SEVERITY_ORDER: Record<Severity, number>;
102
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,MAAM,MAAM,QAAQ,GAAG,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC;AAEvE,0CAA0C;AAC1C,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,WAAW,GAAG,MAAM,GAAG,WAAW,GAAG,UAAU,GAAG,KAAK,CAAC;AAE7F,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/types.js ADDED
@@ -0,0 +1,9 @@
1
+ /** Severity ordering for comparisons */
2
+ export const SEVERITY_ORDER = {
3
+ critical: 0,
4
+ high: 1,
5
+ medium: 2,
6
+ low: 3,
7
+ safe: 4,
8
+ };
9
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AA6GA,wCAAwC;AACxC,MAAM,CAAC,MAAM,cAAc,GAA6B;IACtD,QAAQ,EAAE,CAAC;IACX,IAAI,EAAE,CAAC;IACP,MAAM,EAAE,CAAC;IACT,GAAG,EAAE,CAAC;IACN,IAAI,EAAE,CAAC;CACR,CAAC"}
package/package.json ADDED
@@ -0,0 +1,62 @@
1
+ {
2
+ "name": "pqaudit",
3
+ "version": "0.1.0",
4
+ "description": "Post-quantum cryptography readiness scanner. Finds quantum-vulnerable cryptography in your codebase and generates CycloneDX CBOM.",
5
+ "type": "module",
6
+ "bin": {
7
+ "pqaudit": "./dist/cli.js"
8
+ },
9
+ "main": "./dist/index.js",
10
+ "types": "./dist/index.d.ts",
11
+ "files": [
12
+ "dist",
13
+ "rules"
14
+ ],
15
+ "scripts": {
16
+ "build": "tsc",
17
+ "dev": "tsx src/cli.ts",
18
+ "test": "vitest",
19
+ "test:run": "vitest run",
20
+ "lint": "eslint src/",
21
+ "prepublishOnly": "npm run build"
22
+ },
23
+ "keywords": [
24
+ "pqc",
25
+ "post-quantum",
26
+ "cryptography",
27
+ "security",
28
+ "scanner",
29
+ "cbom",
30
+ "cyclonedx",
31
+ "quantum",
32
+ "audit",
33
+ "ml-kem",
34
+ "ml-dsa"
35
+ ],
36
+ "author": "PQCWorld",
37
+ "license": "MIT",
38
+ "homepage": "https://pqcworld.com",
39
+ "repository": {
40
+ "type": "git",
41
+ "url": "https://github.com/PQCWorld/pqaudit"
42
+ },
43
+ "bugs": {
44
+ "url": "https://github.com/PQCWorld/pqaudit/issues"
45
+ },
46
+ "engines": {
47
+ "node": ">=20.0.0"
48
+ },
49
+ "dependencies": {
50
+ "glob": "^11.0.0",
51
+ "yaml": "^2.7.0",
52
+ "chalk": "^5.4.0",
53
+ "commander": "^13.1.0"
54
+ },
55
+ "devDependencies": {
56
+ "@types/node": "^22.13.0",
57
+ "eslint": "^9.20.0",
58
+ "tsx": "^4.19.0",
59
+ "typescript": "^5.7.0",
60
+ "vitest": "^3.0.0"
61
+ }
62
+ }
@@ -0,0 +1,350 @@
1
+ # PQC Audit Detection Rules
2
+ # Each rule defines a pattern to detect quantum-vulnerable (or safe) cryptography
3
+ #
4
+ # Severity levels:
5
+ # critical - Broken by Shor's algorithm (RSA, ECC, DH key exchange/signatures)
6
+ # high - Weakened by Grover's algorithm (AES-128, small key sizes)
7
+ # medium - Already weak classically (MD5, SHA-1, 3DES)
8
+ # low - Safe but worth documenting for inventory
9
+ # safe - Already quantum-resistant (ML-KEM, ML-DSA, AES-256, SHA-256)
10
+
11
+ # =============================================================================
12
+ # CRITICAL: Quantum-vulnerable asymmetric cryptography (Shor's algorithm)
13
+ # =============================================================================
14
+
15
+ - id: RSA_KEY_GEN
16
+ description: "RSA key generation — all RSA key sizes are vulnerable to Shor's algorithm"
17
+ severity: critical
18
+ category: kem
19
+ algorithm: RSA
20
+ replacement: ML-KEM-768 (FIPS 203) for encryption, ML-DSA-65 (FIPS 204) for signatures
21
+ effort: complex
22
+ languages: []
23
+ patterns:
24
+ - "rsa\\.GenerateKey"
25
+ - "RSA\\.generate"
26
+ - "rsa_generate_key"
27
+ - "generateKeyPair\\s*\\(.*['\"]RSA['\"]"
28
+ - "KeyPairGenerator\\.getInstance\\s*\\(.*['\"]RSA['\"]"
29
+ - "crypto\\.generateKeyPairSync\\s*\\(.*['\"]rsa['\"]"
30
+ - "new\\s+RSAKeyGenParameterSpec"
31
+ - "RSA_generate_key_ex"
32
+ - "openssl_pkey_new.*RSA"
33
+
34
+ - id: RSA_ENCRYPT
35
+ description: "RSA encryption — vulnerable to quantum factoring"
36
+ severity: critical
37
+ category: kem
38
+ algorithm: RSA
39
+ replacement: ML-KEM-768 (FIPS 203)
40
+ effort: complex
41
+ languages: []
42
+ patterns:
43
+ - "RSA/ECB/"
44
+ - "RSA/NONE/"
45
+ - "RSAES-OAEP"
46
+ - "RSA_public_encrypt"
47
+ - "rsa\\.encrypt"
48
+ - "PKCS1_OAEP"
49
+ - "PKCS1_v1_5"
50
+ - "crypto\\.publicEncrypt"
51
+ - "crypto\\.privateDecrypt"
52
+
53
+ - id: RSA_SIGN
54
+ description: "RSA signature — vulnerable to quantum factoring"
55
+ severity: critical
56
+ category: signature
57
+ algorithm: RSA
58
+ replacement: ML-DSA-65 (FIPS 204)
59
+ effort: complex
60
+ languages: []
61
+ patterns:
62
+ - "SHA256withRSA"
63
+ - "SHA384withRSA"
64
+ - "SHA512withRSA"
65
+ - "RS256"
66
+ - "RS384"
67
+ - "RS512"
68
+ - "PS256"
69
+ - "PS384"
70
+ - "PS512"
71
+ - "RSASSA-PSS"
72
+ - "RSA_sign"
73
+ - "rsa\\.sign"
74
+
75
+ - id: ECDSA_USAGE
76
+ description: "ECDSA signatures — vulnerable to Shor's algorithm on elliptic curves"
77
+ severity: critical
78
+ category: signature
79
+ algorithm: ECDSA
80
+ replacement: ML-DSA-65 (FIPS 204)
81
+ effort: complex
82
+ languages: []
83
+ patterns:
84
+ - "ECDSA"
85
+ - "ES256"
86
+ - "ES384"
87
+ - "ES512"
88
+ - "SHA256withECDSA"
89
+ - "ec\\.sign"
90
+ - "ec\\.verify"
91
+ - "ECDSA_sign"
92
+ - "ECDSA_verify"
93
+ - "secp256k1"
94
+ - "secp256r1"
95
+ - "secp384r1"
96
+ - "prime256v1"
97
+ - "P-256"
98
+ - "P-384"
99
+ - "P-521"
100
+
101
+ - id: ED25519_USAGE
102
+ description: "Ed25519 signatures — elliptic curve, vulnerable to Shor's algorithm"
103
+ severity: critical
104
+ category: signature
105
+ algorithm: Ed25519
106
+ replacement: ML-DSA-65 (FIPS 204) or hybrid Ed25519+ML-DSA-65
107
+ effort: moderate
108
+ languages: []
109
+ patterns:
110
+ - "ed25519"
111
+ - "Ed25519"
112
+ - "ED25519"
113
+ - "@noble/ed25519"
114
+ - "ed25519-dalek"
115
+ - "crypto\\.sign\\s*\\(.*ed25519"
116
+ - "nacl\\.sign"
117
+ - "tweetnacl.*sign"
118
+ - "sodium.*sign"
119
+ - "EdDSA"
120
+
121
+ - id: ECDH_KEY_EXCHANGE
122
+ description: "ECDH key exchange — vulnerable to Shor's algorithm"
123
+ severity: critical
124
+ category: kem
125
+ algorithm: ECDH
126
+ replacement: ML-KEM-768 (FIPS 203) or hybrid X25519+ML-KEM-768
127
+ effort: complex
128
+ languages: []
129
+ patterns:
130
+ - "ECDH"
131
+ - "ecdh\\.computeSecret"
132
+ - "X25519"
133
+ - "x25519"
134
+ - "Curve25519"
135
+ - "curve25519"
136
+ - "createECDH"
137
+ - "diffieHellman"
138
+ - "DiffieHellman"
139
+ - "KeyAgreement.*EC"
140
+
141
+ - id: DH_KEY_EXCHANGE
142
+ description: "Diffie-Hellman key exchange — vulnerable to Shor's algorithm"
143
+ severity: critical
144
+ category: kem
145
+ algorithm: DH
146
+ replacement: ML-KEM-768 (FIPS 203)
147
+ effort: complex
148
+ languages: []
149
+ patterns:
150
+ - "DiffieHellman"
151
+ - "createDiffieHellman"
152
+ - "DH_generate_key"
153
+ - "DHParameterSpec"
154
+ - "dh\\.generateKeys"
155
+ - "dh\\.computeSecret"
156
+
157
+ - id: DSA_USAGE
158
+ description: "DSA signatures — vulnerable to Shor's algorithm"
159
+ severity: critical
160
+ category: signature
161
+ algorithm: DSA
162
+ replacement: ML-DSA-65 (FIPS 204)
163
+ effort: complex
164
+ languages: []
165
+ patterns:
166
+ - "DSA\\.generate"
167
+ - "KeyPairGenerator.*DSA"
168
+ - "SHA256withDSA"
169
+ - "DSA_generate_key"
170
+
171
+ # =============================================================================
172
+ # HIGH: Weakened by Grover's algorithm
173
+ # =============================================================================
174
+
175
+ - id: AES_128
176
+ description: "AES-128 — Grover's algorithm reduces effective security to 64 bits"
177
+ severity: high
178
+ category: symmetric
179
+ algorithm: AES-128
180
+ replacement: AES-256 (trivial upgrade — same API, different key size)
181
+ effort: trivial
182
+ languages: []
183
+ patterns:
184
+ - "AES-128"
185
+ - "aes-128"
186
+ - "AES/.*128"
187
+ - "createCipheriv\\s*\\(.*aes-128"
188
+ - "Cipher\\.getInstance.*AES.*128"
189
+
190
+ # =============================================================================
191
+ # MEDIUM: Already weak classically
192
+ # =============================================================================
193
+
194
+ - id: MD5_USAGE
195
+ description: "MD5 — broken classically, trivially broken by quantum"
196
+ severity: medium
197
+ category: hash
198
+ algorithm: MD5
199
+ replacement: SHA-256 or SHA-3
200
+ effort: trivial
201
+ languages: []
202
+ patterns:
203
+ - "md5"
204
+ - "MD5"
205
+ - "createHash\\s*\\(.*['\"]md5['\"]"
206
+ - "MessageDigest.*MD5"
207
+ - "hashlib\\.md5"
208
+
209
+ - id: SHA1_USAGE
210
+ description: "SHA-1 — collision attacks known, should migrate regardless of quantum"
211
+ severity: medium
212
+ category: hash
213
+ algorithm: SHA-1
214
+ replacement: SHA-256 or SHA-3
215
+ effort: trivial
216
+ languages: []
217
+ patterns:
218
+ - "sha-?1(?!\\d)"
219
+ - "SHA-?1(?!\\d)"
220
+ - "createHash\\s*\\(.*['\"]sha1['\"]"
221
+ - "MessageDigest.*SHA.1"
222
+ - "hashlib\\.sha1"
223
+
224
+ - id: DES_3DES
225
+ description: "DES/3DES — deprecated, 64-bit block size"
226
+ severity: medium
227
+ category: symmetric
228
+ algorithm: 3DES
229
+ replacement: AES-256
230
+ effort: moderate
231
+ languages: []
232
+ patterns:
233
+ - "DES"
234
+ - "3DES"
235
+ - "DESede"
236
+ - "TripleDES"
237
+ - "des-ede3"
238
+ - "des-cbc"
239
+
240
+ # =============================================================================
241
+ # SAFE: Already quantum-resistant (document for inventory)
242
+ # =============================================================================
243
+
244
+ - id: ML_KEM
245
+ description: "ML-KEM (Kyber) — NIST FIPS 203 post-quantum key encapsulation"
246
+ severity: safe
247
+ category: kem
248
+ algorithm: ML-KEM
249
+ replacement: null
250
+ effort: trivial
251
+ languages: []
252
+ patterns:
253
+ - "ml.kem"
254
+ - "ML-KEM"
255
+ - "ML_KEM"
256
+ - "mlKem"
257
+ - "kyber"
258
+ - "KYBER"
259
+ - "Kyber768"
260
+ - "Kyber1024"
261
+ - "@noble/post-quantum.*kem"
262
+
263
+ - id: ML_DSA
264
+ description: "ML-DSA (Dilithium) — NIST FIPS 204 post-quantum signatures"
265
+ severity: safe
266
+ category: signature
267
+ algorithm: ML-DSA
268
+ replacement: null
269
+ effort: trivial
270
+ languages: []
271
+ patterns:
272
+ - "ml.dsa"
273
+ - "ML-DSA"
274
+ - "ML_DSA"
275
+ - "mlDsa"
276
+ - "dilithium"
277
+ - "DILITHIUM"
278
+ - "Dilithium"
279
+ - "@noble/post-quantum.*dsa"
280
+
281
+ - id: SLH_DSA
282
+ description: "SLH-DSA (SPHINCS+) — NIST FIPS 205 hash-based post-quantum signatures"
283
+ severity: safe
284
+ category: signature
285
+ algorithm: SLH-DSA
286
+ replacement: null
287
+ effort: trivial
288
+ languages: []
289
+ patterns:
290
+ - "slh.dsa"
291
+ - "SLH-DSA"
292
+ - "SLH_DSA"
293
+ - "sphincs"
294
+ - "SPHINCS"
295
+
296
+ - id: AES_256
297
+ description: "AES-256 — 128-bit post-quantum security, sufficient"
298
+ severity: safe
299
+ category: symmetric
300
+ algorithm: AES-256
301
+ replacement: null
302
+ effort: trivial
303
+ languages: []
304
+ patterns:
305
+ - "AES-256"
306
+ - "aes-256"
307
+ - "aes-256-gcm"
308
+ - "aes-256-cbc"
309
+
310
+ - id: CHACHA20
311
+ description: "ChaCha20-Poly1305 — symmetric AEAD, quantum-resistant"
312
+ severity: safe
313
+ category: symmetric
314
+ algorithm: ChaCha20-Poly1305
315
+ replacement: null
316
+ effort: trivial
317
+ languages: []
318
+ patterns:
319
+ - "chacha20"
320
+ - "ChaCha20"
321
+ - "CHACHA20"
322
+ - "chacha20-poly1305"
323
+ - "xchacha20"
324
+
325
+ - id: SHA256_SAFE
326
+ description: "SHA-256 — quantum-resistant hash (Grover reduces to 128-bit, still safe)"
327
+ severity: safe
328
+ category: hash
329
+ algorithm: SHA-256
330
+ replacement: null
331
+ effort: trivial
332
+ languages: []
333
+ patterns:
334
+ - "sha-?256"
335
+ - "SHA-?256"
336
+ - "createHash\\s*\\(.*['\"]sha256['\"]"
337
+
338
+ - id: SHA3_SAFE
339
+ description: "SHA-3 — quantum-resistant hash"
340
+ severity: safe
341
+ category: hash
342
+ algorithm: SHA-3
343
+ replacement: null
344
+ effort: trivial
345
+ languages: []
346
+ patterns:
347
+ - "sha-?3"
348
+ - "SHA-?3"
349
+ - "keccak"
350
+ - "KECCAK"