Skip to content

RTECO-2728 - Audit Poetry projects that declare dependencies in PEP 621 [project] - #938

Open
reshmifrog wants to merge 1 commit into
jfrog:devfrom
reshmifrog:bugfix/RTECO-2728-poetry-pep621
Open

reshmifrog wants to merge 1 commit into
jfrog:devfrom
reshmifrog:bugfix/RTECO-2728-poetry-pep621

Conversation

@reshmifrog

@reshmifrog reshmifrog commented Nov 5, 2026 •

Copy link
Copy Markdown

Problem

Since Poetry 2.0 the default layout declares dependencies in [project].dependencies instead of [tool.poetry.dependencies]. For such projects jf audit --poetry fails with:

failed to build dependency tree: no dependencies were found. Please try to build your project and re-run the audit command

Nothing gets scanned. Reproduced on the latest release, JFrog CLI 2.131.0, with Poetry 2.5.1: poetry new mre && poetry add aiostream && poetry lock && jf audit --poetry.

Tests

  • New fixture tests/testdata/projects/package-managers/python/poetry/poetry-pep621-project: the same dependencies as poetry-project (urllib3 <1.24, django <1.11.16, Werkzeug <0.10), declared in [project]. poetry.lock was generated with Poetry 2.5.1 and passes poetry check --lock.
  • Unit: TestBuildPoetryDependencyListPep621 (no poetry install, no Xray). Fails without the fix ([]) and passes with it.
  • E2E: TestXrayAuditPoetry now also runs PEP 621 variants of the JSON and Simple JSON cases, with the same expectations as poetry-project (≥3 vulnerabilities, ≥1 license).
  • Local end-to-end check of jf audit --poetry --licenses against a SaaS instance, with jf built from jfrog-cli master + this fix. The fixtures were installed through an Artifactory PyPI remote, because direct pypi.org access isn't available in my environment, so I couldn't run the TestXrayAuditPoetry harness itself as-is.

@coderabbitai

coderabbitai Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI; Enforced overrides: Organization, Workspace
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: db293a16-6ae9-44dc-a906-d20fb3ec71ce

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

Tip

🎯 Customize your risk assessments

Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.

✅ Automatic approvals, with your rules

Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.

…21 [project]

Since Poetry 2.0, dependencies are declared by default in the PEP 621
[project] table. 'jf audit --poetry' found no dependencies for such projects
and failed with 'no dependencies were found'.

Bumps build-info-go to the fix (jfrog/build-info-go#438) and adds a
'poetry-pep621-project' fixture, with the same dependencies as
'poetry-project', covered by a unit test and by TestXrayAuditPoetry.

Fixes jfrog#560
}

// Poetry 2.0+ declares dependencies in the PEP 621 [project] table by default, instead of [tool.poetry.dependencies].
func TestBuildPoetryDependencyListPep621(t *testing.T) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have the new tests run in CI? The main test workflow (test.yml) has not run on this PR. It runs only on a PR with the safe to test label, and this PR has no labels. The PR comes from a fork, so no push run exists for it either. The only checks that ran are the static analysis, the CLA check and the Embedded Jars tests. So TestBuildPoetryDependencyListPep621 and the new PEP 621 cases in TestXrayAuditPoetry have not run in CI. The description also says that the author could not run TestXrayAuditPoetry as it is, so nobody has run these cases yet. Please add the label, and confirm that these tests pass.

Relation to the issue: These tests are the checks that jf audit --poetry now finds the dependencies of a PEP 621 project in this repo. Until they run, nothing shows that the fix works here.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, the main tests have not run in CI yet. I cannot add the safe to test label, because I do not have write access to this repository. Could a maintainer please add it?

What I ran locally: TestBuildPoetryDependencyListPep621 and all the other Poetry tests in this package pass. I could not run TestXrayAuditPoetry, because it needs an Xray server and direct access to pypi.org, which I do not have. I will confirm here when the CI run is done.

@reshmifrog reshmifrog added the safe to test Approve running integration tests on a pull request label Nov 26, 2026
@github-actions github-actions Bot removed the safe to test Approve running integration tests on a pull request label Nov 26, 2026

This branch is waiting to be deployed

1 waiting deployment
frogbot — b6fb318b Waiting Nov 5, 2026 by reshmifrog via scan-pull-request #4774
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants