Skip to content

chore: Cherry-picked changes from upstream - #108

Closed
github-actions[bot] wants to merge 7 commits into
mainfrom
auto-cherry-pick
Closed

chore: Cherry-picked changes from upstream#108
github-actions[bot] wants to merge 7 commits into
mainfrom
auto-cherry-pick

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Cherry-picked changes from upstream.

Adds `uv.lock` as a supported `version-file` source. When `uv` is locked
as a
dependency in `uv.lock`, the action now installs the exact pinned
version,
closing the gap reported in #682.

This is useful for deterministic CI: the same uv version is used until
the
lockfile is updated, which avoids "CI worked yesterday, fails today"
drift and
reduces supply-chain exposure from auto-installing the latest release.

The implementation mirrors the existing `version-file` parsers — a new
`uv.lock`
entry in the parser registry reads the `[[package]]` whose `name = "uv"`
and
returns its locked `version`. Scoped to explicit `version-file:
uv.lock`;
workspace auto-detection is left as a possible follow-up to avoid
precedence
ambiguity with `uv.toml` / `pyproject.toml`.

Validation (local, Node 23; dist build is esbuild-deterministic):
- `npm run all` → build clean, biome clean, package clean, jest 77/77
- New tests: 3 unit (`uv-lock-file.test.ts`) + 1 integration — exact pin
resolves
  through the full pipeline (`uv.lock` → `0.8.17`)
- dist rebuilt + committed (single bundle, no spurious churn)

related: #682
Adds `uv.lock` as a supported `version-file` source. When `uv` is locked
as a
dependency in `uv.lock`, the action now installs the exact pinned
version,
closing the gap reported in #682.

This is useful for deterministic CI: the same uv version is used until
the
lockfile is updated, which avoids "CI worked yesterday, fails today"
drift and
reduces supply-chain exposure from auto-installing the latest release.

The implementation mirrors the existing `version-file` parsers — a new
`uv.lock`
entry in the parser registry reads the `[[package]]` whose `name = "uv"`
and
returns its locked `version`. Scoped to explicit `version-file:
uv.lock`;
workspace auto-detection is left as a possible follow-up to avoid
precedence
ambiguity with `uv.toml` / `pyproject.toml`.

Validation (local, Node 23; dist build is esbuild-deterministic):
- `npm run all` → build clean, biome clean, package clean, jest 77/77
- New tests: 3 unit (`uv-lock-file.test.ts`) + 1 integration — exact pin
resolves
  through the full pipeline (`uv.lock` → `0.8.17`)
- dist rebuilt + committed (single bundle, no spurious churn)

related: #682
Adds `uv.lock` as a supported `version-file` source. When `uv` is locked
as a
dependency in `uv.lock`, the action now installs the exact pinned
version,
closing the gap reported in #682.

This is useful for deterministic CI: the same uv version is used until
the
lockfile is updated, which avoids "CI worked yesterday, fails today"
drift and
reduces supply-chain exposure from auto-installing the latest release.

The implementation mirrors the existing `version-file` parsers — a new
`uv.lock`
entry in the parser registry reads the `[[package]]` whose `name = "uv"`
and
returns its locked `version`. Scoped to explicit `version-file:
uv.lock`;
workspace auto-detection is left as a possible follow-up to avoid
precedence
ambiguity with `uv.toml` / `pyproject.toml`.

Validation (local, Node 23; dist build is esbuild-deterministic):
- `npm run all` → build clean, biome clean, package clean, jest 77/77
- New tests: 3 unit (`uv-lock-file.test.ts`) + 1 integration — exact pin
resolves
  through the full pipeline (`uv.lock` → `0.8.17`)
- dist rebuilt + committed (single bundle, no spurious churn)

related: #682
Adds `uv.lock` as a supported `version-file` source. When `uv` is locked
as a
dependency in `uv.lock`, the action now installs the exact pinned
version,
closing the gap reported in #682.

This is useful for deterministic CI: the same uv version is used until
the
lockfile is updated, which avoids "CI worked yesterday, fails today"
drift and
reduces supply-chain exposure from auto-installing the latest release.

The implementation mirrors the existing `version-file` parsers — a new
`uv.lock`
entry in the parser registry reads the `[[package]]` whose `name = "uv"`
and
returns its locked `version`. Scoped to explicit `version-file:
uv.lock`;
workspace auto-detection is left as a possible follow-up to avoid
precedence
ambiguity with `uv.toml` / `pyproject.toml`.

Validation (local, Node 23; dist build is esbuild-deterministic):
- `npm run all` → build clean, biome clean, package clean, jest 77/77
- New tests: 3 unit (`uv-lock-file.test.ts`) + 1 integration — exact pin
resolves
  through the full pipeline (`uv.lock` → `0.8.17`)
- dist rebuilt + committed (single bundle, no spurious churn)

related: #682
This adds a threat model for `setup-uv` so security scanners can use it
as a baseline in terms of what's in-, and out of scope.

