feat: scaffold v0.1 foundation
This commit is contained in:
parent
c4fb0c6a01
commit
170ca32f58
34 changed files with 6175 additions and 5 deletions
32
fixtures/golden/v1/cleanup.json
Normal file
32
fixtures/golden/v1/cleanup.json
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
"schema_version": 1,
|
||||
"kind": "cleanup",
|
||||
"provenance": {
|
||||
"ghidr_version": "0.1.0",
|
||||
"adapter_protocol_version": 1,
|
||||
"analysis_store": {
|
||||
"path": { "encoding": "utf8", "value": "/tmp/ghidr-store" },
|
||||
"source": "cli"
|
||||
},
|
||||
"sandbox": { "backend": "bubblewrap", "verification": "verified" }
|
||||
},
|
||||
"data": {
|
||||
"mode": "dry_run",
|
||||
"target": {
|
||||
"kind": "digest",
|
||||
"sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
||||
},
|
||||
"matched": {
|
||||
"analyses": 1,
|
||||
"quarantined_analyses": 0,
|
||||
"artifacts": 1,
|
||||
"diagnostic_logs": 0,
|
||||
"usage": { "logical_bytes": 4096, "allocated_bytes": 8192 },
|
||||
"analysis_profile_sha256": [
|
||||
"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
|
||||
]
|
||||
},
|
||||
"removed": null
|
||||
},
|
||||
"warnings": []
|
||||
}
|
||||
47
fixtures/golden/v1/decompilation.json
Normal file
47
fixtures/golden/v1/decompilation.json
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
"schema_version": 1,
|
||||
"kind": "decompilation",
|
||||
"provenance": {
|
||||
"ghidr_version": "0.1.0",
|
||||
"adapter_protocol_version": 1,
|
||||
"ghidra_version": "12.1.2",
|
||||
"java_version": "21",
|
||||
"sample_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
||||
"source_path": { "encoding": "utf8", "value": "./sample" },
|
||||
"analysis_profile_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
|
||||
"target": {
|
||||
"loader": "ElfLoader",
|
||||
"format": "ELF",
|
||||
"processor_language": "x86:LE:64:default",
|
||||
"compiler_specification": "gcc",
|
||||
"verification": "verified"
|
||||
},
|
||||
"analysis_store": {
|
||||
"path": { "encoding": "utf8", "value": "/tmp/ghidr-store" },
|
||||
"source": "cli"
|
||||
},
|
||||
"sandbox": { "backend": "bubblewrap", "verification": "verified" },
|
||||
"limits": {
|
||||
"max_heap_mib": 2048,
|
||||
"max_cpu": 2,
|
||||
"analysis_timeout_seconds": 600,
|
||||
"decompile_timeout_seconds": 60,
|
||||
"child_watchdog_seconds": 780,
|
||||
"max_sample_bytes": 1073741824,
|
||||
"max_inline_bytes": 65536
|
||||
}
|
||||
},
|
||||
"data": {
|
||||
"requested_selector": { "kind": "name", "value": "main" },
|
||||
"function": {
|
||||
"name": "main",
|
||||
"qualified_name": "main",
|
||||
"entry": { "space": "ram", "offset": "0x0000000000401000" }
|
||||
},
|
||||
"decompilation": {
|
||||
"syntax": "ghidra_c",
|
||||
"text": "int main(void) {\n return 0;\n}\n"
|
||||
}
|
||||
},
|
||||
"warnings": []
|
||||
}
|
||||
21
fixtures/golden/v1/doctor.json
Normal file
21
fixtures/golden/v1/doctor.json
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"schema_version": 1,
|
||||
"kind": "doctor",
|
||||
"provenance": {
|
||||
"ghidr_version": "0.1.0",
|
||||
"adapter_protocol_version": 1,
|
||||
"analysis_store": {
|
||||
"path": { "encoding": "utf8", "value": "/tmp/ghidr-store" },
|
||||
"source": "cli"
|
||||
},
|
||||
"sandbox": { "backend": "bubblewrap", "verification": "verified" }
|
||||
},
|
||||
"data": {
|
||||
"ready": true,
|
||||
"components": {
|
||||
"ghidra": { "status": "ready", "details": { "version": "12.1.2" } },
|
||||
"java": { "status": "ready", "details": { "version": "21" } }
|
||||
}
|
||||
},
|
||||
"warnings": []
|
||||
}
|
||||
10
fixtures/golden/v1/error.json
Normal file
10
fixtures/golden/v1/error.json
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"schema_version": 1,
|
||||
"kind": "error",
|
||||
"error": {
|
||||
"code": "function_selector_ambiguous",
|
||||
"message": "symbol 'parse' resolves to more than one function",
|
||||
"retryable": false,
|
||||
"details": { "candidates": [] }
|
||||
}
|
||||
}
|
||||
58
fixtures/golden/v1/functions.json
Normal file
58
fixtures/golden/v1/functions.json
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
{
|
||||
"schema_version": 1,
|
||||
"kind": "functions",
|
||||
"provenance": {
|
||||
"ghidr_version": "0.1.0",
|
||||
"adapter_protocol_version": 1,
|
||||
"ghidra_version": "12.1.2",
|
||||
"java_version": "21",
|
||||
"sample_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
||||
"source_path": { "encoding": "utf8", "value": "./sample" },
|
||||
"analysis_profile_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
|
||||
"target": {
|
||||
"loader": "ElfLoader",
|
||||
"format": "ELF",
|
||||
"processor_language": "x86:LE:64:default",
|
||||
"compiler_specification": "gcc",
|
||||
"verification": "verified"
|
||||
},
|
||||
"analysis_store": {
|
||||
"path": { "encoding": "utf8", "value": "/tmp/ghidr-store" },
|
||||
"source": "cli"
|
||||
},
|
||||
"sandbox": { "backend": "bubblewrap", "verification": "verified" },
|
||||
"limits": {
|
||||
"max_heap_mib": 2048,
|
||||
"max_cpu": 2,
|
||||
"analysis_timeout_seconds": 600,
|
||||
"decompile_timeout_seconds": null,
|
||||
"child_watchdog_seconds": 720,
|
||||
"max_sample_bytes": 1073741824,
|
||||
"max_inline_bytes": 65536
|
||||
}
|
||||
},
|
||||
"data": {
|
||||
"page": {
|
||||
"order": "location_then_entry_ascending",
|
||||
"offset": 0,
|
||||
"limit": 100,
|
||||
"returned": 1,
|
||||
"total": 1,
|
||||
"has_more": false
|
||||
},
|
||||
"items": [
|
||||
{
|
||||
"name": "main",
|
||||
"qualified_name": "main",
|
||||
"entry": { "space": "ram", "offset": "0x0000000000401000" },
|
||||
"body_address_count": 32,
|
||||
"location": "memory",
|
||||
"is_external": false,
|
||||
"is_thunk": false,
|
||||
"thunk_target_entry": null,
|
||||
"decompilable": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"warnings": []
|
||||
}
|
||||
48
fixtures/golden/v1/inspection.json
Normal file
48
fixtures/golden/v1/inspection.json
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
{
|
||||
"schema_version": 1,
|
||||
"kind": "inspection",
|
||||
"provenance": {
|
||||
"ghidr_version": "0.1.0",
|
||||
"adapter_protocol_version": 1,
|
||||
"ghidra_version": "12.1.2",
|
||||
"java_version": "21",
|
||||
"sample_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
||||
"source_path": { "encoding": "utf8", "value": "./sample" },
|
||||
"analysis_profile_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
|
||||
"target": {
|
||||
"loader": "ElfLoader",
|
||||
"format": "ELF",
|
||||
"processor_language": "x86:LE:64:default",
|
||||
"compiler_specification": "gcc",
|
||||
"verification": "verified"
|
||||
},
|
||||
"analysis_store": {
|
||||
"path": { "encoding": "utf8", "value": "/tmp/ghidr-store" },
|
||||
"source": "cli"
|
||||
},
|
||||
"sandbox": { "backend": "bubblewrap", "verification": "verified" },
|
||||
"limits": {
|
||||
"max_heap_mib": 2048,
|
||||
"max_cpu": 2,
|
||||
"analysis_timeout_seconds": 600,
|
||||
"decompile_timeout_seconds": null,
|
||||
"child_watchdog_seconds": 720,
|
||||
"max_sample_bytes": 1073741824,
|
||||
"max_inline_bytes": 65536
|
||||
}
|
||||
},
|
||||
"data": {
|
||||
"sample": {
|
||||
"sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
||||
"size_bytes": 4096
|
||||
},
|
||||
"program": {
|
||||
"image_base": { "space": "ram", "offset": "0x0000000000400000" },
|
||||
"minimum_address": { "space": "ram", "offset": "0x0000000000400000" },
|
||||
"maximum_address": { "space": "ram", "offset": "0x0000000000400fff" },
|
||||
"function_count": 1
|
||||
},
|
||||
"analysis": { "disposition": "created" }
|
||||
},
|
||||
"warnings": []
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue