Skip to content

feat(supply_chain): scan tool-specific dependency tables in pyproject.toml (Poetry, PDM, Hatch, uv) #171

Open

Description

@Shrotriya-lalit

Background

PR #95 fixed false-positive SC5/SC6 findings on pyproject.toml metadata keys by switching from the requirements-regex parser to tomllib. It reads only the three PEP 621/517 standard dependency arrays:

  • [project].dependencies
  • [project.optional-dependencies]
  • [build-system].requires

Gap

Projects using tool-specific build backends (Poetry, PDM, Hatch, uv) declare dependencies in non-standard tables that are currently not scanned. Previously these lines caused false positives; now they cause false negatives (real dependencies not checked for typosquatting/abandonment).

Tables to add

Tool Table(s)
Poetry [tool.poetry.dependencies], [tool.poetry.dev-dependencies], [tool.poetry.group.*.dependencies]
PDM [tool.pdm.dev-dependencies]
Hatch [tool.hatch.envs.*.dependencies]
uv [tool.uv.dev-dependencies]

Implementation notes

  • Extend _extract_packages_from_pyproject() to walk data.get("tool", {}) for known keys
  • Poetry group dependencies use a nested {version = "..."} dict format rather than PEP 508 strings — needs separate handling
  • Add tests for each tool format

Acceptance criteria

  • All four tool-specific formats parsed correctly
  • Malformed / unexpected structure in tool tables does not crash the analyzer
  • False-positive regression tests updated (tool-table keys must not produce SC5/SC6 on metadata fields)
  • New tests for each tool format

Activity

  1. rng1995 commented on Aug 14, 2026

    @rng1995
    Collaborator

    Active implementation: PR #190. The PR is linked back with Closes #171; keeping this issue open until it merges.

  2. rng1995 commented on Oct 4, 2026

    @rng1995
    Collaborator

    PR-state snapshot checked on 2026-10-04:

    • PR #190 — open, non-draft; GitHub review decision: changes requested; merge conflicts reported.

    Keeping this issue open: the relevant implementation is not merged. Check/review status is a point-in-time snapshot, not a claim of merge readiness.

  3. added a commit that references this issue on Nov 5, 2026
    eac4c42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions