Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Add cooldown for uv dependencies (#18987)

Mikail308b0074f19f
diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile
index 9d2427ee12..6c9a1bf3bc 100644
--- a/.devcontainer/Dockerfile
+++ b/.devcontainer/Dockerfile
@@ -18,7 +18,8 @@ RUN apt-get update \
# Required to allows to identify file types when handling file uploads
media-types
-COPY --from=ghcr.io/astral-sh/uv:0.8 /uv /uvx /bin/
+COPY --from=ghcr.io/astral-sh/uv:0.10.8@sha256:88234bc9e09c2b2f6d176a3daf411419eb0370d450a08129257410de9cfafd2a \
+ /uv /uvx /bin/
ENV UV_COMPILE_BYTECODE=1 UV_SYSTEM_PYTHON=1 UV_PROJECT_ENVIRONMENT=/usr/local
RUN --mount=type=cache,target=/root/.cache/uv \
--mount=type=bind,source=uv.lock,target=uv.lock \
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index 18431a3680..e2d4b53578 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -4,8 +4,12 @@ updates:
directory: "/"
schedule:
interval: "weekly"
+ cooldown:
+ default-days: 21 # 3 weeks
- package-ecosystem: "uv"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 10
+ cooldown:
+ default-days: 21 # 3 weeks
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index ddaa377c52..376352f40f 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -57,7 +57,7 @@ repos:
- repo: https://github.com/astral-sh/uv-pre-commit
# uv version.
- rev: 0.8.14
+ rev: 0.10.8
hooks:
- id: uv-lock
diff --git a/Dockerfile b/Dockerfile
index 2bfba1d181..d79f290fb0 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -9,7 +9,8 @@ RUN apt-get -y update \
# Install Python dependencies
WORKDIR /app
-COPY --from=ghcr.io/astral-sh/uv:0.8 /uv /uvx /bin/
+COPY --from=ghcr.io/astral-sh/uv:0.10.8@sha256:88234bc9e09c2b2f6d176a3daf411419eb0370d450a08129257410de9cfafd2a \
+ /uv /uvx /bin/
ENV UV_COMPILE_BYTECODE=1 UV_SYSTEM_PYTHON=1 UV_PROJECT_ENVIRONMENT=/usr/local
RUN --mount=type=cache,target=/root/.cache/uv \
--mount=type=bind,source=uv.lock,target=uv.lock \
diff --git a/pyproject.toml b/pyproject.toml
index 7b2a006626..a62e5c217c 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -51,7 +51,7 @@ dependencies = [
"prices~=1.0",
"promise~=2.3",
"pybars3>=0.9.7,<0.10",
- "pyjwt>=2.10.1,<3",
+ "pyjwt>=2.12.1,<3",
"python-dateutil>=2.8.2,<3",
"python-http-client>=3.3.7,<4",
"python-json-logger>=0.1.11,<3.3.0",
@@ -135,6 +135,17 @@ environments = [
]
package = false
+# Applies the 21 days cooldown (3 weeks) recommendation from Snyk
+# (https://snyk.io/articles/npm-security-best-practices-shai-hulud-attack/#2-2-snyk-cooldown-in-automatic-p-rs)
+exclude-newer = "3 weeks"
+
+[tool.uv.exclude-newer-package]
+# To customize on a per-package basis, for example you can do this:
+# setuptools = "30 days"
+
+# Allow more recent pyjwt version due to https://github.com/jpadilla/pyjwt/security/advisories/GHSA-752w-5fwx-jx9f
+pyjwt = "10 days"
+
[tool.poe.tasks]
start.help = "Start development server with hot reload"
start.cmd = "uvicorn saleor.asgi:application --reload"
diff --git a/uv.lock b/uv.lock
index 6604841aee..14b5c3f08a 100644
--- a/uv.lock
+++ b/uv.lock
@@ -8,6 +8,13 @@ supported-markers = [
"platform_python_implementation != 'PyPy'",
]
+[options]
+exclude-newer = "2026-03-05T14:03:19.981164582Z"
+exclude-newer-span = "P3W"
+
+[options.exclude-newer-package]
+pyjwt = { timestamp = "2026-03-16T14:03:19.981206291Z", span = "P10D" }
+
[[package]]
name = "amqp"
version = "5.3.1"
@@ -2680,7 +2687,7 @@ requires-dist = [
{ name = "pybars3", specifier = ">=0.9.7,<0.10" },
{ name = "pydantic", specifier = ">=2.11.0,<3" },
{ name = "pydantic-core", specifier = ">=2.33.0,<3" },
- { name = "pyjwt", specifier = ">=2.10.1,<3" },
+ { name = "pyjwt", specifier = ">=2.12.1,<3" },
{ name = "python-dateutil", specifier = ">=2.8.2,<3" },
{ name = "python-http-client", specifier = ">=3.3.7,<4" },
{ name = "python-json-logger", specifier = ">=0.1.11,<3.3.0" },