Skip to content

fix(scanner): normalize Windows path separators from glob#38

Closed
TKlerx wants to merge 1 commit into
vercel-labs:mainfrom
TKlerx:fix/windows-path-separators-in-scan
Closed

fix(scanner): normalize Windows path separators from glob#38
TKlerx wants to merge 1 commit into
vercel-labs:mainfrom
TKlerx:fix/windows-path-separators-in-scan

Conversation

@TKlerx
Copy link
Copy Markdown

@TKlerx TKlerx commented May 5, 2026

What

Normalize scanner glob file paths to POSIX separators before record read/write.

Why

On Windows, glob can return \-separated relative paths. Deepsec record path validation requires /, so scan can fail with:

Invalid filePath: contains backslash

Repro

  • Run deepsec scan on Windows in a normal project.
  • Scan crashes when a matcher starts writing file records.

Fix

In packages/scanner/src/index.ts, normalize each glob path:

  • from raw relPathRaw
  • to relPath = relPathRaw.replaceAll(\, /)

Closes #37

@vercel
Copy link
Copy Markdown

vercel Bot commented May 5, 2026

Someone is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

@divyamagrawal06
Copy link
Copy Markdown

seems to be a duplicate of #29

@TKlerx
Copy link
Copy Markdown
Author

TKlerx commented May 5, 2026

You are right. Sorry! I thought I checked, but somehow I missed #29

@TKlerx TKlerx closed this May 5, 2026
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.

Windows: deepsec scan fails with 'Invalid filePath: contains backslash'

2 participants