Skip to content

Upgrade minimum uv version to 0.9.17 and add supply-chain defense#32

Merged
tsvikas merged 2 commits into
mainfrom
claude/add-dependency-age-guard-5gg0z
May 15, 2026
Merged

Upgrade minimum uv version to 0.9.17 and add supply-chain defense#32
tsvikas merged 2 commits into
mainfrom
claude/add-dependency-age-guard-5gg0z

Conversation

@tsvikas
Copy link
Copy Markdown
Owner

@tsvikas tsvikas commented May 15, 2026

Summary

This PR upgrades the minimum required uv version from 0.7.3 to 0.9.17 across the project and adds a supply-chain defense mechanism by excluding package versions released within the last 24 hours.

Key Changes

  • Updated minimum uv version requirement to 0.9.17 in:

    • pyproject.toml
    • project_name/pyproject.toml.jinja
    • README.md
    • .github/workflows/uv-tests.yml (test matrix)
  • Added supply-chain defense configuration via exclude-newer = "24 hours" in:

    • pyproject.toml
    • project_name/pyproject.toml.jinja
    • Includes explanatory comment about the lightweight defense against just-published malicious releases
  • Simplified CI workflow by removing the Python version compatibility workaround for older uv versions (the sed command that was only needed for uv 0.7.3)

Implementation Details

The exclude-newer setting is a uv feature that prevents dependency resolution from considering package versions released within the specified time window, providing protection against supply-chain attacks while maintaining reasonable package freshness. This is now enforced as a best practice in the template.

https://claude.ai/code/session_01GvHcqWhhUrpn8qd3JuHxnx

Use uv's exclude-newer = "24 hours" as a lightweight supply-chain
defense against compromised packages published in the last day. Bumps
the required uv version to >=0.9.17 (which introduced relative-duration
support) in the template, root project, README, and CI matrix; drops the
sed shim that downgraded Python 3.14 -> 3.13 for the now-removed 0.7.3
matrix entry.
Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • The new exclude-newer = "24 hours" default is quite opinionated; consider exposing it as a template variable in project_name/pyproject.toml.jinja so consumers can easily opt out or adjust the window without editing generated files.
  • You now have the uv minimum version defined in three places (root pyproject.toml, template pyproject.toml.jinja, and README); consider centralizing this as a single source of truth for easier bumps (e.g., using a Copier variable rendered into both the template and README).
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The new `exclude-newer = "24 hours"` default is quite opinionated; consider exposing it as a template variable in `project_name/pyproject.toml.jinja` so consumers can easily opt out or adjust the window without editing generated files.
- You now have the `uv` minimum version defined in three places (root `pyproject.toml`, template `pyproject.toml.jinja`, and README); consider centralizing this as a single source of truth for easier bumps (e.g., using a Copier variable rendered into both the template and README).

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Regenerated with uv 0.9.17; lockfile now records the resolution-time
exclude-newer cutoff in [options] and pins package versions to those
that were at least 24h old at lock time.
@tsvikas tsvikas merged commit 12c5258 into main May 15, 2026
5 checks passed
@tsvikas tsvikas deleted the claude/add-dependency-age-guard-5gg0z branch May 15, 2026 11:56
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