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
Background
PR #95 fixed false-positive SC5/SC6 findings on
pyproject.tomlmetadata keys by switching from the requirements-regex parser totomllib. It reads only the three PEP 621/517 standard dependency arrays:[project].dependencies[project.optional-dependencies][build-system].requiresGap
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.poetry.dependencies],[tool.poetry.dev-dependencies],[tool.poetry.group.*.dependencies][tool.pdm.dev-dependencies][tool.hatch.envs.*.dependencies][tool.uv.dev-dependencies]Implementation notes
_extract_packages_from_pyproject()to walkdata.get("tool", {})for known keys{version = "..."}dict format rather than PEP 508 strings — needs separate handlingAcceptance criteria