pqaudit 0.5.0 → 0.6.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 +100 -11
- package/dist/cli.js +18 -3
- package/dist/cli.js.map +1 -1
- package/dist/policy/evaluator.d.ts +7 -0
- package/dist/policy/evaluator.d.ts.map +1 -1
- package/dist/policy/evaluator.js +20 -5
- package/dist/policy/evaluator.js.map +1 -1
- package/dist/policy/loader.d.ts +8 -2
- package/dist/policy/loader.d.ts.map +1 -1
- package/dist/policy/loader.js +39 -3
- package/dist/policy/loader.js.map +1 -1
- package/dist/reporter/cbom.d.ts.map +1 -1
- package/dist/reporter/cbom.js +2 -1
- package/dist/reporter/cbom.js.map +1 -1
- package/dist/reporter/sarif.d.ts.map +1 -1
- package/dist/reporter/sarif.js +2 -1
- package/dist/reporter/sarif.js.map +1 -1
- package/dist/scanner/ast-patterns.d.ts +3 -1
- package/dist/scanner/ast-patterns.d.ts.map +1 -1
- package/dist/scanner/ast-patterns.js +37 -12
- package/dist/scanner/ast-patterns.js.map +1 -1
- package/dist/scanner/ast-scanner.d.ts.map +1 -1
- package/dist/scanner/ast-scanner.js +7 -2
- package/dist/scanner/ast-scanner.js.map +1 -1
- package/dist/scanner/certificate-scanner.d.ts +38 -0
- package/dist/scanner/certificate-scanner.d.ts.map +1 -0
- package/dist/scanner/certificate-scanner.js +241 -0
- package/dist/scanner/certificate-scanner.js.map +1 -0
- package/dist/scanner/engine.d.ts.map +1 -1
- package/dist/scanner/engine.js +19 -6
- package/dist/scanner/engine.js.map +1 -1
- package/dist/scanner/file-scanner.d.ts +15 -0
- package/dist/scanner/file-scanner.d.ts.map +1 -1
- package/dist/scanner/file-scanner.js +131 -36
- package/dist/scanner/file-scanner.js.map +1 -1
- package/dist/scanner/network-scanner.d.ts +22 -0
- package/dist/scanner/network-scanner.d.ts.map +1 -1
- package/dist/scanner/network-scanner.js +342 -46
- package/dist/scanner/network-scanner.js.map +1 -1
- package/dist/scanner/rules.d.ts +4 -0
- package/dist/scanner/rules.d.ts.map +1 -1
- package/dist/scanner/rules.js +26 -2
- package/dist/scanner/rules.js.map +1 -1
- package/dist/scanner/suppress.d.ts +3 -0
- package/dist/scanner/suppress.d.ts.map +1 -0
- package/dist/scanner/suppress.js +38 -0
- package/dist/scanner/suppress.js.map +1 -0
- package/dist/types.d.ts +14 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/version.d.ts +3 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +13 -0
- package/dist/version.js.map +1 -0
- package/package.json +3 -2
- package/policies/cnsa-2.0.yaml +63 -0
- package/policies/eu-pqc-roadmap.yaml +48 -0
- package/policies/nist-ir-8547.yaml +69 -0
- package/rules/crypto-patterns.yaml +426 -193
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suppress.js","sourceRoot":"","sources":["../../src/scanner/suppress.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,SAAS,GACb,6FAA6F,CAAC;AAQhG,SAAS,cAAc,CAAC,IAAwB;IAC9C,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC;QAAE,OAAO,IAAI,CAAC;IAC3D,MAAM,CAAC,GAAG,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/B,IAAI,CAAC,CAAC;QAAE,OAAO,IAAI,CAAC;IACpB,MAAM,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;QACd,EAAE,KAAK,CAAC,GAAG,CAAC;SACX,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;SACpB,MAAM,CAAC,OAAO,CAAC,CAAC;IACnB,OAAO;QACL,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,SAAS;QAC5B,OAAO,EAAE,GAAG,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI;KACrD,CAAC;AACJ,CAAC;AAED,iFAAiF;AACjF,MAAM,UAAU,YAAY,CAC1B,KAAe,EACf,OAAe,EACf,MAAc;IAEd,MAAM,IAAI,GAAG,cAAc,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;IAC5C,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;QAC1E,OAAO,IAAI,CAAC;IACd,CAAC;IACD,MAAM,IAAI,GAAG,cAAc,CAAC,KAAK,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC;IAChD,IAAI,IAAI,IAAI,IAAI,CAAC,QAAQ,IAAI,CAAC,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;QACzE,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export type Severity = "critical" | "high" | "medium" | "low" | "safe";
|
|
|
3
3
|
/** Category of cryptographic operation */
|
|
4
4
|
export type CryptoCategory = "kem" | "signature" | "hash" | "symmetric" | "protocol" | "kdf";
|
|
5
5
|
/** How the finding was detected */
|
|
6
|
-
export type DetectionMethod = "regex" | "ast" | "dependency" | "network";
|
|
6
|
+
export type DetectionMethod = "regex" | "ast" | "dependency" | "network" | "certificate";
|
|
7
7
|
/** Migration effort required */
|
|
8
8
|
export type MigrationEffort = "trivial" | "moderate" | "complex" | "breaking";
|
|
9
9
|
/** A single cryptographic finding in a codebase */
|
|
@@ -61,6 +61,11 @@ export interface DetectionRule {
|
|
|
61
61
|
languages: string[];
|
|
62
62
|
/** Regex patterns to match */
|
|
63
63
|
patterns: string[];
|
|
64
|
+
/**
|
|
65
|
+
* Match patterns case-sensitively (default: false). Use for short acronyms
|
|
66
|
+
* like "DES" that would otherwise match ordinary words ("description").
|
|
67
|
+
*/
|
|
68
|
+
caseSensitive?: boolean;
|
|
64
69
|
}
|
|
65
70
|
/** Scan configuration */
|
|
66
71
|
export interface ScanConfig {
|
|
@@ -135,6 +140,14 @@ export interface Policy {
|
|
|
135
140
|
deadline?: string;
|
|
136
141
|
/** Human-readable violation message */
|
|
137
142
|
message?: string;
|
|
143
|
+
/** ISO date — a "warn" policy escalates to "block" from this date on */
|
|
144
|
+
block_after?: string;
|
|
145
|
+
/**
|
|
146
|
+
* Also evaluate "safe"-severity findings (default: false). Needed for
|
|
147
|
+
* suites such as CNSA 2.0 that reject some quantum-resistant choices
|
|
148
|
+
* (e.g. SHA-256, ML-KEM-768).
|
|
149
|
+
*/
|
|
150
|
+
include_safe?: boolean;
|
|
138
151
|
}
|
|
139
152
|
/** A policy violation tied to a specific finding */
|
|
140
153
|
export interface PolicyViolation {
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +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,mCAAmC;AACnC,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,KAAK,GAAG,YAAY,GAAG,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,MAAM,MAAM,QAAQ,GAAG,UAAU,G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W,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,oDAAoD;AACpD,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,kCAAkC;AAClC,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,6BAA6B;AAC7B,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,WAAW,GAAG,MAAM,CAAC;IAC7B,UAAU,EAAE,aAAa,EAAE,CAAC;IAC5B,GAAG,EAAE,OAAO,CAAC;CACd;AAED,4DAA4D;AAC5D,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,KAAK,GAAG,KAAK,CAAC;CACzB;AAED,wCAAwC;AACxC,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAMnD,CAAC"}
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAmMA,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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAGA,+EAA+E;AAC/E,eAAO,MAAM,OAAO,EAAE,MASlB,CAAC"}
|
package/dist/version.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
import { resolve } from "node:path";
|
|
3
|
+
/** Package version, read from package.json (works from both src/ and dist/) */
|
|
4
|
+
export const VERSION = (() => {
|
|
5
|
+
try {
|
|
6
|
+
const pkg = JSON.parse(readFileSync(resolve(import.meta.dirname, "../package.json"), "utf-8"));
|
|
7
|
+
return pkg.version ?? "0.0.0";
|
|
8
|
+
}
|
|
9
|
+
catch {
|
|
10
|
+
return "0.0.0";
|
|
11
|
+
}
|
|
12
|
+
})();
|
|
13
|
+
//# sourceMappingURL=version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,+EAA+E;AAC/E,MAAM,CAAC,MAAM,OAAO,GAAW,CAAC,GAAG,EAAE;IACnC,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CACpB,YAAY,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,iBAAiB,CAAC,EAAE,OAAO,CAAC,CAC/C,CAAC;QAC1B,OAAO,GAAG,CAAC,OAAO,IAAI,OAAO,CAAC;IAChC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,OAAO,CAAC;IACjB,CAAC;AACH,CAAC,CAAC,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pqaudit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Post-quantum cryptography readiness scanner. Finds quantum-vulnerable cryptography in your codebase and generates CycloneDX CBOM.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
"types": "./dist/index.d.ts",
|
|
11
11
|
"files": [
|
|
12
12
|
"dist",
|
|
13
|
-
"rules"
|
|
13
|
+
"rules",
|
|
14
|
+
"policies"
|
|
14
15
|
],
|
|
15
16
|
"scripts": {
|
|
16
17
|
"build": "tsc && node scripts/copy-grammars.js",
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# NSA CNSA 2.0 — Commercial National Security Algorithm Suite 2.0
|
|
2
|
+
#
|
|
3
|
+
# Usage: pqaudit --policy cnsa-2.0 --ci
|
|
4
|
+
#
|
|
5
|
+
# Approved algorithms: ML-KEM-1024, ML-DSA-87, LMS / XMSS (software and
|
|
6
|
+
# firmware signing), AES-256, SHA-384 / SHA-512. Nothing else, including
|
|
7
|
+
# lower ML-KEM/ML-DSA parameter sets, SLH-DSA, ChaCha20 and SHA-256.
|
|
8
|
+
#
|
|
9
|
+
# Key dates (CNSSP 15 / NSA CNSA 2.0 FAQ):
|
|
10
|
+
# 2027-01-01 new National Security System acquisitions must be CNSA 2.0
|
|
11
|
+
# compliant (unless otherwise noted) — this preset blocks from then
|
|
12
|
+
# 2030 software/firmware signing and networking equipment: exclusive use
|
|
13
|
+
# 2033 browsers, servers, cloud services, operating systems: exclusive use
|
|
14
|
+
# 2035 all NSS quantum-resistant
|
|
15
|
+
#
|
|
16
|
+
# pqaudit cannot always tell ML-KEM-768 from ML-KEM-1024 (or ML-DSA-65 from
|
|
17
|
+
# ML-DSA-87), so parameter-set checks are warnings for manual review.
|
|
18
|
+
# Verify dates against https://media.defense.gov (CNSA 2.0 FAQ) and copy/edit
|
|
19
|
+
# this file for your programme.
|
|
20
|
+
|
|
21
|
+
policies:
|
|
22
|
+
- id: cnsa2-quantum-vulnerable
|
|
23
|
+
description: "Quantum-vulnerable public-key algorithm (not CNSA 2.0)"
|
|
24
|
+
severity: critical
|
|
25
|
+
category: [kem, signature]
|
|
26
|
+
action: warn
|
|
27
|
+
block_after: 2027-01-01
|
|
28
|
+
message: "Not CNSA 2.0 — use ML-KEM-1024 / ML-DSA-87 (LMS/XMSS for firmware signing). New NSS acquisitions must comply from 2027-01-01"
|
|
29
|
+
|
|
30
|
+
- id: cnsa2-aes-128
|
|
31
|
+
description: "AES-128 (CNSA requires AES-256)"
|
|
32
|
+
algorithm: AES-128
|
|
33
|
+
action: block
|
|
34
|
+
message: "CNSA requires AES-256"
|
|
35
|
+
|
|
36
|
+
- id: cnsa2-hash-strength
|
|
37
|
+
description: "SHA-256 / SHA-3 (CNSA 2.0 requires SHA-384 or SHA-512)"
|
|
38
|
+
algorithm: [SHA-256, SHA-3]
|
|
39
|
+
include_safe: true
|
|
40
|
+
action: warn
|
|
41
|
+
block_after: 2027-01-01
|
|
42
|
+
message: "CNSA 2.0 requires SHA-384 or SHA-512 (SHA-3 only inside hardware)"
|
|
43
|
+
|
|
44
|
+
- id: cnsa2-unapproved-pqc-or-symmetric
|
|
45
|
+
description: "Quantum-resistant but outside the CNSA 2.0 suite"
|
|
46
|
+
algorithm: [SLH-DSA, FN-DSA, HQC, Alternative PQ KEM, Classic McEliece, ChaCha20]
|
|
47
|
+
include_safe: true
|
|
48
|
+
action: warn
|
|
49
|
+
block_after: 2027-01-01
|
|
50
|
+
message: "Not in CNSA 2.0 — approved are ML-KEM-1024, ML-DSA-87, LMS/XMSS, AES-256, SHA-384/512"
|
|
51
|
+
|
|
52
|
+
- id: cnsa2-parameter-set
|
|
53
|
+
description: "ML-KEM / ML-DSA / hybrid — confirm CNSA 2.0 parameter set"
|
|
54
|
+
algorithm: [ML-KEM, ML-DSA, Hybrid PQ KEM, Composite ML-DSA]
|
|
55
|
+
include_safe: true
|
|
56
|
+
action: warn
|
|
57
|
+
message: "CNSA 2.0 requires ML-KEM-1024 and ML-DSA-87 (X25519MLKEM768 uses ML-KEM-768; SecP384r1MLKEM1024 qualifies)"
|
|
58
|
+
|
|
59
|
+
- id: cnsa2-legacy
|
|
60
|
+
description: "Classically broken or pre-standard algorithms"
|
|
61
|
+
algorithm: [MD5, SHA-1, 3DES, Kyber, Dilithium, SPHINCS+, ML-KEM-512, ML-DSA-44]
|
|
62
|
+
action: block
|
|
63
|
+
message: "Not permitted in National Security Systems"
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# EU Coordinated Implementation Roadmap for the Transition to Post-Quantum
|
|
2
|
+
# Cryptography (NIS Cooperation Group, June 2025)
|
|
3
|
+
#
|
|
4
|
+
# Usage: pqaudit --policy eu-pqc-roadmap --ci
|
|
5
|
+
#
|
|
6
|
+
# Milestones:
|
|
7
|
+
# end-2026 every Member State has started the transition (inventory, CBOM,
|
|
8
|
+
# national roadmaps). `pqaudit --format cbom` covers the inventory step
|
|
9
|
+
# end-2030 high-risk use cases (critical infrastructure: energy, health,
|
|
10
|
+
# finance, transport, water) migrated — this preset blocks from 2031
|
|
11
|
+
# end-2035 as many systems as feasible migrated
|
|
12
|
+
#
|
|
13
|
+
# Verify against https://digital-strategy.ec.europa.eu/en/library/coordinated-implementation-roadmap-transition-post-quantum-cryptography
|
|
14
|
+
# and your national authority (BSI, ANSSI, NCSC-NL, ...), and copy/edit for your org.
|
|
15
|
+
# Systems outside the high-risk tier can move block_after to 2036-01-01.
|
|
16
|
+
|
|
17
|
+
policies:
|
|
18
|
+
- id: eu-quantum-vulnerable
|
|
19
|
+
description: "Quantum-vulnerable public-key algorithm (EU PQC roadmap)"
|
|
20
|
+
severity: critical
|
|
21
|
+
category: [kem, signature]
|
|
22
|
+
action: warn
|
|
23
|
+
block_after: 2031-01-01
|
|
24
|
+
message: "High-risk use cases must be migrated by end-2030 under the EU PQC roadmap — use ML-KEM / ML-DSA, hybrid where national guidance requires it"
|
|
25
|
+
|
|
26
|
+
- id: eu-legacy
|
|
27
|
+
description: "Classically broken algorithms"
|
|
28
|
+
algorithm: [MD5, SHA-1, 3DES]
|
|
29
|
+
action: block
|
|
30
|
+
message: "Classically broken — replace regardless of the quantum timeline"
|
|
31
|
+
|
|
32
|
+
- id: eu-pre-standard-pqc
|
|
33
|
+
description: "Pre-standard PQC (round-3 Kyber / Dilithium / SPHINCS+)"
|
|
34
|
+
algorithm: ["Kyber", "Dilithium", "SPHINCS+"]
|
|
35
|
+
action: warn
|
|
36
|
+
message: "Use the standardized ML-KEM / ML-DSA / SLH-DSA"
|
|
37
|
+
|
|
38
|
+
- id: eu-classic-mceliece
|
|
39
|
+
description: "Classic McEliece (BSI advises against new deployments, Sep 2026)"
|
|
40
|
+
algorithm: Classic McEliece
|
|
41
|
+
action: warn
|
|
42
|
+
message: "BSI advises against new Classic McEliece deployments after 2026 cryptanalysis — use ML-KEM or FrodoKEM (HQC once standardized); keep existing use hybrid-only"
|
|
43
|
+
|
|
44
|
+
- id: eu-smallest-parameter-sets
|
|
45
|
+
description: "ML-KEM-512 / ML-DSA-44 (lowest security level)"
|
|
46
|
+
algorithm: [ML-KEM-512, ML-DSA-44]
|
|
47
|
+
action: warn
|
|
48
|
+
message: "After the Nov 2026 structured-lattice results, the CIRG review recommends the highest security level each application can support (ML-KEM-768/1024, ML-DSA-65/87)"
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# NIST IR 8547 — Transition to Post-Quantum Cryptography Standards
|
|
2
|
+
#
|
|
3
|
+
# Usage: pqaudit --policy nist-ir-8547 --ci
|
|
4
|
+
#
|
|
5
|
+
# The final report (October 2026) deprecates every quantum-vulnerable
|
|
6
|
+
# public-key algorithm (RSA, ECDSA, EdDSA, ECDH, DH, DSA) after 2030 and
|
|
7
|
+
# disallows it after 2035, regardless of key size. The 2024 draft had let
|
|
8
|
+
# 128-bit-security parameters (RSA-3072, P-256, Ed25519) skip deprecation;
|
|
9
|
+
# the final report removed that exception. Hybrid PQ/traditional schemes are
|
|
10
|
+
# not targeted by the 2035 disallowance.
|
|
11
|
+
#
|
|
12
|
+
# AES-128 and SHA-256 remain acceptable under NIST guidance, so this preset
|
|
13
|
+
# does not flag them (pqaudit's own "high" severity for AES-128 is stricter).
|
|
14
|
+
#
|
|
15
|
+
# Dates are as reported at the time of writing — verify against
|
|
16
|
+
# https://csrc.nist.gov/pubs/ir/8547 and copy/edit this file for your org.
|
|
17
|
+
|
|
18
|
+
policies:
|
|
19
|
+
- id: nist-quantum-vulnerable-public-key
|
|
20
|
+
description: "Quantum-vulnerable public-key algorithm (NIST IR 8547)"
|
|
21
|
+
severity: critical
|
|
22
|
+
category: [kem, signature]
|
|
23
|
+
action: warn
|
|
24
|
+
block_after: 2031-01-01
|
|
25
|
+
message: "Deprecated after 2030 and disallowed after 2035 under NIST IR 8547 — migrate to ML-KEM (FIPS 203) / ML-DSA (FIPS 204), or a hybrid"
|
|
26
|
+
|
|
27
|
+
- id: nist-legacy-symmetric
|
|
28
|
+
description: "Triple-DES encryption (disallowed since 2024, SP 800-131A Rev. 2)"
|
|
29
|
+
algorithm: 3DES
|
|
30
|
+
action: block
|
|
31
|
+
message: "TDEA/3DES encryption is disallowed — use AES-256"
|
|
32
|
+
|
|
33
|
+
- id: nist-md5
|
|
34
|
+
description: "MD5 is not an approved hash function"
|
|
35
|
+
algorithm: MD5
|
|
36
|
+
action: block
|
|
37
|
+
message: "MD5 is not approved — use SHA-256, SHA-384/512 or SHA-3"
|
|
38
|
+
|
|
39
|
+
- id: nist-sha1
|
|
40
|
+
description: "SHA-1 (NIST phases it out completely by 2030-12-31)"
|
|
41
|
+
algorithm: SHA-1
|
|
42
|
+
action: warn
|
|
43
|
+
block_after: 2031-01-01
|
|
44
|
+
message: "SHA-1 is already disallowed for signatures and is being withdrawn entirely by end of 2030"
|
|
45
|
+
|
|
46
|
+
- id: nist-pre-standard-pqc
|
|
47
|
+
description: "Pre-standard PQC (round-3 Kyber / Dilithium / SPHINCS+) is not FIPS-approved"
|
|
48
|
+
algorithm: ["Kyber", "Dilithium", "SPHINCS+"]
|
|
49
|
+
action: warn
|
|
50
|
+
message: "Use the FIPS 203/204/205 algorithms (ML-KEM, ML-DSA, SLH-DSA) — round-3 variants are not interoperable"
|
|
51
|
+
|
|
52
|
+
- id: nist-fn-dsa-draft
|
|
53
|
+
description: "FN-DSA (Falcon) — FIPS 206 not yet final"
|
|
54
|
+
algorithm: FN-DSA
|
|
55
|
+
include_safe: true
|
|
56
|
+
action: warn
|
|
57
|
+
message: "FIPS 206 was still unpublished as of late 2026 — use ML-DSA (FIPS 204) in production until it is final"
|
|
58
|
+
|
|
59
|
+
- id: nist-classic-mceliece
|
|
60
|
+
description: "Classic McEliece (BSI advises against new deployments, Sep 2026)"
|
|
61
|
+
algorithm: Classic McEliece
|
|
62
|
+
action: warn
|
|
63
|
+
message: "BSI advises against new Classic McEliece deployments after 2026 cryptanalysis — use ML-KEM or FrodoKEM (HQC once standardized); keep existing use hybrid-only"
|
|
64
|
+
|
|
65
|
+
- id: nist-smallest-parameter-sets
|
|
66
|
+
description: "ML-KEM-512 / ML-DSA-44 (lowest security level)"
|
|
67
|
+
algorithm: [ML-KEM-512, ML-DSA-44]
|
|
68
|
+
action: warn
|
|
69
|
+
message: "After the Nov 2026 structured-lattice results, the CIRG review recommends the highest security level each application can support (ML-KEM-768/1024, ML-DSA-65/87)"
|