fix: Skip symbolic links in file discovery and upload - #711
Draft
danskmt wants to merge 1 commit into
Draft
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
danskmt
force-pushed
the
fix/CLI-1792-skip-symlinks-in-discovery-and-upload
branch
from
August 25, 2026 12:51
bf769e9 to
df40372
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Prevents scanners from following symbolic links during file discovery and upload, closing a path where files outside the scan root could be read and uploaded.
GetAllFiles(file_filter.go) now skips symlink entries whenFF_FILE_FILTER_SKIP_SYMLINKSis enabled, gated behind a new feature flaginternal_snyk_file_filter_skip_symlinks_enabled.createUploadFile(batch.go) switches fromos.Stattoos.Lstatand rejects symlinks asSpecialFileError(defence in depth, unconditional).Checklist
make test)make generate)make lint)go get github.com/snyk/go-application-framework@YOUR_LATEST_GAF_COMMITin thecliv2directory.go.modto point to your local GAF code.go mod tidyin thecliv2directory.go.modandgo.sumchanges.