fix: respect projectIgnorePaths from socket.yml in scan create#1137
Open
fix: respect projectIgnorePaths from socket.yml in scan create#1137
Conversation
The scan create command had all the downstream infrastructure to honor projectIgnorePaths from socket.yml but never actually loaded the config. Read socket.yml via findSocketYmlSync and pass the parsed config to getPackageFilesForScan so globWithGitIgnore applies the ignore patterns.
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.
Summary
socket scan createnow honorsprojectIgnorePathsfromsocket.ymlwhen collecting files for a scanglobWithGitIgnore) already supported this, but the scan create command never loadedsocket.yml— this wires it up by callingfindSocketYmlSync(cwd)and passing the parsed config togetPackageFilesForScanTest plan
path-resolve.test.mtstests pass (11/11), including the "should respect ignores from socket config" testsocket.ymlwithprojectIgnorePathsentries and verifysocket scan create --read-onlyexcludes the specified pathsNote
Medium Risk
Moderate risk because it changes manifest discovery inputs for scans/reachability by applying
socket.ymlignore rules, which can alter what gets uploaded and analyzed. The change is localized and uses existing glob/ignore plumbing.Overview
Respects
socket.ymlignores during scan file discovery.socket scan createandsocket scan reachnow callfindSocketYmlSync(cwd)and pass the parsed config intogetPackageFilesForScan, soprojectIgnorePathsaffects which local manifests are included.Also removes a stale TODO in
scan createhelp text and bumps the CLI version to1.1.78with an updated changelog entry.Written by Cursor Bugbot for commit 55e3874. Configure here.