[Security] Add requirements lockfile (datadog-api-client-python)#3375
Draft
[Security] Add requirements lockfile (datadog-api-client-python)#3375
Conversation
Adds requirements.in (extracted from setup.cfg install_requires + extras) and a compiled requirements.txt with pinned versions and hashes, generated by uv pip compile. This does not change the published dependency ranges in setup.cfg — it only provides a lockfile for deterministic CI builds and supply-chain auditability. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
|
@codex review |
|
To use Codex here, create a Codex account and connect to github. |
Every CI job now computes a 2-day-old cutoff timestamp and passes --uploaded-prior-to to all pip install commands. This refuses any PyPI package published less than 2 days ago, blocking freshly- published malicious versions from entering CI builds. Workflows updated: - reusable-python-test.yml (unit tests) - reusable-integration-test.yml (integration tests) - reusable-examples.yml (example checks) - reusable-pre-commit.yml (pre-commit hooks) - docs.yml (documentation build) - publish.yml (release publishing) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The lockfile with SHA-256 hashes already provides supply-chain protection. The --uploaded-prior-to flag requires pip 26.0+ which is not available on runners, and Python 3.8 cannot use pip 26.0 at all.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a compiled requirements lockfile with SHA-256 hashes for reproducible CI builds.
requirements.in— human-readable dependency input (16 deps)requirements.txt— compiled lockfile (45 packages, all with hashes)Why: Follow-up to incident #51987. This library had no lockfile for the main package.
Workstream: #incident-51987-pinning-dependencies