Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ jobs:
- name: Install uv
uses: astral-sh/setup-uv@v10.3.0
with:
version: "0.13.0"
version: "0.13.1"

- name: Set up Python
run: uv python install 3.12
run: uv python install 3.15

- uses: actions/cache@v6
with:
Expand All @@ -38,7 +38,7 @@ jobs:
restore-keys: ${{ runner.os }}-uv-

- name: Install dependencies
run: uv sync --frozen --all-extras
run: uv sync --frozen --all-extras --python 3.15

- name: Ruff check
run: uv run ruff check .
Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:
- name: Install uv
uses: astral-sh/setup-uv@v10.3.0
with:
version: "0.13.0"
version: "0.13.1"

- name: Set up Python
run: uv python install ${{ matrix.python }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

- uses: astral-sh/setup-uv@v10.3.0
with:
version: "0.13.0"
version: "0.13.1"

- name: Set version from tag
run: sed -i "s/^version = .*/version = \"${GITHUB_REF_NAME#v}\"/" pyproject.toml
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ jobs:
- uses: useblacksmith/checkout@v1
- uses: astral-sh/setup-uv@v10.3.0
with:
version: "0.13.0"
version: "0.13.1"
- uses: actions/setup-python@v7
with:
python-version: "3.14"
python-version: "3.15"

- name: Install pip-audit
run: pip install pip-audit
Expand Down
8 changes: 5 additions & 3 deletions agentscore_commerce/identity/ucp_jwks.py
Original file line number Diff line number Diff line change
Expand Up @@ -583,9 +583,11 @@ def _build_env_signing_key(

try:
jwk_dict = json.loads(env_jwk)
except json.JSONDecodeError as exc:
msg = f"{env_jwk_var} is not valid JSON: {exc}"
raise ValueError(msg) from exc
except json.JSONDecodeError:
# The decode error holds the whole value in ``.doc``, which here is
# private key material, so it is not chained onto what is raised.
msg = f"{env_jwk_var} is not valid JSON."
raise ValueError(msg) from None

if not isinstance(jwk_dict, dict) or not jwk_dict:
msg = f"{env_jwk_var} must be a non-empty JWK object; got {type(jwk_dict).__name__}."
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "agentscore-commerce"
version = "3.2.0"
version = "3.2.1"
description = "Agentic commerce SDK for Python: identity middleware (FastAPI, Flask, Django, AIOHTTP, Sanic, ASGI) + payment helpers + 402 builders + discovery + Stripe multichain. The full merchant-side toolkit for AgentScore-powered agentic commerce."
readme = "README.md"
license = "MIT"
Expand Down
9 changes: 9 additions & 0 deletions tests/test_load_ucp_signing_key_from_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,15 @@ def test_malformed_json_raises_naming_env_var(monkeypatch) -> None:
load_ucp_signing_key_from_env()


def test_malformed_json_keeps_env_value_out_of_the_error(monkeypatch) -> None:
monkeypatch.setenv("UCP_SIGNING_KEY_JWK_PRIVATE", '{"secret":SENSITIVEBYTES}')
with pytest.raises(ValueError) as info:
load_ucp_signing_key_from_env()
assert "SENSITIVE" not in str(info.value)
assert info.value.__cause__ is None
assert info.value.__suppress_context__ is True


def test_unsupported_kty_crv_raises_naming_actual(monkeypatch) -> None:
monkeypatch.setenv(
"UCP_SIGNING_KEY_JWK_PRIVATE",
Expand Down
529 changes: 272 additions & 257 deletions uv.lock

Large diffs are not rendered by default.

Loading