FUll implementation plan (first draft)
This commit is contained in:
9
docs/events/README.md
Normal file
9
docs/events/README.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# Event Envelope Schemas
|
||||
|
||||
Versioned JSON Schemas for platform events consumed by Scheduler, Notify, and UI.
|
||||
|
||||
- `scanner.report.ready@1.json`
|
||||
- `scheduler.rescan.delta@1.json`
|
||||
- `attestor.logged@1.json`
|
||||
|
||||
Producers must bump the version suffix when introducing breaking changes; consumers validate incoming payloads against these schemas.
|
||||
38
docs/events/attestor.logged@1.json
Normal file
38
docs/events/attestor.logged@1.json
Normal file
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"$id": "https://stella-ops.org/schemas/events/attestor.logged@1.json",
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"type": "object",
|
||||
"required": ["eventId", "kind", "tenant", "ts", "payload"],
|
||||
"properties": {
|
||||
"eventId": {"type": "string", "format": "uuid"},
|
||||
"kind": {"const": "attestor.logged"},
|
||||
"tenant": {"type": "string"},
|
||||
"ts": {"type": "string", "format": "date-time"},
|
||||
"payload": {
|
||||
"type": "object",
|
||||
"required": ["artifactSha256", "rekor", "subject"],
|
||||
"properties": {
|
||||
"artifactSha256": {"type": "string"},
|
||||
"rekor": {
|
||||
"type": "object",
|
||||
"required": ["uuid", "url"],
|
||||
"properties": {
|
||||
"uuid": {"type": "string"},
|
||||
"url": {"type": "string", "format": "uri"},
|
||||
"index": {"type": "integer", "minimum": 0}
|
||||
}
|
||||
},
|
||||
"subject": {
|
||||
"type": "object",
|
||||
"required": ["type", "name"],
|
||||
"properties": {
|
||||
"type": {"enum": ["sbom", "report", "vex-export"]},
|
||||
"name": {"type": "string"}
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
46
docs/events/scanner.report.ready@1.json
Normal file
46
docs/events/scanner.report.ready@1.json
Normal file
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"$id": "https://stella-ops.org/schemas/events/scanner.report.ready@1.json",
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"type": "object",
|
||||
"required": ["eventId", "kind", "tenant", "ts", "scope", "payload"],
|
||||
"properties": {
|
||||
"eventId": {"type": "string", "format": "uuid"},
|
||||
"kind": {"const": "scanner.report.ready"},
|
||||
"tenant": {"type": "string"},
|
||||
"ts": {"type": "string", "format": "date-time"},
|
||||
"scope": {
|
||||
"type": "object",
|
||||
"required": ["repo", "digest"],
|
||||
"properties": {
|
||||
"namespace": {"type": "string"},
|
||||
"repo": {"type": "string"},
|
||||
"digest": {"type": "string"}
|
||||
}
|
||||
},
|
||||
"payload": {
|
||||
"type": "object",
|
||||
"required": ["verdict", "delta", "links"],
|
||||
"properties": {
|
||||
"verdict": {"enum": ["pass", "warn", "fail"]},
|
||||
"delta": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"newCritical": {"type": "integer", "minimum": 0},
|
||||
"newHigh": {"type": "integer", "minimum": 0},
|
||||
"kev": {"type": "array", "items": {"type": "string"}}
|
||||
}
|
||||
},
|
||||
"links": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ui": {"type": "string", "format": "uri"},
|
||||
"rekor": {"type": "string", "format": "uri"}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
33
docs/events/scheduler.rescan.delta@1.json
Normal file
33
docs/events/scheduler.rescan.delta@1.json
Normal file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"$id": "https://stella-ops.org/schemas/events/scheduler.rescan.delta@1.json",
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"type": "object",
|
||||
"required": ["eventId", "kind", "tenant", "ts", "payload"],
|
||||
"properties": {
|
||||
"eventId": {"type": "string", "format": "uuid"},
|
||||
"kind": {"const": "scheduler.rescan.delta"},
|
||||
"tenant": {"type": "string"},
|
||||
"ts": {"type": "string", "format": "date-time"},
|
||||
"payload": {
|
||||
"type": "object",
|
||||
"required": ["scheduleId", "impactedDigests", "summary"],
|
||||
"properties": {
|
||||
"scheduleId": {"type": "string"},
|
||||
"impactedDigests": {
|
||||
"type": "array",
|
||||
"items": {"type": "string"}
|
||||
},
|
||||
"summary": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"newCritical": {"type": "integer", "minimum": 0},
|
||||
"newHigh": {"type": "integer", "minimum": 0},
|
||||
"total": {"type": "integer", "minimum": 0}
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
Reference in New Issue
Block a user