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

RPM file scan failed #1231

Closed
aeg opened this issue Sep 28, 2022 · 0 comments · Fixed by #1232
Closed

RPM file scan failed #1231

aeg opened this issue Sep 28, 2022 · 0 comments · Fixed by #1232
Assignees
Labels
bug Something isn't working

Comments

@aeg
Copy link

aeg commented Sep 28, 2022

What happened:
If system has *.rpm files tha are not in rpm format, I will get an error at runtime and syft will not ouput SPDX file.

2022/09/27 17:16:16 error during command execution: 1 error occurred:
        * file is not an RPM
ls -l syft_spdx.json
-rw-r--r-- 1 root root 0  9月 28 13:46 syft_spdx.json

What you expected to happen:
Even if parsing the rpm file fails, syft continue processing and will output SPDX file.

How to reproduce it (as minimally and precisely as possible):

mkdir /tmp/aaa
echo "aaa" > /tmp/aaa/a.rpm
syft pakages dir:/tmp/aaa

Anything else we need to know?:
In some environments, simple ASCII files may exist even with the extension rpm, so please avoid errors even if they occur.
RPM file scanning support was added at v0.56.0 ,that affected.
I think syft can handle rpmutils errors.

A workaround is to add --exlucde **/*.rpm

Environment:

  • Output of syft version:
syft version
Application:        syft
Version:            0.57.0
JsonSchemaVersion:  3.3.2
BuildDate:          2022-09-19T20:42:27Z
GitCommit:          04d288b3643f906255af88108f27712bb2be5b63
GitDescription:     v0.57.0
Platform:           linux/amd64
GoVersion:          go1.18.6
Compiler:           gc
  • OS (e.g: cat /etc/os-release or similar):
NAME="Ubuntu"
VERSION="20.04.5 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.5 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
@aeg aeg added the bug Something isn't working label Sep 28, 2022
@kzantow kzantow self-assigned this Sep 28, 2022
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
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants