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

+25
View File
@@ -24,6 +24,16 @@ const inventory = [
{ ref: 'cod:ed25519:rust', assetType: 'algorithm', name: 'Ed25519', primitive: 'signature', quantumVulnerable: true, language: 'rust', api: 'SigningKey::generate', location: 'src/sign.rs:5' },
{ ref: 'cod:tls:go', assetType: 'algorithm', name: 'ECDH-secp256r1', primitive: 'key-agree', quantumVulnerable: true, language: 'go', api: 'tls.Config.CurvePreferences', protocolType: undefined, location: 'main.go:30' },
{ ref: 'cod:tls-client:rust', assetType: 'algorithm', name: 'X25519', primitive: 'key-agree', quantumVulnerable: true, language: 'rust', api: 'rustls::crypto::ring::default_provider', location: 'src/http.rs:12' },
// 2026-10-18 (libsignal): radacini AUTOSEMNATE fixate in arbore (ancore de incredere ale atestarii: AMD, AWS) si o constatare din cod de TEST
{ ref: 'cert:radacina-vendor', assetType: 'certificate', primitive: 'signature', quantumVulnerable: true,
certificate: { subjectName: 'OU=Engineering, O=Advanced Micro Devices, CN=ARK-Genoa', issuerName: 'OU=Engineering, O=Advanced Micro Devices, CN=ARK-Genoa', notValidBefore: '2020-10-22T00:00:00Z', notValidAfter: '2045-10-22T00:00:00Z' } },
// CN in forma de nume de gazda, dar 30 de ani: tot radacina (asa e cea reala a AWS Nitro)
{ ref: 'cert:radacina-amazon', assetType: 'certificate', primitive: 'signature', quantumVulnerable: true,
certificate: { subjectName: 'C=US, O=Amazon, OU=AWS, CN=aws.nitro-enclaves', issuerName: 'C=US, O=Amazon, OU=AWS, CN=aws.nitro-enclaves', notValidBefore: '2019-10-28T00:00:00Z', notValidAfter: '2049-10-28T00:00:00Z' } },
// CONTROL: un certificat de serviciu autosemnat, scurt, pentru un nume de gazda, NU e ancora: PKI-ul il inlocuieste pentru acelasi CN
{ ref: 'cert:autosemnat-serviciu', assetType: 'certificate', primitive: 'signature', quantumVulnerable: true,
certificate: { subjectName: 'CN=api.autosemnat.internal', issuerName: 'CN=api.autosemnat.internal', notValidBefore: '2026-01-01T00:00:00Z', notValidAfter: '2027-01-01T00:00:00Z' } },
{ ref: 'cod:x25519:test', assetType: 'algorithm', name: 'X25519', primitive: 'key-agree', quantumVulnerable: true, language: 'rust', api: 'KeyPair::generate', scope: 'test', location: 'tests/ratchet.rs:19' },
];
// 2026-09-27: constatarile de scanare se DERIVA din sursa scanerului (readiness-service.mjs, apelurile lui add(id, severitate,
// titlu)), nu se scriu de mana. Fixtura veche folosea id-uri inventate ('tls-kex-classical', 'tls12-enabled'), deci proba era verde
@@ -63,6 +73,21 @@ cer('HNDL ramane si in cod: X25519 HIGH, Ed25519 MEDIUM', xc && ec && xc.urgency
const cl = byRef['cod:tls-client:rust'];
cer('TLS de client din cod (rustls ring provider) -> manual, furnizorul hibrid in client, fara gateway', cl && cl.method === 'manual' && !cl.product && /X25519MLKEM768/.test(cl.target) && /aws-lc-rs/.test(cl.how) && /does not change what this client offers/.test(cl.how));
// 2026-10-18 (libsignal): o radacina autosemnata e o ancora de incredere, nu un certificat pe care PKI-ul il poate emite; si nu e WebPKI
const rv = byRef['cert:radacina-vendor'], ra = byRef['cert:radacina-amazon'];
cer('radacina autosemnata a unui vendor -> BLOCATA ca ancora de incredere, fara produs, fara cn', rv && rv.method === 'blocked' && !rv.product && !rv.cn && /trust anchor/.test(rv.blocker) && /trust anchor/.test(rv.how));
cer('radacina autosemnata cu "Amazon" in emitent -> tot ancora de incredere, NU "WebPKI public"', ra && ra.method === 'blocked' && /trust anchor/.test(ra.blocker) && !/WebPKI/.test(ra.blocker));
cer('CONTROL: certificatul intern emis de alt CA (emitent != subiect) ramane auto prin PKI', byRef['cert:interna'] && byRef['cert:interna'].method === 'auto-aere');
const sa = byRef['cert:autosemnat-serviciu'];
cer('CONTROL: certificatul de serviciu autosemnat, scurt, cu nume de gazda, ramane auto prin PKI pentru acelasi CN (nu e ancora)', sa && sa.method === 'auto-aere' && sa.product === 'pki' && sa.cn === 'api.autosemnat.internal');
cer('blocantul ancorei numeste semnul (durata sau CN): vendor = durata, Amazon = durata', /valid for 25 years/.test(rv.blocker) && /valid for 30 years/.test(ra.blocker));
// 2026-10-18 (libsignal): codul de test ramane in plan, dar LOW, cu scope 'test' si numarat separat
const xt = byRef['cod:x25519:test'];
cer('X25519 din cod de test -> in plan, urgenta LOW, scope test, how spune ca e cod de test', xt && xt.urgency === 'LOW' && xt.scope === 'test' && /^test code/.test(xt.how) && /gateway in front cannot/.test(xt.how));
cer('acelasi X25519 din productie ramane HIGH si scope production', xc && xc.urgency === 'HIGH' && xc.scope === 'production');
cer('rezumatul numara scopul: byScope.test = 1', plan.summary.byScope && plan.summary.byScope.test === 1 && plan.summary.byScope.production === plan.summary.total - 1);
cer('actiunile de test stau la coada planului (sortare pe urgenta)', plan.actions[plan.actions.length - 1].scope === 'test');
// controale negative: ce NU trebuie sa fie in plan
cer('CONTROL: ML-KEM (deja PQ) NU e in plan', !byRef['algorithm:mlkem']);
cer('CONTROL: ML-DSA (deja PQ) NU e in plan', !byRef['algorithm:mldsa']);