Every artifact's SHA-256 and size, the SBOM's digest, the git commit and tree of the source, a hybrid signature (classical + ML-DSA, both required) and, when notarized, a first-seen time on Aere Network covered by the validators' post-quantum certificate. verify recomputes everything from the files; --rebuild-from repeats an npm pack build from a clone the verifier chose; the SBOM is re-derived from the committed package-lock.json or, new in 1.4.0, from the committed go.mod and go.sum; --signer requires the signing keys you expect (1.4.0); a developer credential binds the keys to a person, judged against a trust root you choose. The builder's declared date can only accuse, never acquit (1.4.0). Includes the GitHub Action and the hybrid signature library it uses. Laid out as in the development repository (tools/proof-of-software/, sdk-pq-sign/, sdk/) so that nothing is rewritten for publication. Tests and negative controls measured on 2026-09-29 are listed in README.md.
15 lines
1.3 KiB
JavaScript
15 lines
1.3 KiB
JavaScript
// Controlul negativ al identitatii constructorului (credential.test.mjs), prin mecanismul comun din _control.mjs: fiecare paznic
|
|
// scos intr-o copie trebuie sa inroseasca exact proba lui.
|
|
// node aerenew/tools/proof-of-software/test/credential-control-negativ.mjs
|
|
import { controleaza } from './_control.mjs';
|
|
|
|
process.exitCode = controleaza('credential.test.mjs', [
|
|
['radacina de incredere nu se mai compara', "keyId(publicKeysOf(trustIssuer)) === keyId(b.issuer && b.issuer.keys)", 'true', '2. CONTROL'],
|
|
['semnatarul acreditarii nu mai trebuie sa fie emitentul numit', 'sv.valid && semnatarEmitent,', 'sv.valid,', '6. CONTROL'],
|
|
['cheile subiectului nu se mai compara cu semnatarul declaratiei', "!!att.signature && keyId(publicKeysOf(att.signature)) === keyId(b.subject && b.subject.keys)", '!!att.signature', '7. CONTROL'],
|
|
['valabilitatea nu se mai judeca', 'Date.parse(t) >= Date.parse(b.validFrom) && Date.parse(t) <= Date.parse(b.validUntil)', 'true', '8. CONTROL'],
|
|
['revocarile emitentului se ignora', 'if (rb.credential !== want) continue;', 'continue;', '9. revocarea'],
|
|
['timpul lantului se ignora (bate data declarata)', 'const t = chainTime || att.statement.createdAt;', 'const t = att.statement.createdAt;', '10. timpul'],
|
|
['data declarata achita din nou (B-18)', 'const declarat = !chainTime;', 'const declarat = false;', '12. B-18'],
|
|
]);
|