Skip to content

[K9VULN-14776] Emit manifest metadata for range resolution#151

Merged
rjcoulter22 merged 7 commits into
mainfrom
ryan.coulter/pyproject-version-ranges
May 19, 2026
Merged

[K9VULN-14776] Emit manifest metadata for range resolution#151
rjcoulter22 merged 7 commits into
mainfrom
ryan.coulter/pyproject-version-ranges

Conversation

@rjcoulter22

@rjcoulter22 rjcoulter22 commented May 14, 2026

Copy link
Copy Markdown
Contributor

Motivation

Manifest-only scans need enough metadata for downstream SCA enrichment: ranged dependencies should keep their declared range, and manifest-only dependencies should be marked for transitive enrichment.

Documentation

Document Link or Detail
RFC Resolving version ranges for SCA
Incident N/A
Jira Ticket K9VULN-14776

Summary

Adds manifest dependency metadata for lockfile-less scans.

  • Preserves pyproject exact pins as Version.
  • Preserves PEP 508 and Poetry ranges as VersionRange, including wildcard ranges like 1.*.
  • Emits datadog:version-range only for ranged manifest dependencies in pytproject.toml files (package.json handled here)
  • Emits datadog:requires-transitive-enrichment=true for emitted pyproject and package.json manifest dependencies.
  • Allows ranged pyproject dependencies to emit with an empty CycloneDX version and unversioned PyPI PURL.

Testing

  • New tests were added for new logic.
  • Existing tests were updated for new logic, and not only so that they pass!
  • Benchmark results prove that performance is the same or better.

Recovery

Notes for on-call - select only one:

  • The change can be rolled back.
  • Do not roll back. Why?:

@rjcoulter22
rjcoulter22 requested a review from a team as a code owner May 14, 2026 21:16
@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented May 15, 2026

Copy link
Copy Markdown

🎯 Code Coverage (details)
Patch Coverage: 79.56%
Overall Coverage: 85.23% (-0.13%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 9801fa6 | Docs | Datadog PR Page | Give us feedback!

@rjcoulter22 rjcoulter22 changed the title [K9VULN-14776] Emit pyproject manifest metadata [K9VULN-14776] Emit manifest metadata for range resolution May 15, 2026
@rjcoulter22
rjcoulter22 force-pushed the ryan.coulter/pyproject-version-ranges branch from 0f541ab to 6f04b9c Compare May 15, 2026 13:06
Comment thread pkg/lockfile/python/parse-pyproject-toml.go
Comment thread pkg/lockfile/python/pyproject_package_collector.go
Comment thread cmd/datadog-sbom-generator/__snapshots__/main_test.snap
@rjcoulter22
rjcoulter22 requested a review from jbcibois-ddhq May 18, 2026 18:51

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9801fa61d0

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread pkg/lockfile/python/pyproject_package_collector.go
@rjcoulter22
rjcoulter22 merged commit d0a5e34 into main May 19, 2026
11 checks passed
@rjcoulter22
rjcoulter22 deleted the ryan.coulter/pyproject-version-ranges branch May 19, 2026 12:35
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