Security Model and Trust Boundaries of setup-uv
mainThe setup-uv GitHub Action operates within a specific security model involving several trust boundaries. Understanding these is critical for users configuring workflows:
Trust Boundaries
- Maintainers & GitHub Infrastructure: Trusted for source code, bundles, workflows, and the runner protocol. Compromise of these is considered an infrastructure issue, not a repository bug.
- Consumer Workflow Authors: Control the action reference, triggers, runner, permissions, secrets, and inputs. These are trusted choices unless they are derived from untrusted event data.
- Project/Checkout Content: When using
setup-uv, the action trusts the selected checkout, project authors, and pull-request contributors. This includes project/version files (likeuv.tomlorpyproject.toml), discovered Python interpreters, virtual environments, and symlinks. Note: Runningsetup-uvon an untrusted checkout with higher authority is a consumer trust decision; code in the checkout may inherit the action's environment. - Remote Metadata: Official endpoints and TLS roots are trusted. If you use a custom manifest, you authorize its URLs and hashes.
- Cache and Runner State: State produced by the same principal is trusted by default. However, lower-authority references may be able to read higher-authority caches, which can lead to confidentiality leaks.
Security Invariants
To ensure a secure setup, setup-uv adheres to these principles:
- Executable Identity: The precedence for determining which
uvto run is: 1. Workflow version, 2. Version file, 3. Project configuration, 4.latest. - Credential Protection: Tokens and URL credentials are restricted to workflow-authorized origins, redirects, paths, and logs.
- Path Isolation: Changes to paths, environments, or virtual environments are designed to affect only authorized targets.
- Cache Integrity: Cache keys and scopes are managed to prevent lower-to-higher authority poisoning and higher-to-lower authority disclosure.