Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
JonoYang opened this issue Sep 20, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@JonoYang
Copy link
Contributor

JonoYang commented Sep 20, 2024

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 "<console>", line 1, in <module>
  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.

@JonoYang JonoYang added the bug Something isn't working label Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant