Skip to content

build: use pip's dependency cooldown feature#1356

Open
behnazh-w wants to merge 2 commits intomainfrom
behnazh/add-pip-cooldown
Open

build: use pip's dependency cooldown feature#1356
behnazh-w wants to merge 2 commits intomainfrom
behnazh/add-pip-cooldown

Conversation

@behnazh-w
Copy link
Copy Markdown
Member

Summary

Use pip's --uploaded-prior-to option to avoid installing packages that have very recently been published to PyPI. By doing so, this allows for human operators like security researchers and PyPI admins a chance to respond to reports of malware. See: https://blog.pypi.org/posts/2026-04-02-incident-report-litellm-telnyx-supply-chain-attack/

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Apr 10, 2026
@behnazh-w behnazh-w force-pushed the behnazh/add-pip-cooldown branch from ec5a9d0 to 04ca757 Compare April 10, 2026 01:06
Signed-off-by: behnazh-w <behnaz.hassanshahi@oracle.com>
@behnazh-w behnazh-w force-pushed the behnazh/add-pip-cooldown branch from 04ca757 to 432173a Compare April 10, 2026 01:13
… can be installed

Signed-off-by: behnazh-w <behnaz.hassanshahi@oracle.com>
Copy link
Copy Markdown
Contributor

@jenstroeger jenstroeger left a comment

Choose a reason for hiding this comment

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

This is great and very useful to avoid immediate CI breakage with new packages!

# released very recently, for example:
# make setup PYPI_UPLOAD_DELAY_DAYS=1
PYPI_UPLOAD_DELAY_DAYS ?= 2
PYPI_UPLOADED_PRIOR_TO ?= $$(date -d '-$(PYPI_UPLOAD_DELAY_DAYS)days' -Idate)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Might not apply here, but the default macOS date command will fail:

jens@pooh ~ > which date  # GNU date command.
/opt/local/libexec/gnubin/date
jens@pooh ~ > date -d '2days' -Idate
2026-04-12
jens@pooh ~ > /bin/date -d '2days' -Idate  # macOS default date command
/bin/date: illegal option -- d
usage: date [-jnRu] [-I[date|hours|minutes|seconds]] [-f input_fmt]
            [-r filename|seconds] [-v[+|-]val[y|m|w|d|H|M|S]]
            [[[[mm]dd]HH]MM[[cc]yy][.SS] | new_date] [+output_fmt]

Comment on lines -79 to +80
run: make setup
run: make setup PYPI_UPLOAD_DELAY_DAYS=1
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I keep looking for the documentation of this notation 🤔 PYPI_UPLOAD_DELAY_DAYS=1 after the target is a variable passed to make?

If I use

PYPI_UPLOAD_DELAY_DAYS=1 make setup

then PYPI_UPLOAD_DELAY_DAYS is an environment variable passed to make (discussion) so it’s available in the Makefile (docs).

But I can’t find the above notation documented?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants