pqaudit 0.1.0 → 0.5.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.
- package/README.md +119 -18
- package/dist/cli.js +78 -24
- package/dist/cli.js.map +1 -1
- package/dist/grammars/tree-sitter-javascript.wasm +0 -0
- package/dist/grammars/tree-sitter-tsx.wasm +0 -0
- package/dist/grammars/tree-sitter-typescript.wasm +0 -0
- package/dist/policy/evaluator.d.ts +4 -0
- package/dist/policy/evaluator.d.ts.map +1 -0
- package/dist/policy/evaluator.js +60 -0
- package/dist/policy/evaluator.js.map +1 -0
- package/dist/policy/loader.d.ts +4 -0
- package/dist/policy/loader.d.ts.map +1 -0
- package/dist/policy/loader.js +19 -0
- package/dist/policy/loader.js.map +1 -0
- package/dist/reporter/html.d.ts +7 -0
- package/dist/reporter/html.d.ts.map +1 -0
- package/dist/reporter/html.js +415 -0
- package/dist/reporter/html.js.map +1 -0
- package/dist/reporter/text.d.ts.map +1 -1
- package/dist/reporter/text.js +20 -1
- package/dist/reporter/text.js.map +1 -1
- package/dist/sbom/enricher.d.ts +4 -0
- package/dist/sbom/enricher.d.ts.map +1 -0
- package/dist/sbom/enricher.js +144 -0
- package/dist/sbom/enricher.js.map +1 -0
- package/dist/sbom/parser.d.ts +4 -0
- package/dist/sbom/parser.d.ts.map +1 -0
- package/dist/sbom/parser.js +49 -0
- package/dist/sbom/parser.js.map +1 -0
- package/dist/scanner/ast-patterns.d.ts +38 -0
- package/dist/scanner/ast-patterns.d.ts.map +1 -0
- package/dist/scanner/ast-patterns.js +46 -0
- package/dist/scanner/ast-patterns.js.map +1 -0
- package/dist/scanner/ast-scanner.d.ts +8 -0
- package/dist/scanner/ast-scanner.d.ts.map +1 -0
- package/dist/scanner/ast-scanner.js +300 -0
- package/dist/scanner/ast-scanner.js.map +1 -0
- package/dist/scanner/dependency-scanner.d.ts +4 -0
- package/dist/scanner/dependency-scanner.d.ts.map +1 -1
- package/dist/scanner/dependency-scanner.js +477 -1
- package/dist/scanner/dependency-scanner.js.map +1 -1
- package/dist/scanner/engine.d.ts.map +1 -1
- package/dist/scanner/engine.js +95 -8
- package/dist/scanner/engine.js.map +1 -1
- package/dist/scanner/file-scanner.d.ts +1 -1
- package/dist/scanner/file-scanner.d.ts.map +1 -1
- package/dist/scanner/file-scanner.js +24 -6
- package/dist/scanner/file-scanner.js.map +1 -1
- package/dist/scanner/network-scanner.d.ts +4 -0
- package/dist/scanner/network-scanner.d.ts.map +1 -0
- package/dist/scanner/network-scanner.js +204 -0
- package/dist/scanner/network-scanner.js.map +1 -0
- package/dist/types.d.ts +68 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +8 -5
- package/rules/crypto-patterns.yaml +143 -2
|
@@ -172,6 +172,147 @@
|
|
|
172
172
|
# HIGH: Weakened by Grover's algorithm
|
|
173
173
|
# =============================================================================
|
|
174
174
|
|
|
175
|
+
# =============================================================================
|
|
176
|
+
# CRITICAL: Protocol & config — quantum-vulnerable key exchange / signatures
|
|
177
|
+
# =============================================================================
|
|
178
|
+
|
|
179
|
+
- id: SSH_RSA_KEY_TYPE
|
|
180
|
+
description: "SSH RSA host/user key — vulnerable to Shor's algorithm"
|
|
181
|
+
severity: critical
|
|
182
|
+
category: kem
|
|
183
|
+
algorithm: RSA
|
|
184
|
+
replacement: SSH keys using ML-DSA or hybrid PQ/traditional algorithms
|
|
185
|
+
effort: moderate
|
|
186
|
+
languages: [config]
|
|
187
|
+
patterns:
|
|
188
|
+
- "ssh-rsa"
|
|
189
|
+
- "HostKey.*rsa"
|
|
190
|
+
- "HostKeyAlgorithms.*ssh-rsa"
|
|
191
|
+
- "PubkeyAcceptedKeyTypes.*ssh-rsa"
|
|
192
|
+
- "PubkeyAcceptedAlgorithms.*ssh-rsa"
|
|
193
|
+
|
|
194
|
+
- id: SSH_ECDSA_KEY_TYPE
|
|
195
|
+
description: "SSH ECDSA key type — vulnerable to Shor's algorithm"
|
|
196
|
+
severity: critical
|
|
197
|
+
category: signature
|
|
198
|
+
algorithm: ECDSA
|
|
199
|
+
replacement: SSH keys using ML-DSA or hybrid PQ/traditional algorithms
|
|
200
|
+
effort: moderate
|
|
201
|
+
languages: [config]
|
|
202
|
+
patterns:
|
|
203
|
+
- "ecdsa-sha2-nistp256"
|
|
204
|
+
- "ecdsa-sha2-nistp384"
|
|
205
|
+
- "ecdsa-sha2-nistp521"
|
|
206
|
+
- "HostKeyAlgorithms.*ecdsa"
|
|
207
|
+
- "PubkeyAcceptedKeyTypes.*ecdsa"
|
|
208
|
+
- "PubkeyAcceptedAlgorithms.*ecdsa"
|
|
209
|
+
|
|
210
|
+
- id: SSH_VULNERABLE_KEX
|
|
211
|
+
description: "SSH key exchange using DH or ECDH — vulnerable to Shor's algorithm"
|
|
212
|
+
severity: critical
|
|
213
|
+
category: kem
|
|
214
|
+
algorithm: DH
|
|
215
|
+
replacement: Post-quantum hybrid key exchange (e.g. sntrup761x25519-sha512)
|
|
216
|
+
effort: moderate
|
|
217
|
+
languages: [config]
|
|
218
|
+
patterns:
|
|
219
|
+
- "KexAlgorithms.*diffie-hellman"
|
|
220
|
+
- "KexAlgorithms.*ecdh-sha2"
|
|
221
|
+
- "diffie-hellman-group-exchange"
|
|
222
|
+
- "diffie-hellman-group14"
|
|
223
|
+
- "diffie-hellman-group16"
|
|
224
|
+
- "diffie-hellman-group18"
|
|
225
|
+
|
|
226
|
+
- id: TLS_RSA_KEY_EXCHANGE
|
|
227
|
+
description: "TLS cipher suite with RSA key exchange — no forward secrecy, quantum-vulnerable"
|
|
228
|
+
severity: critical
|
|
229
|
+
category: kem
|
|
230
|
+
algorithm: RSA
|
|
231
|
+
replacement: TLS 1.3 (uses ephemeral key exchange only)
|
|
232
|
+
effort: moderate
|
|
233
|
+
languages: [config]
|
|
234
|
+
patterns:
|
|
235
|
+
- "TLS_RSA_WITH_"
|
|
236
|
+
- "AES128-SHA(?!\\d)"
|
|
237
|
+
- "AES256-SHA(?!\\d)"
|
|
238
|
+
- "AES128-GCM-SHA256"
|
|
239
|
+
- "AES256-GCM-SHA384"
|
|
240
|
+
|
|
241
|
+
- id: TLS_ECDHE_CIPHER
|
|
242
|
+
description: "TLS cipher suite with ECDHE key exchange — quantum-vulnerable ephemeral keys"
|
|
243
|
+
severity: critical
|
|
244
|
+
category: kem
|
|
245
|
+
algorithm: ECDH
|
|
246
|
+
replacement: TLS 1.3 with post-quantum hybrid key exchange (e.g. X25519Kyber768)
|
|
247
|
+
effort: moderate
|
|
248
|
+
languages: [config]
|
|
249
|
+
patterns:
|
|
250
|
+
- "ECDHE-RSA-"
|
|
251
|
+
- "ECDHE-ECDSA-"
|
|
252
|
+
- "TLS_ECDHE_"
|
|
253
|
+
|
|
254
|
+
- id: K8S_RSA_PRIVATE_KEY
|
|
255
|
+
description: "Kubernetes cert-manager RSA private key — quantum-vulnerable certificates"
|
|
256
|
+
severity: critical
|
|
257
|
+
category: kem
|
|
258
|
+
algorithm: RSA
|
|
259
|
+
replacement: Post-quantum certificate algorithms when supported by cert-manager
|
|
260
|
+
effort: complex
|
|
261
|
+
languages: [config]
|
|
262
|
+
patterns:
|
|
263
|
+
- "algorithm:\\s*RSA"
|
|
264
|
+
- "privateKey:[\\s\\S]*algorithm:\\s*RSA"
|
|
265
|
+
|
|
266
|
+
# =============================================================================
|
|
267
|
+
# HIGH: Protocol configuration — weakened or outdated
|
|
268
|
+
# =============================================================================
|
|
269
|
+
|
|
270
|
+
- id: TLS_VULNERABLE_PROTOCOL
|
|
271
|
+
description: "TLS 1.0/1.1 or SSLv3 — deprecated protocols with known vulnerabilities"
|
|
272
|
+
severity: high
|
|
273
|
+
category: protocol
|
|
274
|
+
algorithm: TLS
|
|
275
|
+
replacement: TLS 1.3
|
|
276
|
+
effort: moderate
|
|
277
|
+
languages: [config]
|
|
278
|
+
patterns:
|
|
279
|
+
- "ssl_protocols.*TLSv1(?:[^.]|$)"
|
|
280
|
+
- "ssl_protocols.*TLSv1\\.1"
|
|
281
|
+
- "SSLProtocol.*SSLv3"
|
|
282
|
+
- "SSLProtocol.*TLSv1(?:[^.]|$)"
|
|
283
|
+
- "MinProtocol.*TLSv1\\.0"
|
|
284
|
+
- "MinProtocol.*TLSv1\\.1"
|
|
285
|
+
- "ssl-min-ver.*TLSv1\\.0"
|
|
286
|
+
- "ssl-min-ver.*TLSv1\\.1"
|
|
287
|
+
- "tls_version.*TLSv1(?:\\.0|\\.1)?(?!\\.[2-9])"
|
|
288
|
+
|
|
289
|
+
- id: DOCKER_CRYPTO_INSTALL
|
|
290
|
+
description: "Dockerfile installs crypto library — review for quantum-vulnerable algorithms"
|
|
291
|
+
severity: high
|
|
292
|
+
category: protocol
|
|
293
|
+
algorithm: OpenSSL
|
|
294
|
+
replacement: Ensure installed crypto libraries support post-quantum algorithms
|
|
295
|
+
effort: moderate
|
|
296
|
+
languages: [config]
|
|
297
|
+
patterns:
|
|
298
|
+
- "(?:apt-get|apk add|yum|dnf).*(?:install|add).*(?:openssl|libssl|libcrypto|gnutls)"
|
|
299
|
+
- "pip install.*(?:cryptography|pycryptodome|pyOpenSSL)"
|
|
300
|
+
- "gem install.*(?:openssl|rbnacl)"
|
|
301
|
+
|
|
302
|
+
- id: K8S_TLS_SECRET
|
|
303
|
+
description: "Kubernetes TLS secret — may contain quantum-vulnerable certificates"
|
|
304
|
+
severity: high
|
|
305
|
+
category: protocol
|
|
306
|
+
algorithm: TLS
|
|
307
|
+
replacement: Rotate TLS certificates to post-quantum algorithms when available
|
|
308
|
+
effort: complex
|
|
309
|
+
languages: [config]
|
|
310
|
+
patterns:
|
|
311
|
+
- "type:\\s*kubernetes\\.io/tls"
|
|
312
|
+
- "secretName:.*tls"
|
|
313
|
+
- "tls\\.crt"
|
|
314
|
+
- "tls\\.key"
|
|
315
|
+
|
|
175
316
|
- id: AES_128
|
|
176
317
|
description: "AES-128 — Grover's algorithm reduces effective security to 64 bits"
|
|
177
318
|
severity: high
|
|
@@ -344,7 +485,7 @@
|
|
|
344
485
|
effort: trivial
|
|
345
486
|
languages: []
|
|
346
487
|
patterns:
|
|
347
|
-
- "sha-?3"
|
|
348
|
-
- "SHA-?3"
|
|
488
|
+
- "sha-?3(?!\\d)"
|
|
489
|
+
- "SHA-?3(?!\\d)"
|
|
349
490
|
- "keccak"
|
|
350
491
|
- "KECCAK"
|