crypto-inventory 0.3.0: glob imports resolved, libcrux and spqr, libsignal KEM key pairs; control-plane: a key agreement or client-side TLS called by the application itself is not routed to the TLS gateway (planner 35/35, B1 negative control 4/4)
This commit is contained in:
1 parent
f2f6217b4c
commit
f971fa9e28
11 files changed
+161
-30
No files matched your search
@@ -18,8 +18,8 @@ const lx = await import(pathToFileURL(join(dirname(CALE_MODUL), 'lib', 'lexer.mj
|
||||
const CA_JSON = process.argv.includes('--json');
|
||||
|
||||
// numarul total de marcaje EXPECT scrise de mana in fixturi; o schimbare aici se face constient
|
||||
const MARCAJE_ASTEPTATE = 123;
|
||||
const FISIERE_CU_MARCAJE = ['js/node-crypto.mjs', 'js/webcrypto.js', 'js/biblioteci.ts', 'js/tls.cjs', 'python/crypto_py.py', 'java/Crypto.java', 'go/crypto.go', 'rust/cripto.rs', 'rust/ambiguu.rs', 'negative/variabile.js'];
|
||||
const MARCAJE_ASTEPTATE = 128;
|
||||
const FISIERE_CU_MARCAJE = ['js/node-crypto.mjs', 'js/webcrypto.js', 'js/biblioteci.ts', 'js/tls.cjs', 'python/crypto_py.py', 'java/Crypto.java', 'go/crypto.go', 'rust/cripto.rs', 'rust/ambiguu.rs', 'rust/glob.rs', 'negative/variabile.js'];
|
||||
|
||||
const probe = [];
|
||||
const proba = (nume, fn) => probe.push({ nume, fn });
|
||||
@@ -226,6 +226,15 @@ proba('rust: acelasi nume de tip e clasificat dupa crate-ul din use (SigningKey)
|
||||
asigura(a.length === 1 && a[0].classification === 'unknown' && /ed25519-dalek/.test(a[0].reason) && /ml-dsa/.test(a[0].reason), `fara use: ${JSON.stringify(a.map((x) => [x.name, x.classification]))}`);
|
||||
});
|
||||
|
||||
proba('rust: un import glob (use crate::*) rezolva numele nerezolvate pe crate-ul lui, iar perechea KEM a lui libsignal nu e Curve25519', () => {
|
||||
const g = gasiriDin(scan(FIX), 'rust/glob.rs');
|
||||
const k = g.find((x) => x.line === 10);
|
||||
asigura(k && k.name === 'Kyber-1024' && /kem::KeyType::Kyber1024$/.test(k.api) && g.filter((x) => x.line === 10).length === 1, `kem::KeyPair::generate(KeyType::Kyber1024): ${JSON.stringify(g.filter((x) => x.line === 10).map((x) => [x.name, x.api]))}`);
|
||||
const i = g.find((x) => x.line === 11);
|
||||
asigura(i && i.name === 'X25519' && /IdentityKeyPair/.test(i.api), `IdentityKeyPair prin glob: ${JSON.stringify(i && [i.name, i.api])}`);
|
||||
asigura(g.filter((x) => x.name === 'ML-KEM-1024').length === 2 && g.filter((x) => x.name === 'ML-DSA-65').length === 1, `libcrux: ${JSON.stringify(g.map((x) => x.line + ' ' + x.name))}`);
|
||||
});
|
||||
|
||||
proba('rust: importul fara apel e dovada slaba (unknown), importul cu apel in acelasi fisier nu se raporteaza', () => {
|
||||
const g = gasiriDin(scan(FIX), 'rust/cripto.rs');
|
||||
const imp = g.filter((x) => x.evidenceKind === 'import');
|
||||
|
||||
Reference in new issue
Block a user