jfrog / jfrog/jfrog-cli-security

Secrets detection should not scan code from 3rd-party Python dependencies

Open
#339 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Go
Stars
13
Forks
50
Avg merge
3d 48m
Merged PRs (30d)
26

Description

Describe the bug

When running jf audit on a Python project, the secrets detection mechanism scans the source code under the project directory (1st-party code) but also erroneously scans the source code of any installed 3rd-party OSS dependencies (ex. source code under site-packages)

Current behavior

Both 1st-party and 3rd-party code is scanned for secrets

Reproduction steps
  1. Run the following -
git clone https://github.com/mpirnat/lets-be-bad-guys.git
cd lets-be-bad-guys
mkvirtualenv py_secret_test
pip install -r requirements.txt
jf audit
  1. Observe that secrets from site-packages are detected -
    image
Expected behavior

Secrets detection should scan only 1st-party source code, not the project's OSS dependencies

JFrog CLI version

2.46.2

Operating system type and version

Linux - Ubuntu 22.04

JFrog Artifactory version

No response

JFrog Xray version

No response

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

Reproduce the issue by running jf audit in the provided Python project after installing its requirements, and confirm that detections come from site-packages. Trace the secrets-detection path invoked by jf audit and establish how first-party code is distinguished from dependencies. Done means the audit still scans project code but no longer reports secrets from installed third-party dependencies.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, python
Domain
cli, 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.