jfrog / jfrog/frogbot

Python Fragile cross-platform path handling

Open
#1,032 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Go
Stars
372
Forks
107
Avg merge
2d 20h
Merged PRs (30d)
5

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the path validation checks that use string-based prefix comparisons, then inspect how paths for Python dependencies are handled across supported operating systems. Compare the current behavior with filepath.Rel and EvalSymlinks on Linux, macOS, and Windows; done means separators, case differences, drive letters, and symlinked paths do not cause false failures or bypasses.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, python
Domain
security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.