Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
811 changes: 453 additions & 358 deletions Cargo.lock

Large diffs are not rendered by default.

30 changes: 14 additions & 16 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "evp"
description = "Library to work with evidence packages (*.evp)."
version = "1.0.0-beta.3" # 1.0.0 here means the I-D is accepted or concluded
version = "1.0.0-beta.4" # 1.0.0 here means the I-D is accepted or concluded
edition = "2024"
license = "GPL-3.0-or-later"
authors = [
Expand All @@ -14,33 +14,31 @@ rust-version = "1.88.0"

[features]
default = ["exporter-html", "exporter-zip-of-files"]
exporter-excel = ["dep:rust_xlsxwriter"]
exporter-html = ["dep:build_html", "dep:html-escape"]
exporter-excel = ["dep:markdown", "dep:rust_xlsxwriter"]
exporter-html = ["dep:build_html", "dep:html-escape", "dep:markdown"]
exporter-zip-of-files = []

[dependencies]
base64 = "0.22.1"
biscuit = "0.7.0"
build_html = { version = "2.5.0", optional = true }
chrono = { version = "0.4.38", features = ["serde"] }
getset = "0.1.2"
html-escape = { version = "0.2.13", optional = true }
infer = "0.19.0"
jsonschema = "0.33.0"
rust_xlsxwriter = { version = "0.90.0", features = ["chrono"], optional = true }
jsonschema = "0.37.4"
markdown = { version = "1.0.0", optional = true }
rust_xlsxwriter = { version = "0.92.2", features = ["chrono"], optional = true }
serde = { version = "1.0.200", features = ["derive"] }
serde_json = "1.0.116"
serde_json_canonicalizer = "0.3.1"
sha256 = "1.5.0"
thiserror = "2.0.4"
tracing = "0.1.41"
uuid = { version = "1.8.0", features = ["v4", "fast-rng", "serde"] }
zip = "5.1.1"
uuid = { version = "1.8.0", features = ["v7", "fast-rng", "serde"] }
zip = "6.0.0"

# Remove when AngelMark deprecated
pest = "2.7.15"
# Remove when AngelMark deprecated
pest_derive = "2.7.15"
# Remove when AngelMark deprecated
regex = "1.11.1"

[target.'cfg(windows)'.dependencies]
winapi = { version = "0.3.9", features = ["fileapi", "winnt"] }
[dev-dependencies]
outdir-tempdir = "0.2.0"
rand = "0.9.2"
tracing-subscriber = { version = "0.3.22", features = ["env-filter"] }
13 changes: 11 additions & 2 deletions schemas/manifest.2.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
},
"required": ["title", "authors"]
},
"custom_test_case_metadata": {
"custom_metadata": {
"type": "object",
"description": "Custom metadata fields for test cases",
"patternProperties": {
Expand Down Expand Up @@ -91,9 +91,18 @@
"type": "string",
"format": "uuid",
"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`."
},
"attestations": {
"type": "array",
"description": "An array of attestations over this test case.",
"items": {
"type": "string",
"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].",
"pattern": "^[A-z0-9_-]+\\.[A-z0-9_-]+\\.[A-z0-9_-]+$"
}
}
},
"required": ["id"]
"required": ["id", "attestations"]
}
}
},
Expand Down
72 changes: 72 additions & 0 deletions schemas/testcase.2.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"$id": "https://evidenceangel-schemas.hpkns.uk/testcase.2.schema.json",
"$schema": "http://json-schema.org/draft-07/schema",
"type": "object",
"description": "A test case file `testcases/<UUID>.json` as part of an evidence package.",
"properties": {
"metadata": {
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "The title of the test case",
"minLength": 1,
"maxLength": 30
},
"execution_datetime": {
"type": "string",
"format": "date-time",
"description": "The date and time of the execution of this test case starting."
},
"passed": {
"type": ["string", "null"],
"description": "The state of the test case",
"enum": [
"pass",
"fail",
null
]
},
"custom": {
"type": "object",
"description": "Custom metadata values",
"patternProperties": {
".+": {
"type": "string"
}
}
}
},
"required": ["title", "execution_datetime"]
},
"evidence": {
"type": "array",
"items": {
"type": "object",
"description": "A piece of evidence as part of this test case.",
"properties": {
"kind": {
"type": "string",
"description": "The Internet Media Type of the data stored.",
"pattern": "^(\\w*)\\/([\\w\\.-]*)(\\+([\\w\\.-]*))?(;((.+)=(.*);)*(.+)=(.*))?$"
},
"value": {
"type": "string",
"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.",
"pattern": "^(plain:.*)|(media:[0-9a-f]{64})|(base64:[A-z0-9+/]*)$"
},
"caption": {
"type": "string",
"description": "An optional caption for this piece of evidence."
},
"original_filename": {
"type": "string",
"description": "The original filename for File evidence"
}
},
"required": ["kind", "value"]
}
}
},
"required": ["metadata", "evidence"]
}
2 changes: 1 addition & 1 deletion spec/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ FILE="draft-hopkins-evp-spec.md"
RFCXML=$(basename "$FILE" .md).xml

mmark $FILE >"$RFCXML"
xml2rfc --v3 --text --html --pdf $RFCXML
xml2rfc --v3 --text --html $RFCXML
Loading