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

syft some-jar.jar fails to find packages if PWD is a symlink #2355

Closed
willmurphyscode opened this issue Nov 27, 2023 · 1 comment · Fixed by #2359
Closed

syft some-jar.jar fails to find packages if PWD is a symlink #2355

willmurphyscode opened this issue Nov 27, 2023 · 1 comment · Fixed by #2359
Assignees
Labels
bug Something isn't working

Comments

@willmurphyscode
Copy link
Contributor

What happened:

Scanning a jar with syft fails to find the jar itself if the current working directory is a symlink prints "no packages discovered."

Prints No packages discovered.

What you expected to happen:

I expected at least the jar itself to be found.

Steps to reproduce the issue:

mkdir actual
ln -s $PWD/actual im-a-link
cd im-a-link
curl -O https://repo1.maven.org/maven2/xalan/xalan/2.7.2/xalan-2.7.2.jar
syft -q xalan-2.7.2.jar
cd ../actual
syft -q xalan-2.7.2.jar

The first syft invocation finds nothing, but the second one finds the jar.

Anything else we need to know?:

I discovered this because /tmp on newer macOS installations is a symlink.

Environment:

  • Output of syft version:
❯ syft version
Application: syft
Version:    0.97.1
BuildDate:  2023-11-17T20:53:01Z
GitCommit:  Homebrew
GitDescription: [not provided]
Platform:   darwin/arm64
GoVersion:  go1.21.4
Compiler:   gc
  • OS (e.g: cat /etc/os-release or similar):
❯ uname -moprsv
Darwin 23.0.0 Darwin Kernel Version 23.0.0: Fri Sep 15 14:41:43 PDT 2023; root:xnu-10002.1.13~1/RELEASE_ARM64_T6000 arm64 arm
@willmurphyscode willmurphyscode added the bug Something isn't working label Nov 27, 2023
@willmurphyscode
Copy link
Contributor Author

This is possibly related to #1962, but I opened a separate issue because passing --base-path / (or a couple other possible paths) doesn't seem to resolve this behavior.

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

Successfully merging a pull request may close this issue.

1 participant