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

Encountering "cycle during symlink resolution" with syft version 0.71.0 onwards #1586

Closed
hkadakia opened this issue Feb 17, 2023 · 2 comments · Fixed by #1604
Closed

Encountering "cycle during symlink resolution" with syft version 0.71.0 onwards #1586

hkadakia opened this issue Feb 17, 2023 · 2 comments · Fixed by #1604
Labels
bug Something isn't working

Comments

@hkadakia
Copy link

What happened:
When running syft to generate an SBOM on an ubuntu image, I encountered the below error.

No packages discovered
2023/02/17 12:20:38 error during command execution: 1 error occurred:
	* failed to find binaries by mime types: unable to get ref for path="/usr/local/bin/ksh": cycle during symlink resolution

What you expected to happen:
Syft should run successfully and generate the SBOM in the output format specified.

Steps to reproduce the issue:

echo "FROM ubuntu:latest
RUN apt-get update && apt-get install ksh93u+m && ln -s /bin/ksh /usr/local/bin/ksh" | docker build -t syft-symlink-bug:latest - && syft -vvv syft-symlink-bug:latest

Verbose mode output: https://gist.github.com/hkadakia/973e53dfd3f2358374b7d77b2d623907

Anything else we need to know?:
This issue was introduced in version 0.71.0 onwards.

Environment:

  • Output of syft version:
(oath_tools) ➜  sboms syft version
Application:        syft
Version:            0.72.0
JsonSchemaVersion:  6.2.0
BuildDate:          2023-02-16T15:22:43Z
GitCommit:          2642a3616170ccbda9d8c8cb4f4a6b0fd5c63da9
GitDescription:     [not provided]
Platform:           darwin/amd64
GoVersion:          go1.19.6
Compiler:           gc
  • OS (e.g: cat /etc/os-release or similar):
(oath_tools) ➜  sboms sw_vers
ProductName:	macOS
ProductVersion:	12.6.3
@hkadakia hkadakia added the bug Something isn't working label Feb 17, 2023
@hkadakia hkadakia changed the title Encountering "cycle during symlink resolution" Encountering "cycle during symlink resolution" with syft version 0.71.0 onwards Feb 17, 2023
@mathrock
Copy link

I believe this may be a regression in behaviour introduced by PR #1510.

@wagoodman
Copy link
Contributor

Thanks for reporting! Fixed in #1604 and will be in the upcoming v0.73.0 release.

Also TIL you can pipe Dockerfile contents into docker build -- nice trick! 🙌

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.

3 participants