crypto-inventory 0.3.0 and the control-plane planner after the second run on a tree that is not ours (libsignal): BoringSSL, Noise hfs, libcrux Kyber, the libsignal Java/Node API; self-signed trust anchors are blocked, test code is LOW with its own scope

This commit is contained in:
Aere Network committed 2026-10-18 07:52:31 +03:00
1 parent 42b049ef04
commit e453c0c42d
35 files changed
+675 -51

No files matched your search

+9 -4
View File
@@ -25,6 +25,9 @@ try {
// fixtura vulnerabila
const v = path.join(T, 'vuln'); fs.mkdirSync(v);
fs.writeFileSync(path.join(v, 'a.js'), "const c=require('crypto');\nc.createECDH('prime256v1');\nc.createSign('RSA-SHA256');\n");
// 2026-10-18 (libsignal): acelasi apel intr-un fisier de TEST: in plan, dar LOW si scope 'test' (scopul se deriva din cale, prin adaptor)
fs.mkdirSync(path.join(v, 'tests'));
fs.writeFileSync(path.join(v, 'tests', 'a.test.js'), "const c=require('crypto');\nc.createECDH('prime256v1');\n");
// fixtura PQ
const pq = path.join(T, 'pq'); fs.mkdirSync(pq);
fs.writeFileSync(path.join(pq, 'b.js'), "// ML-KEM-768 si ML-DSA-65, doar nume\nconst a='ML-KEM-768', s='ML-DSA-65';\n");
@@ -34,9 +37,11 @@ try {
const pv = ruleaza(v);
const byRef = Object.fromEntries(pv.actions.map((a) => [a.ref.split(':').slice(0, 3).join(':'), a]));
cer('dosar vulnerabil: 2 folosiri vulnerabile', pv.inventory.quantumVulnerable === 2);
cer('dosar vulnerabil: 2 actiuni in plan', pv.summary.total === 2);
const ecdh = pv.actions.find((a) => /ECDH/i.test(a.name || a.asset));
cer('dosar vulnerabil: 3 folosiri vulnerabile (2 in a.js, 1 in tests/)', pv.inventory.quantumVulnerable === 3);
cer('dosar vulnerabil: 3 actiuni in plan', pv.summary.total === 3);
const inTest = pv.actions.find((a) => /tests\//.test(a.location || ''));
cer('apelul din tests/ -> scope test, urgenta LOW, numarat in byScope.test', inTest && inTest.scope === 'test' && inTest.urgency === 'LOW' && pv.summary.byScope && pv.summary.byScope.test === 1 && pv.summary.byScope.production === 2);
const ecdh = pv.actions.find((a) => /ECDH/i.test(a.name || a.asset) && a.scope !== 'test');
const rsa = pv.actions.find((a) => /RSA/i.test(a.name || a.asset));
// 2026-10-18: createECDH e schimb de cheie facut de APLICATIE (api-ul si limbajul trec prin adaptor): manual, in cod, tinta hibrida, fara gateway
cer('ECDH din cod (createECDH) -> manual, in cod, tinta X25519 + ML-KEM-768, fara gateway', ecdh && ecdh.method === 'manual' && !ecdh.product && /ML-KEM-768/.test(ecdh.target) && /createECDH/.test(ecdh.how));
@@ -56,5 +61,5 @@ try {
} finally {
fs.rmSync(T, { recursive: true, force: true });
}
console.log(`\nB1 control-plane CLI: ${9 - rele}/9 cum trebuia`);
console.log(`\nB1 control-plane CLI: ${10 - rele}/10 cum trebuia`);
process.exit(rele ? 1 : 0);