Skip to content

[K9VULN-14776] Emit pyproject manifest metadata#142

Closed
rjcoulter22 wants to merge 5 commits into
mainfrom
ryan.coulter/pyproject-version-ranges
Closed

[K9VULN-14776] Emit pyproject manifest metadata#142
rjcoulter22 wants to merge 5 commits into
mainfrom
ryan.coulter/pyproject-version-ranges

Conversation

@rjcoulter22
Copy link
Copy Markdown
Contributor

@rjcoulter22 rjcoulter22 commented May 5, 2026

Motivation

Manifest-only pyproject.toml 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-only dependency metadata for pyproject.toml scans.

  • Preserves exact pins as Version.
  • Preserves PEP 508 and Poetry ranges as VersionRange, including wildcard ranges like 1.*.
  • Emits datadog:version-range only for ranged dependencies.
  • Emits datadog:requires-transitive-enrichment=true for all emitted pyproject manifest dependencies.
  • Allows ranged manifest 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.

Recovery

Notes for on-call - select only one:

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

@rjcoulter22 rjcoulter22 force-pushed the ryan.coulter/pyproject-version-ranges branch from ac79ebf to 08219ba Compare May 5, 2026 19:41
@datadog-prod-us1-4
Copy link
Copy Markdown

datadog-prod-us1-4 Bot commented May 5, 2026

🎯 Code Coverage (details)
Patch Coverage: 77.53%
Overall Coverage: 84.66% (-0.34%)

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

@rjcoulter22 rjcoulter22 changed the title [codex] Support pyproject version ranges Support pyproject version ranges May 6, 2026
@rjcoulter22 rjcoulter22 changed the title Support pyproject version ranges Support parsing pyproject for version ranges May 6, 2026
@rjcoulter22 rjcoulter22 force-pushed the ryan.coulter/pyproject-version-ranges branch 2 times, most recently from c343465 to a77c687 Compare May 6, 2026 20:34
@rjcoulter22 rjcoulter22 force-pushed the ryan.coulter/pyproject-version-ranges branch from a77c687 to 30e4a40 Compare May 14, 2026 15:03
@rjcoulter22 rjcoulter22 changed the title Support parsing pyproject for version ranges [K9VULN-14776] Emit pyproject manifest metadata May 14, 2026
@rjcoulter22 rjcoulter22 force-pushed the ryan.coulter/pyproject-version-ranges branch 2 times, most recently from f4cfddf to 19880cc Compare May 14, 2026 15:31
@rjcoulter22
Copy link
Copy Markdown
Contributor Author

@codex review

Copy link
Copy Markdown

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

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: 19880cccce

ℹ️ 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/parse-pyproject-toml.go Outdated
@rjcoulter22 rjcoulter22 force-pushed the ryan.coulter/pyproject-version-ranges branch from 19880cc to 5462d7f Compare May 14, 2026 18:18
@rjcoulter22 rjcoulter22 force-pushed the ryan.coulter/pyproject-version-ranges branch from 5462d7f to fdb9736 Compare May 14, 2026 18:27
@rjcoulter22 rjcoulter22 marked this pull request as ready for review May 14, 2026 18:32
@rjcoulter22 rjcoulter22 requested a review from a team as a code owner May 14, 2026 18:32
@rjcoulter22 rjcoulter22 force-pushed the ryan.coulter/pyproject-version-ranges branch 2 times, most recently from 9a394e4 to 274d613 Compare May 14, 2026 18:55
@rjcoulter22 rjcoulter22 force-pushed the ryan.coulter/pyproject-version-ranges branch from 274d613 to aeb576d Compare May 14, 2026 19:02
Copy link
Copy Markdown

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

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: aeb576df74

ℹ️ 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
Copy link
Copy Markdown

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

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: cf9dc46617

ℹ️ 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/parse-pyproject-toml.go Outdated
Copy link
Copy Markdown

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

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: 3c3fb3fe8d

ℹ️ 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/parse-pyproject-toml.go Outdated
Copy link
Copy Markdown

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

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: 16135e5a4a

ℹ️ 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/parse-pyproject-toml.go
@rjcoulter22 rjcoulter22 force-pushed the ryan.coulter/pyproject-version-ranges branch from 16135e5 to 4fb38d3 Compare May 14, 2026 20:19
Copy link
Copy Markdown

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

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: 6e389ee0e2

ℹ️ 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/parse-pyproject-toml.go
@rjcoulter22 rjcoulter22 deleted the ryan.coulter/pyproject-version-ranges branch May 14, 2026 21:02
@rjcoulter22
Copy link
Copy Markdown
Contributor Author

Closing, going with a simpler version and this PR is too messy for my liking

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.

1 participant