jfrog / jfrog/frogbot

Python Pip dependency fixes only work for already-pinned dependencies

Open
#1,033 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

Bug 5: Pip dependency fixes only work for already-pinned dependencies

Description

The pip handler assumes dependencies are statically pinned (e.g. pkg==1.2.3).
If a dependency is unpinned or uses ranges (>=, ~=), the regex often fails.

Impact
  • Frogbot reports “impacted package not found” even when it exists.
  • Common real-world requirements.txt files cannot be fixed.
Suggested Fix

Parse requirements using a PEP 508–compliant parser and support upgrading unpinned or ranged dependencies.

Current behavior

The handler only successfully updates dependencies when they are already pinned to an explicit version (e.g. pkg==1.2.3). If a dependency is unpinned or uses version ranges, the handler fails with “impacted package not found”.

Reproduction steps

Run As Is

Expected behavior

If the vulnerable package exists in the dependency declaration, Frogbot should be able to upgrade it even when:

It is unpinned (pkg)

Uses compatible/ranged specifiers (>=, ~=, etc.)

Is pinned but with spacing/comments
At minimum, it should recognize common formats and either:

update safely, or

emit a specific “format not supported” error describing what it encountered.

JFrog Frogbot version

LATEST

Package manager info

LATEST

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 with the pip handler and the regex it currently uses to identify dependency declarations. Reproduce the failure with pinned, unpinned, ranged, and commented or spaced requirements, then confirm that supported declarations are recognized and unsupported formats produce a specific error.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.