Skip to content

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

@TKlerx

Description

@TKlerx

Summary

deepsec scan fails on Windows with:

Invalid filePath: contains backslash

This happens because scanner glob results on Windows can include \ separators, but file record paths are validated as POSIX-style (/) and reject backslashes.

Repro

  1. On Windows, initialize deepsec in a project.
  2. Run scan:
    npx --yes deepsec@latest scan --project-id <id> (or pnpm deepsec scan ... in .deepsec)
  3. Observe failure when matchers start (for me it failed at auth-bypass).

Error

Invalid filePath: contains backslash

Expected

Scan should accept Windows glob output and normalize relative paths consistently.

Proposed fix

Normalize glob-returned relative paths in scanner before using them as record keys/file paths, e.g. relPathRaw.replaceAll(\, /).

I opened a PR with this change:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions