304 lines
7.6 KiB
JSON
304 lines
7.6 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"title": "SuccessEnvelope",
|
|
"description": "Versioned successful response.",
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"description": "Operation-specific result.",
|
|
"$ref": "#/$defs/DoctorData"
|
|
},
|
|
"kind": {
|
|
"type": "string",
|
|
"const": "doctor"
|
|
},
|
|
"provenance": {
|
|
"description": "Reproducibility and execution context.",
|
|
"$ref": "#/$defs/ToolProvenance"
|
|
},
|
|
"schema_version": {
|
|
"type": "integer",
|
|
"const": 1
|
|
},
|
|
"warnings": {
|
|
"description": "Deduplicated stable warnings.",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/$defs/Warning"
|
|
}
|
|
}
|
|
},
|
|
"required": [
|
|
"schema_version",
|
|
"kind",
|
|
"provenance",
|
|
"data",
|
|
"warnings"
|
|
],
|
|
"$defs": {
|
|
"AnalysisStoreProvenance": {
|
|
"description": "Analysis Store provenance.",
|
|
"type": "object",
|
|
"properties": {
|
|
"path": {
|
|
"description": "Tagged absolute store path.",
|
|
"$ref": "#/$defs/TaggedPath"
|
|
},
|
|
"source": {
|
|
"description": "Store resolution source.",
|
|
"$ref": "#/$defs/StoreSource"
|
|
}
|
|
},
|
|
"required": [
|
|
"path",
|
|
"source"
|
|
]
|
|
},
|
|
"ComponentReport": {
|
|
"description": "One diagnosed component.",
|
|
"type": "object",
|
|
"properties": {
|
|
"details": {
|
|
"description": "Component-specific facts.",
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
},
|
|
"status": {
|
|
"description": "Stable readiness classification.",
|
|
"$ref": "#/$defs/ComponentStatus"
|
|
}
|
|
},
|
|
"required": [
|
|
"status",
|
|
"details"
|
|
]
|
|
},
|
|
"ComponentStatus": {
|
|
"description": "Doctor component readiness classification.",
|
|
"oneOf": [
|
|
{
|
|
"description": "Component is usable.",
|
|
"type": "string",
|
|
"const": "ready"
|
|
},
|
|
{
|
|
"description": "Component is absent.",
|
|
"type": "string",
|
|
"const": "missing"
|
|
},
|
|
{
|
|
"description": "Component version is unsupported.",
|
|
"type": "string",
|
|
"const": "incompatible"
|
|
},
|
|
{
|
|
"description": "Component configuration is invalid.",
|
|
"type": "string",
|
|
"const": "invalid"
|
|
},
|
|
{
|
|
"description": "Component storage cannot be written.",
|
|
"type": "string",
|
|
"const": "unwritable"
|
|
}
|
|
]
|
|
},
|
|
"DoctorData": {
|
|
"description": "Installation diagnosis data.",
|
|
"type": "object",
|
|
"properties": {
|
|
"components": {
|
|
"description": "Typed component reports keyed by stable component name.",
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"$ref": "#/$defs/ComponentReport"
|
|
}
|
|
},
|
|
"ready": {
|
|
"description": "True only when every required component is ready.",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": [
|
|
"ready",
|
|
"components"
|
|
]
|
|
},
|
|
"SandboxBackend": {
|
|
"description": "Sandbox backend.",
|
|
"oneOf": [
|
|
{
|
|
"description": "Bubblewrap namespaces.",
|
|
"type": "string",
|
|
"const": "bubblewrap"
|
|
},
|
|
{
|
|
"description": "Caller-supplied isolation.",
|
|
"type": "string",
|
|
"const": "external"
|
|
},
|
|
{
|
|
"description": "Isolation disabled.",
|
|
"type": "string",
|
|
"const": "off"
|
|
}
|
|
]
|
|
},
|
|
"SandboxProvenance": {
|
|
"description": "Worker sandbox provenance.",
|
|
"type": "object",
|
|
"properties": {
|
|
"backend": {
|
|
"description": "Selected backend.",
|
|
"$ref": "#/$defs/SandboxBackend"
|
|
},
|
|
"verification": {
|
|
"description": "Isolation verification state.",
|
|
"$ref": "#/$defs/SandboxVerification"
|
|
}
|
|
},
|
|
"required": [
|
|
"backend",
|
|
"verification"
|
|
]
|
|
},
|
|
"SandboxVerification": {
|
|
"description": "Sandbox verification state.",
|
|
"oneOf": [
|
|
{
|
|
"description": "Verified by `ghidr`.",
|
|
"type": "string",
|
|
"const": "verified"
|
|
},
|
|
{
|
|
"description": "Declared but not verifiable by `ghidr`.",
|
|
"type": "string",
|
|
"const": "unverified"
|
|
},
|
|
{
|
|
"description": "Explicitly disabled.",
|
|
"type": "string",
|
|
"const": "disabled"
|
|
}
|
|
]
|
|
},
|
|
"StoreSource": {
|
|
"description": "Analysis Store resolution source.",
|
|
"oneOf": [
|
|
{
|
|
"description": "Explicit `--store` flag.",
|
|
"type": "string",
|
|
"const": "cli"
|
|
},
|
|
{
|
|
"description": "`GHIDR_STORE` environment variable.",
|
|
"type": "string",
|
|
"const": "environment"
|
|
},
|
|
{
|
|
"description": "Explicit `XDG_CACHE_HOME` fallback.",
|
|
"type": "string",
|
|
"const": "xdg"
|
|
},
|
|
{
|
|
"description": "Home-directory fallback.",
|
|
"type": "string",
|
|
"const": "home_fallback"
|
|
}
|
|
]
|
|
},
|
|
"TaggedPath": {
|
|
"description": "A path preserving either UTF-8 text or exact Unix bytes.",
|
|
"oneOf": [
|
|
{
|
|
"description": "An unmodified UTF-8 path.",
|
|
"type": "object",
|
|
"properties": {
|
|
"encoding": {
|
|
"type": "string",
|
|
"const": "utf8"
|
|
},
|
|
"value": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"encoding",
|
|
"value"
|
|
]
|
|
},
|
|
{
|
|
"description": "Standard padded Base64 over exact Unix path bytes.",
|
|
"type": "object",
|
|
"properties": {
|
|
"encoding": {
|
|
"type": "string",
|
|
"const": "unix_bytes_base64"
|
|
},
|
|
"value": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"encoding",
|
|
"value"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"ToolProvenance": {
|
|
"description": "Minimal provenance available to non-Sample operations.",
|
|
"type": "object",
|
|
"properties": {
|
|
"adapter_protocol_version": {
|
|
"description": "Rust/Java protocol version.",
|
|
"type": "integer",
|
|
"format": "uint32",
|
|
"minimum": 0
|
|
},
|
|
"analysis_store": {
|
|
"description": "Selected Analysis Store.",
|
|
"$ref": "#/$defs/AnalysisStoreProvenance"
|
|
},
|
|
"ghidr_version": {
|
|
"description": "CLI package version.",
|
|
"type": "string"
|
|
},
|
|
"sandbox": {
|
|
"description": "Selected sandbox policy.",
|
|
"$ref": "#/$defs/SandboxProvenance"
|
|
}
|
|
},
|
|
"required": [
|
|
"ghidr_version",
|
|
"adapter_protocol_version",
|
|
"analysis_store",
|
|
"sandbox"
|
|
]
|
|
},
|
|
"Warning": {
|
|
"description": "Stable non-fatal warning.",
|
|
"type": "object",
|
|
"properties": {
|
|
"code": {
|
|
"description": "Stable machine identifier.",
|
|
"type": "string"
|
|
},
|
|
"details": {
|
|
"description": "Warning-specific context, always an object.",
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
},
|
|
"message": {
|
|
"description": "Concise human context.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"code",
|
|
"message",
|
|
"details"
|
|
]
|
|
}
|
|
}
|
|
}
|