aboutcode-org / aboutcode-org/scancode.io

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

Aperta
#812 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Python
Stelle
215
Fork
203
Merge medio
4g 8h
PR unite (30g)
6

Descrizione

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)

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.