Skip to content

Commit e26c824

Browse files
authored
Merge pull request #4 from AngelSuite/spec-review
Specification changes
2 parents ca6995f + ac7a943 commit e26c824

32 files changed

+1989
-2236
lines changed

Cargo.lock

Lines changed: 453 additions & 358 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "evp"
33
description = "Library to work with evidence packages (*.evp)."
4-
version = "1.0.0-beta.3" # 1.0.0 here means the I-D is accepted or concluded
4+
version = "1.0.0-beta.4" # 1.0.0 here means the I-D is accepted or concluded
55
edition = "2024"
66
license = "GPL-3.0-or-later"
77
authors = [
@@ -14,33 +14,31 @@ rust-version = "1.88.0"
1414

1515
[features]
1616
default = ["exporter-html", "exporter-zip-of-files"]
17-
exporter-excel = ["dep:rust_xlsxwriter"]
18-
exporter-html = ["dep:build_html", "dep:html-escape"]
17+
exporter-excel = ["dep:markdown", "dep:rust_xlsxwriter"]
18+
exporter-html = ["dep:build_html", "dep:html-escape", "dep:markdown"]
1919
exporter-zip-of-files = []
2020

2121
[dependencies]
2222
base64 = "0.22.1"
23+
biscuit = "0.7.0"
2324
build_html = { version = "2.5.0", optional = true }
2425
chrono = { version = "0.4.38", features = ["serde"] }
2526
getset = "0.1.2"
2627
html-escape = { version = "0.2.13", optional = true }
2728
infer = "0.19.0"
28-
jsonschema = "0.33.0"
29-
rust_xlsxwriter = { version = "0.90.0", features = ["chrono"], optional = true }
29+
jsonschema = "0.37.4"
30+
markdown = { version = "1.0.0", optional = true }
31+
rust_xlsxwriter = { version = "0.92.2", features = ["chrono"], optional = true }
3032
serde = { version = "1.0.200", features = ["derive"] }
3133
serde_json = "1.0.116"
34+
serde_json_canonicalizer = "0.3.1"
3235
sha256 = "1.5.0"
3336
thiserror = "2.0.4"
3437
tracing = "0.1.41"
35-
uuid = { version = "1.8.0", features = ["v4", "fast-rng", "serde"] }
36-
zip = "5.1.1"
38+
uuid = { version = "1.8.0", features = ["v7", "fast-rng", "serde"] }
39+
zip = "6.0.0"
3740

38-
# Remove when AngelMark deprecated
39-
pest = "2.7.15"
40-
# Remove when AngelMark deprecated
41-
pest_derive = "2.7.15"
42-
# Remove when AngelMark deprecated
43-
regex = "1.11.1"
44-
45-
[target.'cfg(windows)'.dependencies]
46-
winapi = { version = "0.3.9", features = ["fileapi", "winnt"] }
41+
[dev-dependencies]
42+
outdir-tempdir = "0.2.0"
43+
rand = "0.9.2"
44+
tracing-subscriber = { version = "0.3.22", features = ["env-filter"] }

schemas/manifest.2.schema.json

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
},
3939
"required": ["title", "authors"]
4040
},
41-
"custom_test_case_metadata": {
41+
"custom_metadata": {
4242
"type": "object",
4343
"description": "Custom metadata fields for test cases",
4444
"patternProperties": {
@@ -91,9 +91,18 @@
9191
"type": "string",
9292
"format": "uuid",
9393
"description": "The UUID of the test case. If present here, there MUST be an associated test case file in the `testcases` directory of the package with the name `<UUID>.json`."
94+
},
95+
"attestations": {
96+
"type": "array",
97+
"description": "An array of attestations over this test case.",
98+
"items": {
99+
"type": "string",
100+
"description": "The elements within the \"attestations\" array **MUST** be JWS [RFC7515] signatures. The signature payload must be a SHA256 checksum of a copy of the test case manifest (i.e. the file \"uuid.json\"), having been processed into JSON canonical format as defined in [RFC8785].",
101+
"pattern": "^[A-z0-9_-]+\\.[A-z0-9_-]+\\.[A-z0-9_-]+$"
102+
}
94103
}
95104
},
96-
"required": ["id"]
105+
"required": ["id", "attestations"]
97106
}
98107
}
99108
},

schemas/testcase.2.schema.json

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
"$id": "https://evidenceangel-schemas.hpkns.uk/testcase.2.schema.json",
3+
"$schema": "http://json-schema.org/draft-07/schema",
4+
"type": "object",
5+
"description": "A test case file `testcases/<UUID>.json` as part of an evidence package.",
6+
"properties": {
7+
"metadata": {
8+
"type": "object",
9+
"properties": {
10+
"title": {
11+
"type": "string",
12+
"description": "The title of the test case",
13+
"minLength": 1,
14+
"maxLength": 30
15+
},
16+
"execution_datetime": {
17+
"type": "string",
18+
"format": "date-time",
19+
"description": "The date and time of the execution of this test case starting."
20+
},
21+
"passed": {
22+
"type": ["string", "null"],
23+
"description": "The state of the test case",
24+
"enum": [
25+
"pass",
26+
"fail",
27+
null
28+
]
29+
},
30+
"custom": {
31+
"type": "object",
32+
"description": "Custom metadata values",
33+
"patternProperties": {
34+
".+": {
35+
"type": "string"
36+
}
37+
}
38+
}
39+
},
40+
"required": ["title", "execution_datetime"]
41+
},
42+
"evidence": {
43+
"type": "array",
44+
"items": {
45+
"type": "object",
46+
"description": "A piece of evidence as part of this test case.",
47+
"properties": {
48+
"kind": {
49+
"type": "string",
50+
"description": "The Internet Media Type of the data stored.",
51+
"pattern": "^(\\w*)\\/([\\w\\.-]*)(\\+([\\w\\.-]*))?(;((.+)=(.*);)*(.+)=(.*))?$"
52+
},
53+
"value": {
54+
"type": "string",
55+
"description": "Either `plain:` followed by plain text, `media:` followed by a media SHA256 hash, or `base64:` followed by a base64 string of data without padding.",
56+
"pattern": "^(plain:.*)|(media:[0-9a-f]{64})|(base64:[A-z0-9+/]*)$"
57+
},
58+
"caption": {
59+
"type": "string",
60+
"description": "An optional caption for this piece of evidence."
61+
},
62+
"original_filename": {
63+
"type": "string",
64+
"description": "The original filename for File evidence"
65+
}
66+
},
67+
"required": ["kind", "value"]
68+
}
69+
}
70+
},
71+
"required": ["metadata", "evidence"]
72+
}

spec/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ FILE="draft-hopkins-evp-spec.md"
44
RFCXML=$(basename "$FILE" .md).xml
55

66
mmark $FILE >"$RFCXML"
7-
xml2rfc --v3 --text --html --pdf $RFCXML
7+
xml2rfc --v3 --text --html $RFCXML

0 commit comments

Comments
 (0)