feat: scaffold v0.1 foundation
This commit is contained in:
parent
c4fb0c6a01
commit
170ca32f58
34 changed files with 6175 additions and 5 deletions
167
schemas/v1/analysis-profile.schema.json
Normal file
167
schemas/v1/analysis-profile.schema.json
Normal file
|
|
@ -0,0 +1,167 @@
|
|||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"title": "AnalysisProfile",
|
||||
"description": "Canonical Analysis Profile document whose exact JSON bytes are hashed.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"analysis_adapter_version": {
|
||||
"description": "Analysis adapter implementation version.",
|
||||
"type": "integer",
|
||||
"format": "uint32",
|
||||
"minimum": 0
|
||||
},
|
||||
"analyzer_options": {
|
||||
"description": "Fully resolved, bytewise-name-sorted analyzer options.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/$defs/ProfileOption"
|
||||
}
|
||||
},
|
||||
"ghidra_version": {
|
||||
"description": "Exact Ghidra version.",
|
||||
"type": "string"
|
||||
},
|
||||
"java_version": {
|
||||
"description": "Exact Java major version.",
|
||||
"type": "string"
|
||||
},
|
||||
"loader_options": {
|
||||
"description": "Fully resolved, bytewise-name-sorted loader options.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/$defs/ProfileOption"
|
||||
}
|
||||
},
|
||||
"max_cpu": {
|
||||
"description": "Maximum analysis CPU count.",
|
||||
"$ref": "#/$defs/PositiveU64"
|
||||
},
|
||||
"profile_version": {
|
||||
"type": "integer",
|
||||
"const": 1
|
||||
},
|
||||
"target": {
|
||||
"description": "Analysis-affecting Target Specification.",
|
||||
"$ref": "#/$defs/ProfileTarget"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"profile_version",
|
||||
"ghidra_version",
|
||||
"java_version",
|
||||
"analysis_adapter_version",
|
||||
"target",
|
||||
"loader_options",
|
||||
"analyzer_options",
|
||||
"max_cpu"
|
||||
],
|
||||
"$defs": {
|
||||
"PositiveU64": {
|
||||
"description": "A validated positive integer accepted by resource-limit flags.",
|
||||
"type": "integer",
|
||||
"format": "uint64",
|
||||
"minimum": 1
|
||||
},
|
||||
"ProfileOption": {
|
||||
"description": "Fully resolved typed Ghidra option.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"description": "Canonical option name.",
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"description": "Typed canonical value without floating-point data.",
|
||||
"$ref": "#/$defs/ProfileOptionValue"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"name",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"ProfileOptionValue": {
|
||||
"description": "Values permitted in canonical profile options.",
|
||||
"oneOf": [
|
||||
{
|
||||
"description": "Boolean option.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"const": "boolean"
|
||||
},
|
||||
"value": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Signed integer option.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"const": "integer"
|
||||
},
|
||||
"value": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Exact UTF-8 string option.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"const": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type",
|
||||
"value"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ProfileTarget": {
|
||||
"description": "Target fields which affect Analysis identity.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"compiler_specification": {
|
||||
"description": "Exact compiler-specification identifier.",
|
||||
"type": "string"
|
||||
},
|
||||
"loader": {
|
||||
"description": "Exact loader identifier.",
|
||||
"type": "string"
|
||||
},
|
||||
"processor_language": {
|
||||
"description": "Exact processor-language identifier.",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"loader",
|
||||
"processor_language",
|
||||
"compiler_specification"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
417
schemas/v1/cleanup.schema.json
Normal file
417
schemas/v1/cleanup.schema.json
Normal file
|
|
@ -0,0 +1,417 @@
|
|||
{
|
||||
"$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/CleanupData"
|
||||
},
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"const": "cleanup"
|
||||
},
|
||||
"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"
|
||||
]
|
||||
},
|
||||
"CleanupData": {
|
||||
"description": "Cleanup result data; detailed count contracts are carried as typed snapshots.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"matched": {
|
||||
"description": "Preflight match snapshot.",
|
||||
"$ref": "#/$defs/CleanupSnapshot"
|
||||
},
|
||||
"mode": {
|
||||
"description": "Execution or dry-run mode.",
|
||||
"$ref": "#/$defs/CleanupMode"
|
||||
},
|
||||
"removed": {
|
||||
"description": "Exact removed snapshot, null for dry runs.",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/$defs/CleanupSnapshot"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"target": {
|
||||
"description": "Resolved cleanup target.",
|
||||
"$ref": "#/$defs/CleanupTarget"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"mode",
|
||||
"target",
|
||||
"matched"
|
||||
]
|
||||
},
|
||||
"CleanupMode": {
|
||||
"description": "Cleanup mode.",
|
||||
"oneOf": [
|
||||
{
|
||||
"description": "Data was removed.",
|
||||
"type": "string",
|
||||
"const": "executed"
|
||||
},
|
||||
{
|
||||
"description": "No data was removed.",
|
||||
"type": "string",
|
||||
"const": "dry_run"
|
||||
}
|
||||
]
|
||||
},
|
||||
"CleanupSnapshot": {
|
||||
"description": "Counts and disk usage associated with cleanup targets.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"analyses": {
|
||||
"description": "Complete Analyses.",
|
||||
"type": "integer",
|
||||
"format": "uint64",
|
||||
"minimum": 0
|
||||
},
|
||||
"analysis_profile_sha256": {
|
||||
"description": "Unique bytewise-sorted Analysis Profile digests.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/$defs/Digest"
|
||||
}
|
||||
},
|
||||
"artifacts": {
|
||||
"description": "Query Artifacts.",
|
||||
"type": "integer",
|
||||
"format": "uint64",
|
||||
"minimum": 0
|
||||
},
|
||||
"diagnostic_logs": {
|
||||
"description": "Diagnostic Log bundles.",
|
||||
"type": "integer",
|
||||
"format": "uint64",
|
||||
"minimum": 0
|
||||
},
|
||||
"quarantined_analyses": {
|
||||
"description": "Quarantined Analyses.",
|
||||
"type": "integer",
|
||||
"format": "uint64",
|
||||
"minimum": 0
|
||||
},
|
||||
"usage": {
|
||||
"description": "Logical and allocated usage.",
|
||||
"$ref": "#/$defs/StorageUsage"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"analyses",
|
||||
"quarantined_analyses",
|
||||
"artifacts",
|
||||
"diagnostic_logs",
|
||||
"usage",
|
||||
"analysis_profile_sha256"
|
||||
]
|
||||
},
|
||||
"CleanupTarget": {
|
||||
"description": "Resolved cleanup target.",
|
||||
"oneOf": [
|
||||
{
|
||||
"description": "Digest resolved from a caller Sample.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"const": "sample"
|
||||
},
|
||||
"sha256": {
|
||||
"description": "Resolved content identity.",
|
||||
"$ref": "#/$defs/Digest"
|
||||
},
|
||||
"source_path": {
|
||||
"description": "Exact caller path.",
|
||||
"$ref": "#/$defs/TaggedPath"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"kind",
|
||||
"source_path",
|
||||
"sha256"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Caller-supplied digest.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"const": "digest"
|
||||
},
|
||||
"sha256": {
|
||||
"description": "Selected content identity.",
|
||||
"$ref": "#/$defs/Digest"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"kind",
|
||||
"sha256"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Entire Analysis Store.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"const": "all"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"kind"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"Digest": {
|
||||
"description": "A lowercase SHA-256 digest.",
|
||||
"type": "string"
|
||||
},
|
||||
"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"
|
||||
}
|
||||
]
|
||||
},
|
||||
"StorageUsage": {
|
||||
"description": "Filesystem usage represented without implying freed space.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"allocated_bytes": {
|
||||
"description": "Sum of Linux allocated blocks including directories.",
|
||||
"type": "integer",
|
||||
"format": "uint64",
|
||||
"minimum": 0
|
||||
},
|
||||
"logical_bytes": {
|
||||
"description": "Sum of file lengths.",
|
||||
"type": "integer",
|
||||
"format": "uint64",
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"logical_bytes",
|
||||
"allocated_bytes"
|
||||
]
|
||||
},
|
||||
"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"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
507
schemas/v1/decompilation.schema.json
Normal file
507
schemas/v1/decompilation.schema.json
Normal file
|
|
@ -0,0 +1,507 @@
|
|||
{
|
||||
"$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/DecompilationData"
|
||||
},
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"const": "decompilation"
|
||||
},
|
||||
"provenance": {
|
||||
"description": "Reproducibility and execution context.",
|
||||
"$ref": "#/$defs/QueryProvenance"
|
||||
},
|
||||
"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": {
|
||||
"Address": {
|
||||
"description": "A Ghidra address with an explicit, case-sensitive address space.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"offset": {
|
||||
"description": "Canonical lowercase, `0x`-prefixed, even-width hexadecimal offset.",
|
||||
"type": "string"
|
||||
},
|
||||
"space": {
|
||||
"description": "Exact Ghidra address-space name.",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"space",
|
||||
"offset"
|
||||
]
|
||||
},
|
||||
"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"
|
||||
]
|
||||
},
|
||||
"DecompilationData": {
|
||||
"description": "Successful targeted decompilation data.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"decompilation": {
|
||||
"description": "Complete normalized Ghidra C-like text.",
|
||||
"$ref": "#/$defs/DecompiledText"
|
||||
},
|
||||
"function": {
|
||||
"description": "Unambiguously resolved Function.",
|
||||
"$ref": "#/$defs/SelectedFunction"
|
||||
},
|
||||
"requested_selector": {
|
||||
"description": "Exact selector supplied by the caller.",
|
||||
"$ref": "#/$defs/FunctionSelector"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"requested_selector",
|
||||
"function",
|
||||
"decompilation"
|
||||
]
|
||||
},
|
||||
"DecompilationSyntax": {
|
||||
"description": "Decompiled text representation.",
|
||||
"oneOf": [
|
||||
{
|
||||
"description": "Ghidra's C-like representation.",
|
||||
"type": "string",
|
||||
"const": "ghidra_c"
|
||||
}
|
||||
]
|
||||
},
|
||||
"DecompiledText": {
|
||||
"description": "Complete decompiler text.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"syntax": {
|
||||
"description": "Always `ghidra_c` in version 0.1.",
|
||||
"$ref": "#/$defs/DecompilationSyntax"
|
||||
},
|
||||
"text": {
|
||||
"description": "Complete text with only line endings normalized to LF.",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"syntax",
|
||||
"text"
|
||||
]
|
||||
},
|
||||
"Digest": {
|
||||
"description": "A lowercase SHA-256 digest.",
|
||||
"type": "string"
|
||||
},
|
||||
"FunctionSelector": {
|
||||
"description": "Exactly one explicit Function Selector.",
|
||||
"oneOf": [
|
||||
{
|
||||
"description": "Exact, case-sensitive Ghidra function name.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"const": "name"
|
||||
},
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"kind",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Exact function entry address.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"const": "address"
|
||||
},
|
||||
"value": {
|
||||
"$ref": "#/$defs/Address"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"kind",
|
||||
"value"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"Limits": {
|
||||
"description": "Resource policy selected for one invocation.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"analysis_timeout_seconds": {
|
||||
"description": "Native analysis timeout.",
|
||||
"$ref": "#/$defs/PositiveU64"
|
||||
},
|
||||
"child_watchdog_seconds": {
|
||||
"description": "Derived process watchdog.",
|
||||
"$ref": "#/$defs/PositiveU64"
|
||||
},
|
||||
"decompile_timeout_seconds": {
|
||||
"description": "Optional native decompilation timeout.",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/$defs/PositiveU64"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"max_cpu": {
|
||||
"description": "Maximum Ghidra analysis CPU count.",
|
||||
"$ref": "#/$defs/PositiveU64"
|
||||
},
|
||||
"max_heap_mib": {
|
||||
"description": "Maximum Java heap, in MiB.",
|
||||
"$ref": "#/$defs/PositiveU64"
|
||||
},
|
||||
"max_inline_bytes": {
|
||||
"description": "Maximum serialized successful stdout size.",
|
||||
"$ref": "#/$defs/PositiveU64"
|
||||
},
|
||||
"max_sample_bytes": {
|
||||
"description": "Maximum accepted Sample size.",
|
||||
"$ref": "#/$defs/PositiveU64"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"max_heap_mib",
|
||||
"max_cpu",
|
||||
"analysis_timeout_seconds",
|
||||
"child_watchdog_seconds",
|
||||
"max_sample_bytes",
|
||||
"max_inline_bytes"
|
||||
]
|
||||
},
|
||||
"PositiveU64": {
|
||||
"description": "A validated positive integer accepted by resource-limit flags.",
|
||||
"type": "integer",
|
||||
"format": "uint64",
|
||||
"minimum": 1
|
||||
},
|
||||
"QueryProvenance": {
|
||||
"description": "Fixed provenance for every Sample-backed Query.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"adapter_protocol_version": {
|
||||
"description": "Rust/Java protocol version.",
|
||||
"type": "integer",
|
||||
"format": "uint32",
|
||||
"minimum": 0
|
||||
},
|
||||
"analysis_profile_sha256": {
|
||||
"description": "Canonical Analysis Profile identity.",
|
||||
"$ref": "#/$defs/Digest"
|
||||
},
|
||||
"analysis_store": {
|
||||
"description": "Selected Analysis Store.",
|
||||
"$ref": "#/$defs/AnalysisStoreProvenance"
|
||||
},
|
||||
"ghidr_version": {
|
||||
"description": "CLI package version.",
|
||||
"type": "string"
|
||||
},
|
||||
"ghidra_version": {
|
||||
"description": "Ghidra version.",
|
||||
"type": "string"
|
||||
},
|
||||
"java_version": {
|
||||
"description": "Java major version.",
|
||||
"type": "string"
|
||||
},
|
||||
"limits": {
|
||||
"description": "Selected and derived resource limits.",
|
||||
"$ref": "#/$defs/Limits"
|
||||
},
|
||||
"sample_sha256": {
|
||||
"description": "Sample content identity.",
|
||||
"$ref": "#/$defs/Digest"
|
||||
},
|
||||
"sandbox": {
|
||||
"description": "Selected sandbox policy.",
|
||||
"$ref": "#/$defs/SandboxProvenance"
|
||||
},
|
||||
"source_path": {
|
||||
"description": "Exact caller-supplied path.",
|
||||
"$ref": "#/$defs/TaggedPath"
|
||||
},
|
||||
"target": {
|
||||
"description": "Resolved Target Specification and verification.",
|
||||
"$ref": "#/$defs/TargetProvenance"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"ghidr_version",
|
||||
"adapter_protocol_version",
|
||||
"ghidra_version",
|
||||
"java_version",
|
||||
"sample_sha256",
|
||||
"source_path",
|
||||
"analysis_profile_sha256",
|
||||
"target",
|
||||
"analysis_store",
|
||||
"sandbox",
|
||||
"limits"
|
||||
]
|
||||
},
|
||||
"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"
|
||||
}
|
||||
]
|
||||
},
|
||||
"SelectedFunction": {
|
||||
"description": "Identity of a selected Function.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"entry": {
|
||||
"description": "Entry Address.",
|
||||
"$ref": "#/$defs/Address"
|
||||
},
|
||||
"name": {
|
||||
"description": "Exact basename.",
|
||||
"type": "string"
|
||||
},
|
||||
"qualified_name": {
|
||||
"description": "Exact fully-qualified name.",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"name",
|
||||
"qualified_name",
|
||||
"entry"
|
||||
]
|
||||
},
|
||||
"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"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TargetProvenance": {
|
||||
"description": "Target Specification provenance.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"compiler_specification": {
|
||||
"description": "Exact compiler-specification identifier.",
|
||||
"type": "string"
|
||||
},
|
||||
"format": {
|
||||
"description": "Executable format name.",
|
||||
"type": "string"
|
||||
},
|
||||
"loader": {
|
||||
"description": "Exact loader identifier.",
|
||||
"type": "string"
|
||||
},
|
||||
"processor_language": {
|
||||
"description": "Exact processor-language identifier.",
|
||||
"type": "string"
|
||||
},
|
||||
"verification": {
|
||||
"description": "Project integration-test coverage.",
|
||||
"$ref": "#/$defs/TargetVerification"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"loader",
|
||||
"format",
|
||||
"processor_language",
|
||||
"compiler_specification",
|
||||
"verification"
|
||||
]
|
||||
},
|
||||
"TargetVerification": {
|
||||
"description": "Project integration-test coverage for a recognized target.",
|
||||
"oneOf": [
|
||||
{
|
||||
"description": "Covered by version 0.1 real-Ghidra fixtures.",
|
||||
"type": "string",
|
||||
"const": "verified"
|
||||
},
|
||||
{
|
||||
"description": "Recognized by Ghidra but outside the tested matrix.",
|
||||
"type": "string",
|
||||
"const": "unverified"
|
||||
}
|
||||
]
|
||||
},
|
||||
"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"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
304
schemas/v1/doctor.schema.json
Normal file
304
schemas/v1/doctor.schema.json
Normal file
|
|
@ -0,0 +1,304 @@
|
|||
{
|
||||
"$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"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
241
schemas/v1/error.schema.json
Normal file
241
schemas/v1/error.schema.json
Normal file
|
|
@ -0,0 +1,241 @@
|
|||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"title": "ErrorEnvelope",
|
||||
"description": "Versioned failure document.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"error": {
|
||||
"description": "Typed failure body.",
|
||||
"$ref": "#/$defs/ErrorBody"
|
||||
},
|
||||
"kind": {
|
||||
"description": "Always `error`.",
|
||||
"$ref": "#/$defs/ErrorKind"
|
||||
},
|
||||
"schema_version": {
|
||||
"type": "integer",
|
||||
"const": 1
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"schema_version",
|
||||
"kind",
|
||||
"error"
|
||||
],
|
||||
"$defs": {
|
||||
"ErrorBody": {
|
||||
"description": "Stable public error body.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"description": "Stable machine identifier.",
|
||||
"$ref": "#/$defs/ErrorCode"
|
||||
},
|
||||
"details": {
|
||||
"description": "Code-specific structured context, always an object.",
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
},
|
||||
"message": {
|
||||
"description": "Concise context that is not a control-flow interface.",
|
||||
"type": "string"
|
||||
},
|
||||
"retryable": {
|
||||
"description": "Whether the same logical request might later succeed unchanged.",
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"code",
|
||||
"message",
|
||||
"retryable",
|
||||
"details"
|
||||
]
|
||||
},
|
||||
"ErrorCode": {
|
||||
"description": "Stable machine-readable error taxonomy available in the foundation.",
|
||||
"oneOf": [
|
||||
{
|
||||
"description": "Command-line syntax or validation failed.",
|
||||
"type": "string",
|
||||
"const": "invalid_arguments"
|
||||
},
|
||||
{
|
||||
"description": "The caller's Sample path does not exist.",
|
||||
"type": "string",
|
||||
"const": "sample_not_found"
|
||||
},
|
||||
{
|
||||
"description": "The caller's Sample cannot be read.",
|
||||
"type": "string",
|
||||
"const": "sample_unreadable"
|
||||
},
|
||||
{
|
||||
"description": "The opened Sample is not a regular file.",
|
||||
"type": "string",
|
||||
"const": "invalid_sample_type"
|
||||
},
|
||||
{
|
||||
"description": "The Sample exceeded the selected byte ceiling.",
|
||||
"type": "string",
|
||||
"const": "sample_too_large"
|
||||
},
|
||||
{
|
||||
"description": "Source metadata changed while snapshotting.",
|
||||
"type": "string",
|
||||
"const": "sample_changed"
|
||||
},
|
||||
{
|
||||
"description": "The Analysis Store lacks the required free-space reserve.",
|
||||
"type": "string",
|
||||
"const": "insufficient_store_space"
|
||||
},
|
||||
{
|
||||
"description": "Ghidra could not recognize a Target Specification.",
|
||||
"type": "string",
|
||||
"const": "unsupported_target"
|
||||
},
|
||||
{
|
||||
"description": "Ghidra found multiple Target Specification candidates.",
|
||||
"type": "string",
|
||||
"const": "ambiguous_target"
|
||||
},
|
||||
{
|
||||
"description": "Ghidra is not installed.",
|
||||
"type": "string",
|
||||
"const": "ghidra_missing"
|
||||
},
|
||||
{
|
||||
"description": "The installed Ghidra version is incompatible.",
|
||||
"type": "string",
|
||||
"const": "ghidra_incompatible"
|
||||
},
|
||||
{
|
||||
"description": "Java is not installed.",
|
||||
"type": "string",
|
||||
"const": "java_missing"
|
||||
},
|
||||
{
|
||||
"description": "The installed Java version is incompatible.",
|
||||
"type": "string",
|
||||
"const": "java_incompatible"
|
||||
},
|
||||
{
|
||||
"description": "A later integration layer has not connected execution yet.",
|
||||
"type": "string",
|
||||
"const": "internal_not_implemented"
|
||||
},
|
||||
{
|
||||
"description": "Rust/Java request or response validation failed.",
|
||||
"type": "string",
|
||||
"const": "protocol_violation"
|
||||
},
|
||||
{
|
||||
"description": "The child exceeded a native or watchdog timeout.",
|
||||
"type": "string",
|
||||
"const": "timeout"
|
||||
},
|
||||
{
|
||||
"description": "Native auto-analysis timed out.",
|
||||
"type": "string",
|
||||
"const": "analysis_timeout"
|
||||
},
|
||||
{
|
||||
"description": "Ghidra auto-analysis failed.",
|
||||
"type": "string",
|
||||
"const": "analysis_failed"
|
||||
},
|
||||
{
|
||||
"description": "Native Function decompilation timed out.",
|
||||
"type": "string",
|
||||
"const": "decompile_timeout"
|
||||
},
|
||||
{
|
||||
"description": "Ghidra Function decompilation failed.",
|
||||
"type": "string",
|
||||
"const": "decompilation_failed"
|
||||
},
|
||||
{
|
||||
"description": "The caller interrupted the operation.",
|
||||
"type": "string",
|
||||
"const": "interrupted"
|
||||
},
|
||||
{
|
||||
"description": "The adapter could not serialize a bounded response.",
|
||||
"type": "string",
|
||||
"const": "result_too_large"
|
||||
},
|
||||
{
|
||||
"description": "The success descriptor cannot fit the requested inline budget.",
|
||||
"type": "string",
|
||||
"const": "inline_budget_too_small"
|
||||
},
|
||||
{
|
||||
"description": "Store-wide cleanup lacks explicit confirmation.",
|
||||
"type": "string",
|
||||
"const": "confirmation_required"
|
||||
},
|
||||
{
|
||||
"description": "Another process holds the selected Analysis lock.",
|
||||
"type": "string",
|
||||
"const": "analysis_busy"
|
||||
},
|
||||
{
|
||||
"description": "Stored Analysis validation failed and recovery did not succeed.",
|
||||
"type": "string",
|
||||
"const": "corrupt_analysis"
|
||||
},
|
||||
{
|
||||
"description": "A cleanup transaction requires a recoverable retry.",
|
||||
"type": "string",
|
||||
"const": "cleanup_incomplete"
|
||||
},
|
||||
{
|
||||
"description": "The resolved Analysis Store path is invalid.",
|
||||
"type": "string",
|
||||
"const": "invalid_store_path"
|
||||
},
|
||||
{
|
||||
"description": "A Function Selector resolved to no Function.",
|
||||
"type": "string",
|
||||
"const": "function_not_found"
|
||||
},
|
||||
{
|
||||
"description": "A Function Selector resolved to multiple Functions.",
|
||||
"type": "string",
|
||||
"const": "function_selector_ambiguous"
|
||||
},
|
||||
{
|
||||
"description": "An Address is not a Function entry.",
|
||||
"type": "string",
|
||||
"const": "function_entry_required"
|
||||
},
|
||||
{
|
||||
"description": "Ghidra does not contain the requested address space.",
|
||||
"type": "string",
|
||||
"const": "address_space_not_found"
|
||||
},
|
||||
{
|
||||
"description": "Installation diagnosis found an unusable component.",
|
||||
"type": "string",
|
||||
"const": "doctor_failed"
|
||||
},
|
||||
{
|
||||
"description": "A general runtime or integration failure.",
|
||||
"type": "string",
|
||||
"const": "internal"
|
||||
}
|
||||
]
|
||||
},
|
||||
"ErrorKind": {
|
||||
"description": "Error envelope discriminator.",
|
||||
"oneOf": [
|
||||
{
|
||||
"description": "A failed invocation.",
|
||||
"type": "string",
|
||||
"const": "error"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
539
schemas/v1/functions.schema.json
Normal file
539
schemas/v1/functions.schema.json
Normal file
|
|
@ -0,0 +1,539 @@
|
|||
{
|
||||
"$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/FunctionsData"
|
||||
},
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"const": "functions"
|
||||
},
|
||||
"provenance": {
|
||||
"description": "Reproducibility and execution context.",
|
||||
"$ref": "#/$defs/QueryProvenance"
|
||||
},
|
||||
"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": {
|
||||
"Address": {
|
||||
"description": "A Ghidra address with an explicit, case-sensitive address space.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"offset": {
|
||||
"description": "Canonical lowercase, `0x`-prefixed, even-width hexadecimal offset.",
|
||||
"type": "string"
|
||||
},
|
||||
"space": {
|
||||
"description": "Exact Ghidra address-space name.",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"space",
|
||||
"offset"
|
||||
]
|
||||
},
|
||||
"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"
|
||||
]
|
||||
},
|
||||
"Digest": {
|
||||
"description": "A lowercase SHA-256 digest.",
|
||||
"type": "string"
|
||||
},
|
||||
"FunctionItem": {
|
||||
"description": "Minimal version 0.1 Function record.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"body_address_count": {
|
||||
"description": "Number of Addresses in the body.",
|
||||
"type": "integer",
|
||||
"format": "uint64",
|
||||
"minimum": 0
|
||||
},
|
||||
"decompilable": {
|
||||
"description": "Whether the Function is a valid decompilation target.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"entry": {
|
||||
"description": "Function entry Address.",
|
||||
"$ref": "#/$defs/Address"
|
||||
},
|
||||
"is_external": {
|
||||
"description": "Whether Ghidra marks the Function external.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"is_thunk": {
|
||||
"description": "Whether Ghidra marks the Function a thunk.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"location": {
|
||||
"description": "Memory or external location.",
|
||||
"$ref": "#/$defs/FunctionLocation"
|
||||
},
|
||||
"name": {
|
||||
"description": "Exact basename.",
|
||||
"type": "string"
|
||||
},
|
||||
"qualified_name": {
|
||||
"description": "Exact fully-qualified name.",
|
||||
"type": "string"
|
||||
},
|
||||
"thunk_target_entry": {
|
||||
"description": "Resolved thunk target entry when available.",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/$defs/Address"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"name",
|
||||
"qualified_name",
|
||||
"entry",
|
||||
"body_address_count",
|
||||
"location",
|
||||
"is_external",
|
||||
"is_thunk",
|
||||
"decompilable"
|
||||
]
|
||||
},
|
||||
"FunctionLocation": {
|
||||
"description": "Function location class used by stable ordering.",
|
||||
"oneOf": [
|
||||
{
|
||||
"description": "Function has a memory Address.",
|
||||
"type": "string",
|
||||
"const": "memory"
|
||||
},
|
||||
{
|
||||
"description": "External/imported Function.",
|
||||
"type": "string",
|
||||
"const": "external"
|
||||
}
|
||||
]
|
||||
},
|
||||
"FunctionsData": {
|
||||
"description": "Function collection data.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"items": {
|
||||
"description": "Function records in documented order.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/$defs/FunctionItem"
|
||||
}
|
||||
},
|
||||
"page": {
|
||||
"description": "Stable page facts.",
|
||||
"$ref": "#/$defs/PageMetadata"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"page",
|
||||
"items"
|
||||
]
|
||||
},
|
||||
"Limits": {
|
||||
"description": "Resource policy selected for one invocation.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"analysis_timeout_seconds": {
|
||||
"description": "Native analysis timeout.",
|
||||
"$ref": "#/$defs/PositiveU64"
|
||||
},
|
||||
"child_watchdog_seconds": {
|
||||
"description": "Derived process watchdog.",
|
||||
"$ref": "#/$defs/PositiveU64"
|
||||
},
|
||||
"decompile_timeout_seconds": {
|
||||
"description": "Optional native decompilation timeout.",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/$defs/PositiveU64"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"max_cpu": {
|
||||
"description": "Maximum Ghidra analysis CPU count.",
|
||||
"$ref": "#/$defs/PositiveU64"
|
||||
},
|
||||
"max_heap_mib": {
|
||||
"description": "Maximum Java heap, in MiB.",
|
||||
"$ref": "#/$defs/PositiveU64"
|
||||
},
|
||||
"max_inline_bytes": {
|
||||
"description": "Maximum serialized successful stdout size.",
|
||||
"$ref": "#/$defs/PositiveU64"
|
||||
},
|
||||
"max_sample_bytes": {
|
||||
"description": "Maximum accepted Sample size.",
|
||||
"$ref": "#/$defs/PositiveU64"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"max_heap_mib",
|
||||
"max_cpu",
|
||||
"analysis_timeout_seconds",
|
||||
"child_watchdog_seconds",
|
||||
"max_sample_bytes",
|
||||
"max_inline_bytes"
|
||||
]
|
||||
},
|
||||
"PageMetadata": {
|
||||
"description": "Stable page metadata.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"has_more": {
|
||||
"description": "Whether a subsequent page exists.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"limit": {
|
||||
"description": "Applied item bound, null only for explicit `--all`.",
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
],
|
||||
"format": "uint64",
|
||||
"minimum": 0
|
||||
},
|
||||
"offset": {
|
||||
"description": "Number of items skipped.",
|
||||
"type": "integer",
|
||||
"format": "uint64",
|
||||
"minimum": 0
|
||||
},
|
||||
"order": {
|
||||
"description": "Stable order identifier.",
|
||||
"type": "string"
|
||||
},
|
||||
"returned": {
|
||||
"description": "Number of returned items.",
|
||||
"type": "integer",
|
||||
"format": "uint64",
|
||||
"minimum": 0
|
||||
},
|
||||
"total": {
|
||||
"description": "Total items in the immutable Analysis.",
|
||||
"type": "integer",
|
||||
"format": "uint64",
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"order",
|
||||
"offset",
|
||||
"returned",
|
||||
"total",
|
||||
"has_more"
|
||||
]
|
||||
},
|
||||
"PositiveU64": {
|
||||
"description": "A validated positive integer accepted by resource-limit flags.",
|
||||
"type": "integer",
|
||||
"format": "uint64",
|
||||
"minimum": 1
|
||||
},
|
||||
"QueryProvenance": {
|
||||
"description": "Fixed provenance for every Sample-backed Query.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"adapter_protocol_version": {
|
||||
"description": "Rust/Java protocol version.",
|
||||
"type": "integer",
|
||||
"format": "uint32",
|
||||
"minimum": 0
|
||||
},
|
||||
"analysis_profile_sha256": {
|
||||
"description": "Canonical Analysis Profile identity.",
|
||||
"$ref": "#/$defs/Digest"
|
||||
},
|
||||
"analysis_store": {
|
||||
"description": "Selected Analysis Store.",
|
||||
"$ref": "#/$defs/AnalysisStoreProvenance"
|
||||
},
|
||||
"ghidr_version": {
|
||||
"description": "CLI package version.",
|
||||
"type": "string"
|
||||
},
|
||||
"ghidra_version": {
|
||||
"description": "Ghidra version.",
|
||||
"type": "string"
|
||||
},
|
||||
"java_version": {
|
||||
"description": "Java major version.",
|
||||
"type": "string"
|
||||
},
|
||||
"limits": {
|
||||
"description": "Selected and derived resource limits.",
|
||||
"$ref": "#/$defs/Limits"
|
||||
},
|
||||
"sample_sha256": {
|
||||
"description": "Sample content identity.",
|
||||
"$ref": "#/$defs/Digest"
|
||||
},
|
||||
"sandbox": {
|
||||
"description": "Selected sandbox policy.",
|
||||
"$ref": "#/$defs/SandboxProvenance"
|
||||
},
|
||||
"source_path": {
|
||||
"description": "Exact caller-supplied path.",
|
||||
"$ref": "#/$defs/TaggedPath"
|
||||
},
|
||||
"target": {
|
||||
"description": "Resolved Target Specification and verification.",
|
||||
"$ref": "#/$defs/TargetProvenance"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"ghidr_version",
|
||||
"adapter_protocol_version",
|
||||
"ghidra_version",
|
||||
"java_version",
|
||||
"sample_sha256",
|
||||
"source_path",
|
||||
"analysis_profile_sha256",
|
||||
"target",
|
||||
"analysis_store",
|
||||
"sandbox",
|
||||
"limits"
|
||||
]
|
||||
},
|
||||
"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"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TargetProvenance": {
|
||||
"description": "Target Specification provenance.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"compiler_specification": {
|
||||
"description": "Exact compiler-specification identifier.",
|
||||
"type": "string"
|
||||
},
|
||||
"format": {
|
||||
"description": "Executable format name.",
|
||||
"type": "string"
|
||||
},
|
||||
"loader": {
|
||||
"description": "Exact loader identifier.",
|
||||
"type": "string"
|
||||
},
|
||||
"processor_language": {
|
||||
"description": "Exact processor-language identifier.",
|
||||
"type": "string"
|
||||
},
|
||||
"verification": {
|
||||
"description": "Project integration-test coverage.",
|
||||
"$ref": "#/$defs/TargetVerification"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"loader",
|
||||
"format",
|
||||
"processor_language",
|
||||
"compiler_specification",
|
||||
"verification"
|
||||
]
|
||||
},
|
||||
"TargetVerification": {
|
||||
"description": "Project integration-test coverage for a recognized target.",
|
||||
"oneOf": [
|
||||
{
|
||||
"description": "Covered by version 0.1 real-Ghidra fixtures.",
|
||||
"type": "string",
|
||||
"const": "verified"
|
||||
},
|
||||
{
|
||||
"description": "Recognized by Ghidra but outside the tested matrix.",
|
||||
"type": "string",
|
||||
"const": "unverified"
|
||||
}
|
||||
]
|
||||
},
|
||||
"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"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
518
schemas/v1/inspection.schema.json
Normal file
518
schemas/v1/inspection.schema.json
Normal file
|
|
@ -0,0 +1,518 @@
|
|||
{
|
||||
"$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/InspectionData"
|
||||
},
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"const": "inspection"
|
||||
},
|
||||
"provenance": {
|
||||
"description": "Reproducibility and execution context.",
|
||||
"$ref": "#/$defs/QueryProvenance"
|
||||
},
|
||||
"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": {
|
||||
"Address": {
|
||||
"description": "A Ghidra address with an explicit, case-sensitive address space.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"offset": {
|
||||
"description": "Canonical lowercase, `0x`-prefixed, even-width hexadecimal offset.",
|
||||
"type": "string"
|
||||
},
|
||||
"space": {
|
||||
"description": "Exact Ghidra address-space name.",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"space",
|
||||
"offset"
|
||||
]
|
||||
},
|
||||
"AnalysisDisposition": {
|
||||
"description": "Analysis selection disposition.",
|
||||
"oneOf": [
|
||||
{
|
||||
"description": "A new Analysis was created.",
|
||||
"type": "string",
|
||||
"const": "created"
|
||||
},
|
||||
{
|
||||
"description": "A compatible Analysis was reused.",
|
||||
"type": "string",
|
||||
"const": "reused"
|
||||
},
|
||||
{
|
||||
"description": "Corrupt stored data was quarantined and rebuilt once.",
|
||||
"type": "string",
|
||||
"const": "rebuilt"
|
||||
}
|
||||
]
|
||||
},
|
||||
"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"
|
||||
]
|
||||
},
|
||||
"AnalysisSummary": {
|
||||
"description": "Analysis selection summary.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"disposition": {
|
||||
"description": "Whether compatible analysis was built or reused.",
|
||||
"$ref": "#/$defs/AnalysisDisposition"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"disposition"
|
||||
]
|
||||
},
|
||||
"Digest": {
|
||||
"description": "A lowercase SHA-256 digest.",
|
||||
"type": "string"
|
||||
},
|
||||
"InspectionData": {
|
||||
"description": "Sample inspection data.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"analysis": {
|
||||
"description": "Reuse disposition.",
|
||||
"$ref": "#/$defs/AnalysisSummary"
|
||||
},
|
||||
"program": {
|
||||
"description": "Program address and Function summary.",
|
||||
"$ref": "#/$defs/ProgramSummary"
|
||||
},
|
||||
"sample": {
|
||||
"description": "Sample identity and size.",
|
||||
"$ref": "#/$defs/SampleSummary"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"sample",
|
||||
"program",
|
||||
"analysis"
|
||||
]
|
||||
},
|
||||
"Limits": {
|
||||
"description": "Resource policy selected for one invocation.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"analysis_timeout_seconds": {
|
||||
"description": "Native analysis timeout.",
|
||||
"$ref": "#/$defs/PositiveU64"
|
||||
},
|
||||
"child_watchdog_seconds": {
|
||||
"description": "Derived process watchdog.",
|
||||
"$ref": "#/$defs/PositiveU64"
|
||||
},
|
||||
"decompile_timeout_seconds": {
|
||||
"description": "Optional native decompilation timeout.",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/$defs/PositiveU64"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"max_cpu": {
|
||||
"description": "Maximum Ghidra analysis CPU count.",
|
||||
"$ref": "#/$defs/PositiveU64"
|
||||
},
|
||||
"max_heap_mib": {
|
||||
"description": "Maximum Java heap, in MiB.",
|
||||
"$ref": "#/$defs/PositiveU64"
|
||||
},
|
||||
"max_inline_bytes": {
|
||||
"description": "Maximum serialized successful stdout size.",
|
||||
"$ref": "#/$defs/PositiveU64"
|
||||
},
|
||||
"max_sample_bytes": {
|
||||
"description": "Maximum accepted Sample size.",
|
||||
"$ref": "#/$defs/PositiveU64"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"max_heap_mib",
|
||||
"max_cpu",
|
||||
"analysis_timeout_seconds",
|
||||
"child_watchdog_seconds",
|
||||
"max_sample_bytes",
|
||||
"max_inline_bytes"
|
||||
]
|
||||
},
|
||||
"PositiveU64": {
|
||||
"description": "A validated positive integer accepted by resource-limit flags.",
|
||||
"type": "integer",
|
||||
"format": "uint64",
|
||||
"minimum": 1
|
||||
},
|
||||
"ProgramSummary": {
|
||||
"description": "Program summary.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"function_count": {
|
||||
"description": "Count of memory, external, and thunk Functions.",
|
||||
"type": "integer",
|
||||
"format": "uint64",
|
||||
"minimum": 0
|
||||
},
|
||||
"image_base": {
|
||||
"description": "Image base when applicable.",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/$defs/Address"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"maximum_address": {
|
||||
"description": "Maximum Address when applicable.",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/$defs/Address"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"minimum_address": {
|
||||
"description": "Minimum Address when applicable.",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/$defs/Address"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"function_count"
|
||||
]
|
||||
},
|
||||
"QueryProvenance": {
|
||||
"description": "Fixed provenance for every Sample-backed Query.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"adapter_protocol_version": {
|
||||
"description": "Rust/Java protocol version.",
|
||||
"type": "integer",
|
||||
"format": "uint32",
|
||||
"minimum": 0
|
||||
},
|
||||
"analysis_profile_sha256": {
|
||||
"description": "Canonical Analysis Profile identity.",
|
||||
"$ref": "#/$defs/Digest"
|
||||
},
|
||||
"analysis_store": {
|
||||
"description": "Selected Analysis Store.",
|
||||
"$ref": "#/$defs/AnalysisStoreProvenance"
|
||||
},
|
||||
"ghidr_version": {
|
||||
"description": "CLI package version.",
|
||||
"type": "string"
|
||||
},
|
||||
"ghidra_version": {
|
||||
"description": "Ghidra version.",
|
||||
"type": "string"
|
||||
},
|
||||
"java_version": {
|
||||
"description": "Java major version.",
|
||||
"type": "string"
|
||||
},
|
||||
"limits": {
|
||||
"description": "Selected and derived resource limits.",
|
||||
"$ref": "#/$defs/Limits"
|
||||
},
|
||||
"sample_sha256": {
|
||||
"description": "Sample content identity.",
|
||||
"$ref": "#/$defs/Digest"
|
||||
},
|
||||
"sandbox": {
|
||||
"description": "Selected sandbox policy.",
|
||||
"$ref": "#/$defs/SandboxProvenance"
|
||||
},
|
||||
"source_path": {
|
||||
"description": "Exact caller-supplied path.",
|
||||
"$ref": "#/$defs/TaggedPath"
|
||||
},
|
||||
"target": {
|
||||
"description": "Resolved Target Specification and verification.",
|
||||
"$ref": "#/$defs/TargetProvenance"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"ghidr_version",
|
||||
"adapter_protocol_version",
|
||||
"ghidra_version",
|
||||
"java_version",
|
||||
"sample_sha256",
|
||||
"source_path",
|
||||
"analysis_profile_sha256",
|
||||
"target",
|
||||
"analysis_store",
|
||||
"sandbox",
|
||||
"limits"
|
||||
]
|
||||
},
|
||||
"SampleSummary": {
|
||||
"description": "Sample identity summary.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"sha256": {
|
||||
"description": "SHA-256 content identity.",
|
||||
"$ref": "#/$defs/Digest"
|
||||
},
|
||||
"size_bytes": {
|
||||
"description": "Exact byte length.",
|
||||
"type": "integer",
|
||||
"format": "uint64",
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"sha256",
|
||||
"size_bytes"
|
||||
]
|
||||
},
|
||||
"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"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TargetProvenance": {
|
||||
"description": "Target Specification provenance.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"compiler_specification": {
|
||||
"description": "Exact compiler-specification identifier.",
|
||||
"type": "string"
|
||||
},
|
||||
"format": {
|
||||
"description": "Executable format name.",
|
||||
"type": "string"
|
||||
},
|
||||
"loader": {
|
||||
"description": "Exact loader identifier.",
|
||||
"type": "string"
|
||||
},
|
||||
"processor_language": {
|
||||
"description": "Exact processor-language identifier.",
|
||||
"type": "string"
|
||||
},
|
||||
"verification": {
|
||||
"description": "Project integration-test coverage.",
|
||||
"$ref": "#/$defs/TargetVerification"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"loader",
|
||||
"format",
|
||||
"processor_language",
|
||||
"compiler_specification",
|
||||
"verification"
|
||||
]
|
||||
},
|
||||
"TargetVerification": {
|
||||
"description": "Project integration-test coverage for a recognized target.",
|
||||
"oneOf": [
|
||||
{
|
||||
"description": "Covered by version 0.1 real-Ghidra fixtures.",
|
||||
"type": "string",
|
||||
"const": "verified"
|
||||
},
|
||||
{
|
||||
"description": "Recognized by Ghidra but outside the tested matrix.",
|
||||
"type": "string",
|
||||
"const": "unverified"
|
||||
}
|
||||
]
|
||||
},
|
||||
"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"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
341
schemas/v1/protocol-request.schema.json
Normal file
341
schemas/v1/protocol-request.schema.json
Normal file
|
|
@ -0,0 +1,341 @@
|
|||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"title": "AdapterRequest",
|
||||
"description": "Strict adapter request.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"analysis_path": {
|
||||
"description": "Private Ghidra project or staging directory when required.",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/$defs/WorkerPath"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"arguments": {
|
||||
"description": "Operation-specific validated arguments.",
|
||||
"$ref": "#/$defs/RequestArguments"
|
||||
},
|
||||
"invocation_id": {
|
||||
"description": "Random 128-bit identifier echoed by the response.",
|
||||
"$ref": "#/$defs/InvocationId"
|
||||
},
|
||||
"limits": {
|
||||
"description": "Selected limits.",
|
||||
"$ref": "#/$defs/Limits"
|
||||
},
|
||||
"operation": {
|
||||
"description": "Operation echoed by the response.",
|
||||
"$ref": "#/$defs/Operation"
|
||||
},
|
||||
"protocol_version": {
|
||||
"type": "integer",
|
||||
"const": 1
|
||||
},
|
||||
"staged_sample": {
|
||||
"description": "Private staged Sample path, absent for non-Sample operations.",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/$defs/WorkerPath"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"protocol_version",
|
||||
"invocation_id",
|
||||
"operation",
|
||||
"limits",
|
||||
"arguments"
|
||||
],
|
||||
"$defs": {
|
||||
"Address": {
|
||||
"description": "A Ghidra address with an explicit, case-sensitive address space.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"offset": {
|
||||
"description": "Canonical lowercase, `0x`-prefixed, even-width hexadecimal offset.",
|
||||
"type": "string"
|
||||
},
|
||||
"space": {
|
||||
"description": "Exact Ghidra address-space name.",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"space",
|
||||
"offset"
|
||||
]
|
||||
},
|
||||
"CollectionLimit": {
|
||||
"description": "An optional item bound, explicit when unbounded.",
|
||||
"oneOf": [
|
||||
{
|
||||
"description": "At most the enclosed number of items.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"bounded": {
|
||||
"$ref": "#/$defs/PositiveU64"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"bounded"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Every item, still subject to the serialized-byte budget.",
|
||||
"type": "string",
|
||||
"const": "all"
|
||||
}
|
||||
]
|
||||
},
|
||||
"FunctionSelector": {
|
||||
"description": "Exactly one explicit Function Selector.",
|
||||
"oneOf": [
|
||||
{
|
||||
"description": "Exact, case-sensitive Ghidra function name.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"const": "name"
|
||||
},
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"kind",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Exact function entry address.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"const": "address"
|
||||
},
|
||||
"value": {
|
||||
"$ref": "#/$defs/Address"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"kind",
|
||||
"value"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"InvocationId": {
|
||||
"description": "A random 128-bit invocation identifier encoded as 32 lowercase hex digits.",
|
||||
"type": "string"
|
||||
},
|
||||
"Limits": {
|
||||
"description": "Resource policy selected for one invocation.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"analysis_timeout_seconds": {
|
||||
"description": "Native analysis timeout.",
|
||||
"$ref": "#/$defs/PositiveU64"
|
||||
},
|
||||
"child_watchdog_seconds": {
|
||||
"description": "Derived process watchdog.",
|
||||
"$ref": "#/$defs/PositiveU64"
|
||||
},
|
||||
"decompile_timeout_seconds": {
|
||||
"description": "Optional native decompilation timeout.",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/$defs/PositiveU64"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"max_cpu": {
|
||||
"description": "Maximum Ghidra analysis CPU count.",
|
||||
"$ref": "#/$defs/PositiveU64"
|
||||
},
|
||||
"max_heap_mib": {
|
||||
"description": "Maximum Java heap, in MiB.",
|
||||
"$ref": "#/$defs/PositiveU64"
|
||||
},
|
||||
"max_inline_bytes": {
|
||||
"description": "Maximum serialized successful stdout size.",
|
||||
"$ref": "#/$defs/PositiveU64"
|
||||
},
|
||||
"max_sample_bytes": {
|
||||
"description": "Maximum accepted Sample size.",
|
||||
"$ref": "#/$defs/PositiveU64"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"max_heap_mib",
|
||||
"max_cpu",
|
||||
"analysis_timeout_seconds",
|
||||
"child_watchdog_seconds",
|
||||
"max_sample_bytes",
|
||||
"max_inline_bytes"
|
||||
]
|
||||
},
|
||||
"Operation": {
|
||||
"description": "Version 0.1 operation identifier shared with Java.",
|
||||
"oneOf": [
|
||||
{
|
||||
"description": "Installation diagnosis.",
|
||||
"type": "string",
|
||||
"const": "doctor"
|
||||
},
|
||||
{
|
||||
"description": "Sample metadata inspection.",
|
||||
"type": "string",
|
||||
"const": "inspect"
|
||||
},
|
||||
{
|
||||
"description": "Stable Function collection.",
|
||||
"type": "string",
|
||||
"const": "functions"
|
||||
},
|
||||
{
|
||||
"description": "Targeted Function decompilation.",
|
||||
"type": "string",
|
||||
"const": "decompile"
|
||||
},
|
||||
{
|
||||
"description": "Explicit Analysis Store cleanup.",
|
||||
"type": "string",
|
||||
"const": "clean"
|
||||
}
|
||||
]
|
||||
},
|
||||
"PageRequest": {
|
||||
"description": "A normalized collection page request.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"limit": {
|
||||
"description": "Selected item bound.",
|
||||
"$ref": "#/$defs/CollectionLimit"
|
||||
},
|
||||
"offset": {
|
||||
"description": "Number of items skipped in stable order.",
|
||||
"type": "integer",
|
||||
"format": "uint64",
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"offset",
|
||||
"limit"
|
||||
]
|
||||
},
|
||||
"PositiveU64": {
|
||||
"description": "A validated positive integer accepted by resource-limit flags.",
|
||||
"type": "integer",
|
||||
"format": "uint64",
|
||||
"minimum": 1
|
||||
},
|
||||
"RequestArguments": {
|
||||
"description": "Operation-specific request arguments.",
|
||||
"oneOf": [
|
||||
{
|
||||
"description": "Installation probe.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"const": "doctor"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"kind"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Program metadata extraction.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"const": "inspect"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"kind"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Stable Function page extraction.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"const": "functions"
|
||||
},
|
||||
"page": {
|
||||
"description": "Explicit page bound.",
|
||||
"$ref": "#/$defs/PageRequest"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"kind",
|
||||
"page"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Targeted decompilation.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"const": "decompile"
|
||||
},
|
||||
"selector": {
|
||||
"description": "Explicit Function Selector.",
|
||||
"$ref": "#/$defs/FunctionSelector"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"kind",
|
||||
"selector"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Store cleanup does not cross into Ghidra; reserved for parity.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"const": "clean"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"kind"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"WorkerPath": {
|
||||
"description": "A validated UTF-8 absolute path owned by the trusted harness.",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
120
schemas/v1/protocol-response.schema.json
Normal file
120
schemas/v1/protocol-response.schema.json
Normal file
|
|
@ -0,0 +1,120 @@
|
|||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"title": "AdapterResponse",
|
||||
"description": "Strict adapter response envelope.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"invocation_id": {
|
||||
"description": "Echoed invocation identifier.",
|
||||
"$ref": "#/$defs/InvocationId"
|
||||
},
|
||||
"operation": {
|
||||
"description": "Echoed operation.",
|
||||
"$ref": "#/$defs/Operation"
|
||||
},
|
||||
"protocol_version": {
|
||||
"type": "integer",
|
||||
"const": 1
|
||||
},
|
||||
"result": {
|
||||
"description": "Exactly one typed success or error result.",
|
||||
"$ref": "#/$defs/AdapterResult"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"protocol_version",
|
||||
"invocation_id",
|
||||
"operation",
|
||||
"result"
|
||||
],
|
||||
"$defs": {
|
||||
"AdapterResult": {
|
||||
"description": "Adapter result, with operation data validated by the harness afterward.",
|
||||
"oneOf": [
|
||||
{
|
||||
"description": "Complete operation-specific result.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"description": "Strictly schema-validated by the operation dispatcher."
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"const": "success"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"status",
|
||||
"data"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Typed adapter failure with no partial Query data.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"description": "Stable adapter error code.",
|
||||
"type": "string"
|
||||
},
|
||||
"details": {
|
||||
"description": "Operation-specific error facts.",
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
},
|
||||
"message": {
|
||||
"description": "Concise diagnostic context.",
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"const": "error"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"status",
|
||||
"code",
|
||||
"message",
|
||||
"details"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"InvocationId": {
|
||||
"description": "A random 128-bit invocation identifier encoded as 32 lowercase hex digits.",
|
||||
"type": "string"
|
||||
},
|
||||
"Operation": {
|
||||
"description": "Version 0.1 operation identifier shared with Java.",
|
||||
"oneOf": [
|
||||
{
|
||||
"description": "Installation diagnosis.",
|
||||
"type": "string",
|
||||
"const": "doctor"
|
||||
},
|
||||
{
|
||||
"description": "Sample metadata inspection.",
|
||||
"type": "string",
|
||||
"const": "inspect"
|
||||
},
|
||||
{
|
||||
"description": "Stable Function collection.",
|
||||
"type": "string",
|
||||
"const": "functions"
|
||||
},
|
||||
{
|
||||
"description": "Targeted Function decompilation.",
|
||||
"type": "string",
|
||||
"const": "decompile"
|
||||
},
|
||||
{
|
||||
"description": "Explicit Analysis Store cleanup.",
|
||||
"type": "string",
|
||||
"const": "clean"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue