Skip to content

chore(deps): bump cedarpy from 4.8.7 to 4.12.0 - #121

Merged
imran-siddique merged 1 commit into
mainfrom
dependabot/pip/cedarpy-4.12.0
Sep 22, 2026
Merged

imran-siddique merged 1 commit into
mainfrom
dependabot/pip/cedarpy-4.12.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Sep 21, 2026

Copy link
Copy Markdown
Contributor

Bumps cedarpy from 4.8.7 to 4.12.0.

Release notes

Sourced from cedarpy's releases.

cedarpy v4.12.0

cedarpy 4.12.0 upgrades the Cedar Policy engine from v4.8.2 to v4.12.0 and adds a typed policy syntax tree (cedarpy.pst) for reading and rewriting policies as Python values. Thanks @​h0rv and @​swenger for the contributions!

Added

  • policies_to_pst(policies) parses Cedar policy text into typed cedarpy.pst nodes, one frozen dataclass per cedar_policy::pst node kind, so a consumer can pattern-match on real types instead of an untyped tree keyed by string operators (#107). Each closed set Cedar defines is closed in the Python type, so a match over one can be checked for exhaustiveness. Nodes are frozen, slotted, hashable values, and their mapping fields reject mutation. Static policies and unlinked templates only: a residual from is_authorized_partial cannot be represented this way, because PST validates each clause as it is built and rejects any containing an unresolved unknown(...) node. The node set tracks the engine: syntax not yet modelled by cedarpy.pst raises ValueError rather than building an incomplete tree. See the Policy Syntax Tree Guide for the node types and the guarantees. (#108). Thanks @​h0rv!

  • PolicySet.from_pst(nodes) and PolicySet.to_pst() are the round trip, so a policy set can be read as nodes, rewritten, and turned back into a handle the engine authorizes against. policies_to_pst(text) is now PolicySet.from_str(text).to_pst(). from_pst raises TypeError for anything that is not a cedarpy.pst node, and ValueError for nodes that do not form a valid set. Expression nesting is limited to 100 levels in both conversion directions; deeper input raises ValueError. Raising this limit later is backwards compatible; lowering it would be breaking.

  • pst.entity_uids(node) collects every entity uid named anywhere under a node, for deciding what to load before evaluating. It takes a node, or a mapping or tuple of nodes such as a PolicySet's templates. Anything it cannot walk raises TypeError rather than returning an empty result, so passing a PolicySet handle by mistake cannot look like "this policy names no entities".

Changed

  • Documented that is_authorized_partial exposes an experimental upstream feature: it is built on the cedar-policy crate's partial-eval feature, which Cedar ships outside its semver guarantee and may change or break in any release. The partial authorization guide, README section, docstring, and Rust binding now all carry the marker. No behavior change.

  • Updated the remaining declared Rust dependencies to their latest patch releases: pyo3 0.27.1 → 0.27.2 (crash fix for Rust 1.92+ builds with debug assertions; no API changes), serde 1.0.228 → 1.0.229, and serde_json 1.0.145 → 1.0.151 (float formatting switched from Ryū to Żmij upstream — output can differ textually while remaining valid; the 60,800-case Cedar corpus passes unchanged). No behavior changes observed across unit, integration, corpus, or benchmark suites.

  • Removed the unused cedar-policy-cli crate dependency, present since the project's initial scaffold but never referenced from code. Drops 34 transitive crates (clap, miette's terminal-support stack, rustix, …) from Cargo.lock, shrinking build time, audit surface, and the version-resolution coupling its exact =X.Y.Z pin on cedar-policy imposed. No functional change — cedar-policy-formatter (which backs format_policies) remains.

  • Cedar Policy engine upgraded from v4.8.2 to v4.12.0 (Cedar language version 4.4 → 4.5, adding the extended has operator in JSON policies). No cedarpy API changes: the engine's breaking changes between 4.9 and 4.12 are confined to experimental features cedarpy does not enable (tpe, protobuf, tolerant-ast) and to the then-unused pst module; the partial-eval surface is unchanged. Verified against the upstream v4.12.0 integration corpus (60,800 request cases), including the new JSON-policy-format and JSON-schema-format suites (#106). Thanks @​h0rv!

Removed

  • Dropped support for Python 3.9, which reached end-of-life on 2025-10-31 and no longer receives security fixes. requires-python is now >=3.10, so cp39 wheels are no longer built and pip will not install new cedarpy releases on 3.9; existing releases remain available. Python 3.10 (security-supported until October 2026) through 3.14 remain supported.

Security

  • Updated pyo3 0.27.2 → 0.29.2, fixing GHSA-36hh-v3qg-5jq4 (out-of-bounds read in nth/nth_back on PyList/PyTuple iterators) and GHSA-chgr-c6px-7xpp (missing Sync bound on PyCFunction::new_closure closures). Neither vulnerable path is reachable from cedarpy's API — both alerts had been triaged and dismissed as unreachable — so this is defense-in-depth. No source changes were required; unit, integration, 60,800-case corpus, and benchmark suites pass unchanged (#115). Thanks @​swenger!
  • Updated anyhow 1.0.95 → 1.0.104, clearing the RUSTSEC-2026-0190 unsoundness warning in Error::downcast_mut (fixed upstream in 1.0.103).

Full Changelog: k9securityio/cedar-py@v4.8.7...v4.12.0

Changelog

Sourced from cedarpy's changelog.

[4.12.0] - 2026-09-12

Added

  • policies_to_pst(policies) parses Cedar policy text into typed cedarpy.pst nodes, one frozen dataclass per cedar_policy::pst node kind, so a consumer can pattern-match on real types instead of an untyped tree keyed by string operators (#107). Each closed set Cedar defines is closed in the Python type, so a match over one can be checked for exhaustiveness. Nodes are frozen, slotted, hashable values, and their mapping fields reject mutation. Static policies and unlinked templates only: a residual from is_authorized_partial cannot be represented this way, because PST validates each clause as it is built and rejects any containing an unresolved unknown(...) node. The node set tracks the engine: syntax not yet modelled by cedarpy.pst raises ValueError rather than building an incomplete tree. See the Policy Syntax Tree Guide for the node types and the guarantees. (#108). Thanks @​h0rv!

  • PolicySet.from_pst(nodes) and PolicySet.to_pst() are the round trip, so a policy set can be read as nodes, rewritten, and turned back into a handle the engine authorizes against. policies_to_pst(text) is now PolicySet.from_str(text).to_pst(). from_pst raises TypeError for anything that is not a cedarpy.pst node, and ValueError for nodes that do not form a valid set. Expression nesting is limited to 100 levels in both conversion directions; deeper input raises ValueError. Raising this limit later is backwards compatible; lowering it would be breaking.

  • pst.entity_uids(node) collects every entity uid named anywhere under a node, for deciding what to load before evaluating. It takes a node, or a mapping or tuple of nodes such as a PolicySet's templates. Anything it cannot walk raises TypeError rather than returning an empty result, so passing a PolicySet handle by mistake cannot look like "this policy names no entities".

Changed

  • Documented that is_authorized_partial exposes an experimental upstream feature: it is built on the cedar-policy crate's partial-eval feature, which Cedar ships outside its semver guarantee and may change or break in any release. The partial authorization guide, README section, docstring, and Rust binding now all carry the marker. No behavior change.

  • Updated the remaining declared Rust dependencies to their latest patch releases: pyo3 0.27.1 → 0.27.2 (crash fix for Rust 1.92+ builds with debug assertions; no API changes), serde 1.0.228 → 1.0.229, and serde_json 1.0.145 → 1.0.151 (float formatting switched from Ryū to Żmij upstream — output can differ textually while remaining valid; the 60,800-case Cedar corpus passes unchanged). No behavior changes observed across unit, integration, corpus, or benchmark suites.

  • Removed the unused cedar-policy-cli crate dependency, present since the project's initial scaffold but never referenced from code. Drops 34 transitive crates (clap, miette's terminal-support stack, rustix, …) from Cargo.lock, shrinking build time, audit surface, and the version-resolution coupling its exact =X.Y.Z pin on cedar-policy imposed. No functional change — cedar-policy-formatter (which backs format_policies) remains.

  • Cedar Policy engine upgraded from v4.8.2 to v4.12.0 (Cedar language version 4.4 → 4.5, adding the extended has operator in JSON policies). No cedarpy API changes: the engine's breaking changes between 4.9 and 4.12 are confined to experimental features cedarpy does not enable (tpe, protobuf, tolerant-ast) and to the then-unused pst module; the partial-eval surface is unchanged. Verified against the upstream v4.12.0 integration corpus (60,800 request cases), including the new JSON-policy-format and JSON-schema-format suites (#106). Thanks @​h0rv!

Removed

  • Dropped support for Python 3.9, which reached end-of-life on 2025-10-31 and no longer receives security fixes. requires-python is now >=3.10, so cp39 wheels are no longer built and pip will not install new cedarpy releases on 3.9; existing releases remain available. Python 3.10 (security-supported until October 2026) through 3.14 remain supported.

Security

  • Updated pyo3 0.27.2 → 0.29.2, fixing GHSA-36hh-v3qg-5jq4 (out-of-bounds read in nth/nth_back on PyList/PyTuple iterators) and GHSA-chgr-c6px-7xpp (missing Sync bound on PyCFunction::new_closure closures). Neither vulnerable path is reachable from cedarpy's API — both alerts had been triaged and dismissed as unreachable — so this is defense-in-depth. No source changes were required; unit, integration, 60,800-case corpus, and benchmark suites pass unchanged (#115). Thanks @​swenger!
  • Updated anyhow 1.0.95 → 1.0.104, clearing the RUSTSEC-2026-0190 unsoundness warning in Error::downcast_mut (fixed upstream in 1.0.103).
Commits
  • be3ff53 Merge pull request #117 from k9securityio/release/4.12.0
  • 2982cf0 release: bump version to 4.12.0
  • d0d2329 Merge pull request #116 from k9securityio/docs/experimental-partial-eval-marker
  • 5b31129 docs: mark is_authorized_partial as an experimental upstream feature
  • 83952be Merge pull request #115 from swenger/swenger-pyo3
  • d02cb88 docs: add CHANGELOG entry for the pyo3 0.29.2 security update
  • 81d4a36 Merge pull request #108 from h0rv/feat/pst-json
  • 56bfab3 docs: changelog accuracy and clarity pass
  • 750095b feat: cap expression nesting at 100 levels in pst conversion
  • 6448327 docs: propagate the syntax-changes wording to the pst guide
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [cedarpy](https://github.com/k9securityio/cedar-py) from 4.8.7 to 4.12.0.
- [Release notes](https://github.com/k9securityio/cedar-py/releases)
- [Changelog](https://github.com/k9securityio/cedar-py/blob/main/CHANGELOG.md)
- [Commits](k9securityio/cedar-py@v4.8.7...v4.12.0)

---
updated-dependencies:
- dependency-name: cedarpy
  dependency-version: 4.12.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file python Pull requests that update python code labels Sep 21, 2026
@dependabot
dependabot Bot requested review from a team and carloshvp as code owners September 21, 2026 10:55
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file python Pull requests that update python code labels Sep 21, 2026

@imran-siddique imran-siddique left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Reviewed the bounded dependency update and passing CI. The updated dependency is exercised by the existing workflow.

@imran-siddique
imran-siddique merged commit 081d89c into main Sep 22, 2026
20 of 21 checks passed
@imran-siddique
imran-siddique deleted the dependabot/pip/cedarpy-4.12.0 branch September 22, 2026 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file python Pull requests that update python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant