Repository navigation
Expand file tree
/
Copy pathplugin-issue.schema.json
More file actions
64 lines (64 loc) · 3.01 KB
/
Copy pathplugin-issue.schema.json
File metadata and controls
64 lines (64 loc) · 3.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://example.invalid/appsec-advisor/plugin-issue.schema.json",
"title": "Opt-in plugin support artifacts",
"description": "Local support input, exact public draft, offer, and publication receipt. Validation does not establish prose anonymity or semantic verification.",
"oneOf": [
{"$ref": "#/$defs/input"},
{"$ref": "#/$defs/draft"},
{"$ref": "#/$defs/offer"},
{"$ref": "#/$defs/receipt"}
],
"$defs": {
"prose": {"type": "string", "minLength": 20, "maxLength": 6000},
"digest": {"type": "string", "pattern": "^[a-f0-9]{64}$"},
"input": {
"type": "object", "additionalProperties": false,
"required": ["schema_version", "issue_id", "source_generated", "title", "expected", "actual", "cause", "verification"],
"properties": {
"schema_version": {"const": 1},
"issue_id": {"type": "string", "pattern": "^ISSUE-[0-9]{3}$"},
"source_generated": {"type": "string", "minLength": 1, "description": "Exact generated value of the inspected run-issues snapshot; never transmitted."},
"title": {"type": "string", "minLength": 10, "maxLength": 120, "pattern": "^[^\r\n]+$"},
"expected": {"$ref": "#/$defs/prose"},
"actual": {"$ref": "#/$defs/prose"},
"cause": {"$ref": "#/$defs/prose"},
"verification": {
"type": "object", "additionalProperties": false,
"required": ["method", "evidence"],
"properties": {
"method": {"enum": ["source_trace", "reproduced"]},
"evidence": {"$ref": "#/$defs/prose"}
}
}
}
},
"draft": {
"type": "object", "additionalProperties": false,
"required": ["schema_version", "issue_id", "snapshot", "title", "body"],
"properties": {
"schema_version": {"const": 1},
"issue_id": {"type": "string", "pattern": "^ISSUE-[0-9]{3}$"},
"snapshot": {"$ref": "#/$defs/digest"},
"title": {"type": "string", "minLength": 10, "maxLength": 120},
"body": {"type": "string", "minLength": 1, "maxLength": 30000}
}
},
"offer": {
"type": "object", "additionalProperties": false,
"required": ["schema_version", "offer", "interactive", "busy"],
"properties": {"schema_version": {"const": 1}, "offer": {"type": "boolean"}, "interactive": {"type": "boolean"}, "busy": {"type": "boolean"}}
},
"receipt": {
"type": "object", "additionalProperties": false,
"required": ["schema_version", "digest", "status", "url"],
"properties": {
"schema_version": {"const": 1},
"digest": {"$ref": "#/$defs/digest"},
"status": {"enum": ["pending", "published"]},
"url": {"type": ["string", "null"], "pattern": "^https://github\\.com/appsec-foundry/appsec-advisor/issues/[1-9][0-9]*$"}
},
"allOf": [{"if": {"properties": {"status": {"const": "published"}}}, "then": {"properties": {"url": {"type": "string"}}}, "else": {"properties": {"url": {"type": "null"}}}}]
}
}
}