aboutcode-org / aboutcode-org/scancode.io

Support uploading the binary directly as an input

Aberta
#1,782 0 comentários 0 reações 1 responsável Reivindicada por @AyanSinhaMahapatra Ver no GitHub
back2source
Linguagem predominante
Python
Estrelas
215
Forks
203
Merge médio
4d 8h
PRs com merge (30d)
6

Descrição

There are two issues encountered when uploading the binary directly as an input instead of an archive:
- we do not have a `to/` side at all (because we could not extract from the binary)
- we have the binary extracted with it's internal sections in files (and this causes errors in the symbol extraction/mapping)

If you start a d2d project with the following links as inputs:

```
https://github.com/PrismLauncher/PrismLauncher/archive/refs/tags/9.1.zip#from
https://github.com/PrismLauncher/PrismLauncher/releases/download/9.1/PrismLauncher-Windows-MinGW-w64-Setup-9.1.exe#to
```

We get only a `to/` side and no `from/` side as we cannot extract the binary.

Image

If you start a d2d project with the following links as inputs:

```
https://github.com/PrismLauncher/PrismLauncher/archive/refs/tags/9.1.zip#from
https://github.com/PrismLauncher/PrismLauncher/releases/download/9.1/PrismLauncher-Windows-MinGW-w64-Setup-9.1.exe#to
```

We get only a `to/` side and no `from/` side as we cannot extract the binary.

If you start a d2d project with the following links as inputs:
```
https://github.com/musescore/MuseScore/archive/refs/tags/v4.4.4.zip#from
https://github.com/musescore/MuseScore/releases/download/v4.4.4/MuseScore-Studio-4.4.4.243461245-x86_64.paf.exe#to
```

The binary is extracted into it's sections into files and this is not intended.

Image

We need to just copy the binary to the scannable codebase instead of trying to extract the contents into the scannable codebase. This is done [here](https://github.com/aboutcode-org/scancode.io/blob/881e62da3e63428e75e46e8fe0728b2e336a64c2/scanpipe/pipelines/deploy_to_develop.py#L117). This is a follow up to [this commit](https://github.com/aboutcode-org/scancode.io/pull/1488/commits/40b79d23702e5e0435d8f391f7376bf711a58f96) where we tried to fix this initially but it seems like there are more cases.

Other project examples with incorrectly extracted binaries from https://github.com/aboutcode-org/scancode.io/issues/1470:

`sqlitebrowser-v3.12.2`
`Notepad3-RC3_6.24.309.1`
`Tengine-lite-v1.2-pre`
`keepassxc-2.3.4`
`sdrangel-v7.22.5`
`FreeCAD-1.0.0`

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.