Skip to content

Ignore symlinked directories discovered in findFilesRecursively#890

Merged
egibs merged 3 commits into
chainguard-dev:mainfrom
egibs:ignore-symlinks-for-scans
Apr 28, 2025
Merged

Ignore symlinked directories discovered in findFilesRecursively#890
egibs merged 3 commits into
chainguard-dev:mainfrom
egibs:ignore-symlinks-for-scans

Conversation

@egibs
Copy link
Copy Markdown
Member

@egibs egibs commented Apr 28, 2025

We try to evaluate symlinks for the root path specified in findFilesRecursively, but any symlinked directories we discover while walking the root directory can cause errors with scans. I've noticed this several times recently and this will cause scans to throw a exit code of 2.

If we do discover a valid, symlinked file then we'll add it to the list of paths to scan:

attempting to resolve symlink: /Users/.../Downloads/vllm/.PKGINFO-link # valid
ignoring symlinked directory: /Users/.../Downloads/vllm/usr/share/vllm/.venv/lib64

Signed-off-by: egibs <20933572+egibs@users.noreply.github.com>
@egibs egibs requested a review from tstromberg April 28, 2025 14:29
@egibs egibs changed the title Ignore symlinks discovered in findFilesRecursively Ignore symlinked directories discovered in findFilesRecursively Apr 28, 2025
@antitree antitree self-requested a review April 28, 2025 16:05
@egibs egibs enabled auto-merge (squash) April 28, 2025 16:06
@egibs egibs merged commit f364e10 into chainguard-dev:main Apr 28, 2025
9 checks passed
@egibs egibs deleted the ignore-symlinks-for-scans branch May 28, 2025 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants