aboutcode-org / aboutcode-org/scancode.io

Map "To" deployed ELFs to "From" development C/C++ source code

未關閉
#812 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Python
星號
215
分支
203
平均合併
4 天 8 小時
30 天內合併 PR
6

描述

It would be useful to have a pipeline that works a way that's similar to the deploy_to_devel pipeline but with these variations:
1. The From and To inputs would be SCTK JSON Scans
2. The To side would the Elf with DWARF debug symbols "paths" collected with the new https://github.com/nexb/elf-inspector
3. The mapping would be based on path suffix matching for the DWARFs paths to the "From" source code. The DWARFS likely could be stored in "extra data" for now.

The map types could be:
- DWARF compiled path
- DWARF included path

Here is an example of SCTK scan output:
```JSON
"files": [
{
"path": "autotalent.so",
"type": "file",
"dwarf_source_paths": {
"compiled_paths": [
"home/pombreda/tmp/d2d-dwarf/autotalent-0.2/autotalent.c",
"home/pombreda/tmp/d2d-dwarf/autotalent-0.2/mayer_fft.c"
],
"included_paths": [
"home/pombreda/tmp/d2d-dwarf/autotalent-0.2/ladspa.h",
"home/pombreda/tmp/d2d-dwarf/autotalent-0.2/mayer_fft.h",
"usr/include/libio.h",
"usr/include/math.h",
"usr/include/stdio.h",
"usr/include/stdlib.h",
"usr/include/x86_64-linux-gnu/bits/math-finite.h",
"usr/include/x86_64-linux-gnu/bits/mathcalls.h",
"usr/include/x86_64-linux-gnu/bits/string3.h",
"usr/include/x86_64-linux-gnu/bits/types.h",
"usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h"
]
},
"scan_errors": []
}
]
```
Here is a mini example with the original source, the compiled binary and the scans:
[d2d-dwarf.zip](https://github.com/nexB/scancode.io/files/12079266/d2d-dwarf.zip)

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。