aboutcode-org / aboutcode-org/scancode.io

Support uploading the binary directly as an input

Đang mở
#1,782 0 bình luận 0 reaction 1 người được giao Được @AyanSinhaMahapatra nhận Xem trên GitHub
back2source
Ngôn ngữ chính
Python
Star
215
Fork
203
Merge trung bình
4 ngày 8 giờ
Pull request đã merge (30 ngày)
6

Mô tả

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`

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.