@cloakapi/conformance 0.0.0-stage → 0.1.4
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/LICENSE +202 -0
- package/NOTICE +9 -0
- package/README.md +128 -2
- package/THIRD-PARTY-NOTICES.md +9 -0
- package/TRADEMARKS.md +23 -0
- package/badge/attestation.js +47 -0
- package/badge/badge.html +40 -0
- package/badge/make-variants.mjs +40 -0
- package/badge/verified-by-cloakapi-dark.svg +16 -0
- package/badge/verified-by-cloakapi-light.svg +16 -0
- package/badge/verified-by-cloakapi.svg +43 -0
- package/bin/cloakapi-conformance.js +150 -0
- package/fixtures/chain-broken.json +74 -0
- package/fixtures/chain-pass.json +74 -0
- package/fixtures/countersigned-forged.json +52 -0
- package/fixtures/countersigned-pass.json +52 -0
- package/fixtures/engine-hashes-unpublished.json +8 -0
- package/fixtures/engine-hashes.json +10 -0
- package/fixtures/jwks.json +13 -0
- package/fixtures/receipt-bad-token-hash.json +36 -0
- package/fixtures/receipt-future-engine.json +36 -0
- package/fixtures/receipt-no-egress-claim.json +35 -0
- package/fixtures/receipt-pass.json +36 -0
- package/fixtures/receipt-raw-pii.json +36 -0
- package/fixtures/receipt-spoofed-hash.json +36 -0
- package/fixtures/receipt-stale-engine.json +36 -0
- package/fixtures/receipt-tampered.json +36 -0
- package/package.json +56 -4
- package/src/checks.js +570 -0
- package/src/index.js +120 -0
- package/vendor/cloakapi-verify.d.ts +121 -0
- package/vendor/cloakapi-verify.js +1350 -0
- package/vendor/strict-json.js +143 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"v": "v3",
|
|
3
|
+
"alg": "ecdsa-p256-sha256",
|
|
4
|
+
"kid": "conformance-device",
|
|
5
|
+
"iss": "third-party-integration",
|
|
6
|
+
"sub": "conformance-subject",
|
|
7
|
+
"iat": 1751990000,
|
|
8
|
+
"jti": "conf-stale-0001",
|
|
9
|
+
"chain": {
|
|
10
|
+
"chain_id": "conformance-chain",
|
|
11
|
+
"seq": 0,
|
|
12
|
+
"prev_hash": null
|
|
13
|
+
},
|
|
14
|
+
"claims": {
|
|
15
|
+
"v3-attestation": {
|
|
16
|
+
"tier": "beacon-anchored",
|
|
17
|
+
"no_raw_pii_egress": true,
|
|
18
|
+
"tokenised_body_hash": "dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd",
|
|
19
|
+
"detector_categories": [
|
|
20
|
+
"EMAIL",
|
|
21
|
+
"PHONE"
|
|
22
|
+
],
|
|
23
|
+
"engine_ruleset_version": "1.0.0",
|
|
24
|
+
"engine_binary_hash": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
|
|
25
|
+
"genuine_engine": false,
|
|
26
|
+
"privacy_tier": "balanced",
|
|
27
|
+
"token_binding_hmac": "cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc",
|
|
28
|
+
"anchoring": {
|
|
29
|
+
"inclusion_state": "anchored"
|
|
30
|
+
},
|
|
31
|
+
"attester_public_key": "047b4e0f0a6f5f6ec8438fbd83726acf5d65c8af9afa7d98c914d62fc888150fd35a805aa77faa732614a2545f8f1e41e2805735220683e59aaf86bcd462666cd0",
|
|
32
|
+
"client_destination": "chatgpt.com"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"sig": "UCz5XKZ27iZvqlPS3l7IBf4i-7L2I9SOGIAv4yNXlF_sFQmOQtZbdjkp7-5WidsaMFPolDTqMgnF7TCqyFlA_w"
|
|
36
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"v": "v3",
|
|
3
|
+
"alg": "ecdsa-p256-sha256",
|
|
4
|
+
"kid": "conformance-device",
|
|
5
|
+
"iss": "third-party-integration",
|
|
6
|
+
"sub": "conformance-subject",
|
|
7
|
+
"iat": 1751990000,
|
|
8
|
+
"jti": "conf-pass-0001",
|
|
9
|
+
"chain": {
|
|
10
|
+
"chain_id": "conformance-chain",
|
|
11
|
+
"seq": 0,
|
|
12
|
+
"prev_hash": null
|
|
13
|
+
},
|
|
14
|
+
"claims": {
|
|
15
|
+
"v3-attestation": {
|
|
16
|
+
"tier": "beacon-anchored",
|
|
17
|
+
"no_raw_pii_egress": true,
|
|
18
|
+
"tokenised_body_hash": "dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd",
|
|
19
|
+
"detector_categories": [
|
|
20
|
+
"EMAIL",
|
|
21
|
+
"PHONE"
|
|
22
|
+
],
|
|
23
|
+
"engine_ruleset_version": "1.4.0",
|
|
24
|
+
"engine_binary_hash": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
25
|
+
"genuine_engine": true,
|
|
26
|
+
"privacy_tier": "balanced",
|
|
27
|
+
"token_binding_hmac": "cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc",
|
|
28
|
+
"anchoring": {
|
|
29
|
+
"inclusion_state": "anchored"
|
|
30
|
+
},
|
|
31
|
+
"attester_public_key": "047b4e0f0a6f5f6ec8438fbd83726acf5d65c8af9afa7d98c914d62fc888150fd35a805aa77faa732614a2545f8f1e41e2805735220683e59aaf86bcd462666cd0",
|
|
32
|
+
"client_destination": "chatgpt.com"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"sig": "35hDaIvZDfB_Aa7CtNIQ1obzFUCLdo4nTRJW_3jddPamDx8NUo-nNVqTGIxc-UTLlG-hXgbQEXBdt110Yq1MfA"
|
|
36
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,58 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloakapi/conformance",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.4",
|
|
4
|
+
"description": "Runnable conformance suite that validates supplied CloakAPI receipts and declared engine metadata. It checks signed claims but does not prove which engine ran or that detection was executed; it never makes a 100% detection claim.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "Apache-2.0",
|
|
7
|
+
"main": "./src/index.js",
|
|
8
|
+
"module": "./src/index.js",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./src/index.js",
|
|
12
|
+
"default": "./src/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./checks": "./src/checks.js",
|
|
15
|
+
"./attestation": "./badge/attestation.js",
|
|
16
|
+
"./package.json": "./package.json"
|
|
17
|
+
},
|
|
18
|
+
"bin": {
|
|
19
|
+
"cloakapi-conformance": "./bin/cloakapi-conformance.js"
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"src/",
|
|
23
|
+
"bin/",
|
|
24
|
+
"vendor/",
|
|
25
|
+
"badge/",
|
|
26
|
+
"fixtures/*.json",
|
|
27
|
+
"README.md",
|
|
28
|
+
"LICENSE",
|
|
29
|
+
"NOTICE",
|
|
30
|
+
"TRADEMARKS.md",
|
|
31
|
+
"THIRD-PARTY-NOTICES.md",
|
|
32
|
+
"licenses"
|
|
33
|
+
],
|
|
34
|
+
"publishConfig": {
|
|
35
|
+
"access": "public"
|
|
36
|
+
},
|
|
37
|
+
"scripts": {
|
|
38
|
+
"prepublishOnly": "bash ../../../bin/publiseringstre-vakt.sh --sti \"$PWD\" && bash ../../../bin/sdk-lisens-vakt.sh --pakke \"$PWD\"",
|
|
39
|
+
"test": "node --test test/*.js test/*.mjs",
|
|
40
|
+
"fixtures": "node fixtures/generate.mjs",
|
|
41
|
+
"conformance": "node bin/cloakapi-conformance.js"
|
|
42
|
+
},
|
|
43
|
+
"keywords": [
|
|
44
|
+
"cloakapi",
|
|
45
|
+
"conformance",
|
|
46
|
+
"openreceipt",
|
|
47
|
+
"receipt",
|
|
48
|
+
"verification",
|
|
49
|
+
"ecdsa",
|
|
50
|
+
"p256",
|
|
51
|
+
"privacy",
|
|
52
|
+
"tokenisation",
|
|
53
|
+
"verified-by-cloakapi"
|
|
54
|
+
],
|
|
55
|
+
"engines": {
|
|
56
|
+
"node": ">=18"
|
|
57
|
+
}
|
|
58
|
+
}
|