The TM covers credential recipients, executable and cache boundaries,
and release authority. It treats checkout-selected interpreters, paths,
virtual environments, symlinks, and helpers as delegated project
authority unless they override an explicit workflow choice or cross an
independent cache, runner, remote, or publication boundary.
## Summary
- URL-encode the Python version component before adding it to the cache
key
- URL-encode the user-provided cache suffix for the same reason
- Add cache key tests for Python ranges, comma-containing suffixes, and
unchanged simple inputs

Fixes #914

Refs: pi-session 019f3164-85e7-7817-bffd-501d89b3a1fd

## Tests
- npm run all
## Summary
- URL-encode the Python version component before adding it to the cache
key
- URL-encode the user-provided cache suffix for the same reason
- Add cache key tests for Python ranges, comma-containing suffixes, and
unchanged simple inputs

Fixes #914

Refs: pi-session 019f3164-85e7-7817-bffd-501d89b3a1fd

## Tests
- npm run all
@github-actions

Copy link
Copy Markdown
Contributor Author

🚀 PR Updated!

The PR has been updated with the latest cherry-picked commits.

@step-security/maintained-actions-dev Please review and approve the changes.

❌ Build script failed. No files were committed.

📦 Target Release Version: v8.3.0
📋 Previous Release Version: v8.2.0

❗ Missing Files:

  • docs/threat-model.md

🛑 Workflow Files (Cannot be auto-applied by GitHub Actions):

  • .github/workflows/release.yml from commit a1a7345c8ef5d6d3b18c6f1c247244c19f1d878c
  • .github/workflows/update-docs.yml from commit a1a7345c8ef5d6d3b18c6f1c247244c19f1d878c
  • .github/workflows/codeql-analysis.yml from commit fc16fa3bbf37d2816834f76a1fe25d33564eaa34
  • .github/workflows/test.yml from commit fc16fa3bbf37d2816834f76a1fe25d33564eaa34
  • .github/workflows/update-docs.yml from commit fc16fa3bbf37d2816834f76a1fe25d33564eaa34
  • .github/workflows/update-known-checksums.yml from commit fc16fa3bbf37d2816834f76a1fe25d33564eaa34
  • .github/workflows/release-drafter.yml from commit 9225f843d7a9f80a757cf25ef48901fda69ba4bc
  • .github/workflows/codeql-analysis.yml from commit 3cc3c11fdf511cab39136b7c946d973d4ad0df20
  • .github/workflows/release-drafter.yml from commit 3cc3c11fdf511cab39136b7c946d973d4ad0df20

❌ Conflicting Files:

  • src/download/checksum/known-checksums.ts from commit 21d5da3bc3126fc3b5b182828c8772282a6b694d
  • src/utils/platforms.ts from commit ed73b5df24d31a50feea1e4d7296df2b5840941d
  • src/download/checksum/known-checksums.ts from commit e2f6a928de294d4d93caadb34c0fa04b28958483
  • src/download/checksum/known-checksums.ts from commit ca5ddd015e07666cb1f1340ad6171f5e7afffb3e
  • README.md from commit 3faa3174e67b801ab1fc4ffd8696ae40bf213d74
  • action.yml from commit 3faa3174e67b801ab1fc4ffd8696ae40bf213d74
  • src/version/file-parser.ts from commit 3faa3174e67b801ab1fc4ffd8696ae40bf213d74
  • src/version/types.ts from commit 3faa3174e67b801ab1fc4ffd8696ae40bf213d74
  • src/download/checksum/known-checksums.ts from commit a9b33f02405f50e505f17ab8530e42a23200a5d1
  • src/download/checksum/known-checksums.ts from commit e53da1729651ec87e3646a13161f5f934d225b22
  • src/download/checksum/known-checksums.ts from commit b17378828233a8d43dbf67c40f72f2ae5d669916
  • src/download/checksum/known-checksums.ts from commit 224c887d488ab24d8a1b49f10416d6ad6b6ca71d
  • src/download/checksum/known-checksums.ts from commit c5680ec91f7b9b91406fab4ded5d45245abf7b67
  • README.md from commit a5e9cbfd5f946647f478460490fa497b0a732e63
  • docs/advanced-version-configuration.md from commit a5e9cbfd5f946647f478460490fa497b0a732e63
  • docs/caching.md from commit a5e9cbfd5f946647f478460490fa497b0a732e63
  • docs/customization.md from commit a5e9cbfd5f946647f478460490fa497b0a732e63
  • docs/environment-and-tools.md from commit a5e9cbfd5f946647f478460490fa497b0a732e63
  • biome.json from commit 3cc3c11fdf511cab39136b7c946d973d4ad0df20
  • src/cache/restore-cache.ts from commit 17c398959b4611a88929fabb5c563a8e43a0ff60
  • __tests__/version/requirements-file.test.ts from commit d31148d669074a8d0a63714ba94f3201e7020bc3
  • src/version/requirements-file.ts from commit d31148d669074a8d0a63714ba94f3201e7020bc3

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