aboutcode-org / aboutcode-org/scancode.io

scan for viruses pipeline fails on project created from docker container scan

オープン
#1,388 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug
主要言語
Python
スター
215
フォーク
203
平均マージ
4日 8時間
マージ済み PR(30日)
6

説明

There is a bug with the scan_for_viruses pipeline when run from a project created from a docker image. The error is happening here https://github.com/aboutcode-org/scancode.io/blob/main/scanpipe/pipes/clamav.py#L48 where this happens:
```
>>> Path(c.path).relative_to(project.codebase_path)
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.12/pathlib.py", line 682, in relative_to
raise ValueError(f"{str(self)!r} is not in the subpath of {str(other)!r}")
ValueError: 'asdf_qwe_2024_q3_0.tar-extract/1b9b7346fee7abbc7f5538eaa23548bd05a45abe8daf6794024be0c8ad7d60bb/bin' is not in the subpath of '/var/scancodeio/workspace/projects/qwe2024q30-docker-scan-sep-18-24-155631-bfe786cc/codebase'
```

The location of a codebase resource created from a docker scan does not have the codebase path prefix.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。