Skip to content

Python Fragile cross-platform path handling #1032

@Richard-Barrett

Description

@Richard-Barrett

Describe the bug

Bug 4: Python Fragile cross-platform path handling

Description

Path validation relies on string-based prefix checks, which are unreliable on:

  • Windows (drive letters, case-insensitive paths)
  • macOS (case-insensitive filesystems)

Impact

  • False failures or bypasses on non-Linux runners.
  • Inconsistent behavior across platforms.

Suggested Fix

Use filesystem-aware comparisons (filepath.Rel, EvalSymlinks) instead of string matching.

Current behavior

Path safety checks rely on string comparisons that assume Linux-style, case-sensitive paths. On Windows or macOS (case-insensitive filesystems, drive letters), these checks may behave incorrectly or inconsistently.

Reproduction steps

Run As Is

Expected behavior

File path validation and access should work consistently across supported OS environments (Linux/macOS/Windows):

  • Correct handling of path separators
  • Correct handling of case-insensitive filesystems
  • Correct handling of drive letters (Windows)
  • No false failures and no bypasses.

JFrog Frogbot version

LATEST

Package manager info

Python

Git provider

GitHub

JFrog Frogbot configuration yaml file

DEFAULT

Operating system type and version

ALL

JFrog Xray version

LATEST

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions