chore(deps-dev): Update cedarpy requirement from <5.0,>=4.0.0 to >=4.12.2,<5.0 in /agent-governance-python/agent-compliance #4599
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.52) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #4599"
general
weight: 0.35
MohammadHaroonAbuomar
Updates the requirements on cedarpy to permit the latest version.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/k9securityio/cedar-py/releases">cedarpy's releases</a>.</em></p>
<blockquote>
<h2>cedarpy v4.12.2</h2>
<h3>Added</h3>
<ul>
<li>
<p>With the new keyword-only <code>release_gil=True</code>, other Python threads run while Cedar validates policies or builds a handle, so <code>asyncio.to_thread</code> keeps an event loop responsive during those calls (<a href="https://redirect.github.com/k9securityio/cedar-py/issues/120">#120</a>). The default, <code>False</code>, holds the GIL for the whole call, as before. These entry points take it:</p>
<ul>
<li><code>validate_policies</code></li>
<li><code>PolicySet.from_str</code>, <code>PolicySet.from_json_str</code> and <code>PolicySet.from_pst</code></li>
<li><code>Schema.from_str</code> and <code>Schema.from_json_str</code></li>
<li><code>Entities.from_json_str</code></li>
</ul>
<p>When another thread is busy, a released call typically waits about <code>sys.getswitchinterval()</code> (5 ms by default) to resume, so releasing pays off for calls that take milliseconds or more. Reading the arguments and building the result still hold the GIL. See the <a href="https://github.com/k9securityio/cedar-py/blob/v4.12.2/docs/guides/threads-and-asyncio-guide.md">Threads and asyncio Guide</a> (<a href="https://redirect.github.com/k9securityio/cedar-py/pull/121">#121</a>). Thanks <a href="https://github.com/kousun12"><code>@kousun12</code></a>!</p>
</li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/k9securityio/cedar-py/compare/v4.12.1...v4.12.2">https://github.com/k9securityio/cedar-py/compare/v4.12.1...v4.12.2</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/k9securityio/cedar-py/blob/main/CHANGELOG.md">cedarpy's changelog</a>.</em></p>
<blockquote>
<h2>[4.12.2] - 2026-10-14</h2>
<h3>Added</h3>
<ul>
<li>
<p>With the new keyword-only <code>release_gil=True</code>, other Python threads run while Cedar validates policies or builds a handle, so <code>asyncio.to_thread</code> keeps an event loop responsive during those calls (<a href="https://redirect.github.com/k9securityio/cedar-py/issues/120">#120</a>). The default, <code>False</code>, holds the GIL for the whole call, as before. These entry points take it:</p>
<ul>
<li><code>validate_policies</code></li>
<li><code>PolicySet.from_str</code>, <code>PolicySet.from_json_str</code> and <code>PolicySet.from_pst</code></li>
<li><code>Schema.from_str</code> and <code>Schema.from_json_str</code></li>
<li><code>Entities.from_json_str</code></li>
</ul>
<p>When another thread is busy, a released call typically waits about <code>sys.getswitchinterval()</code> (5 ms by default) to resume, so releasing pays off for calls that take milliseconds or more. Reading the arguments and building the result still hold the GIL. See the <a href="https://github.com/k9securityio/cedar-py/blob/main/docs/guides/threads-and-asyncio-guide.md">Threads and asyncio Guide</a> (<a href="https://redirect.github.com/k9securityio/cedar-py/pull/121">#121</a>). Thanks <a href="https://github.com/kousun12"><code>@kousun12</code></a>!</p>
</li>
</ul>
<h2>[4.12.1] - 2026-09-23</h2>
<h3>Fixed</h3>
<ul>
<li><code>is_authorized</code> and <code>is_authorized_batch</code> now say why a request could not be built. A <code>context</code> that Cedar rejects (a JSON <code>null</code>, a float, a record that does not match the action's schema) produced the single diagnostic <code>failed to parse schema from request</code>, which hid the cause and named a schema even when none was passed. The diagnostic is now <code>failed to build request: <cause></code>, for example <code>failed to build request: while parsing context, found a
null; JSONnulls are not allowed in Cedar</code>. Diagnostics for a principal, action, or resource that fails to parse, and for entities that fail to parse, carry their cause the same way (<a href="https://redirect.github.com/k9securityio/cedar-py/pull/118">#118</a>). Thanks <a href="https://github.com/david-long1"><code>@david-long1</code></a>!</li></ul>
<h2>[4.12.0] - 2026-09-12</h2>
<h3>Added</h3>
<ul>
<li>
<p><code>policies_to_pst(policies)</code> parses Cedar policy text into typed <code>cedarpy.pst</code> nodes, one frozen dataclass per <code>cedar_policy::pst</code> node kind, so a consumer can pattern-match on real types instead of an untyped tree keyed by string operators (<a href="https://redirect.github.com/k9securityio/cedar-py/issues/107">#107</a>). Each closed set Cedar defines is closed in the Python type, so a <code>match</code> 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 <code>is_authorized_partial</code> cannot be represented this way, because PST validates each clause as it is built and rejects any containing an unresolved <code>unknown(...)</code> node. The node set tracks the engine: syntax not yet modelled by <code>cedarpy.pst</code> raises <code>ValueError</code> rather than building an incomplete tree. See the <a href="https://github.com/k9securityio/cedar-py/blob/main/docs/guides/policy-syntax-tree-guide.md">Policy Syntax Tree Guide</a> for the node types and the guarantees. (<a href="https://redirect.github.com/k9securityio/cedar-py/pull/108">#108</a>). Thanks <a href="https://github.com/h0rv"><code>@h0rv</code></a>!</p>
</li>
<li>
<p><code>PolicySet.from_pst(nodes)</code> and <code>PolicySet.to_pst()</code> are the round trip, so a policy set can be read as nodes, rewritten, and turned back into a handle the engine authorizes against. <code>policies_to_pst(text)</code> is now <code>PolicySet.from_str(text).to_pst()</code>. <code>from_pst</code> raises <code>TypeError</code> for anything that is not a <code>cedarpy.pst</code> node, and <code>ValueError</code> for nodes that do not form a valid set. Expression nesting is limited to 100 levels in both conversion directions; deeper input raises <code>ValueError</code>. Raising this limit later is backwards compatible; lowering it would be breaking.</p>
</li>
<li>
<p><code>pst.entity_uids(node)</code> 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 <code>PolicySet</code>'s <code>templates</code>. Anything it cannot walk raises <code>TypeError</code> rather than returning an empty result, so passing a <code>PolicySet</code> handle by mistake cannot look like "this policy names no entities".</p>
</li>
</ul>
<h3>Changed</h3>
<ul>
<li>
<p>Documented that <code>is_authorized_partial</code> exposes an experimental upstream feature: it is built on the <code>cedar-policy</code> crate's <code>partial-eval</code> 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.</p>
</li>
<li>
<p>Updated the remaining declared Rust dependencies to their latest patch releases: <code>pyo3</code> 0.27.1 → 0.27.2 (crash fix for Rust 1.92+ builds with debug assertions; no API changes), <code>serde</code> 1.0.228 → 1.0.229, and <code>serde_json</code> 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.</p>
</li>
<li>
<p>Removed the unused <code>cedar-policy-cli</code> crate dependency, present since the project's initial scaffold but never referenced from code. Drops 34 transitive crates (<code>clap</code>, <code>miette</code>'s terminal-support stack, <code>rustix</code>, …) from <code>Cargo.lock</code>, shrinking build time, audit surface, and the version-resolution coupling its exact <code>=X.Y.Z</code> pin on <code>cedar-policy</code> imposed. No functional change — <code>cedar-policy-formatter</code> (which backs <code>format_policies</code>) remains.</p>
</li>
<li>
<p><strong>Cedar Policy engine upgraded from v4.8.2 to <a href="https://github.com/cedar-policy/cedar/releases/tag/v4.12.0">v4.12.0</a></strong> (Cedar language version 4.4 → 4.5, adding the extended <code>has</code> operator in JSON policies). No <code>cedarpy</code> API changes: the engine's breaking changes between 4.9 and 4.12 are confined to experimental features <code>cedarpy</code> does not enable (<code>tpe</code>, <code>protobuf</code>, <code>tolerant-ast</code>) and to the then-unused <code>pst</code> module; the <code>partial-eval</code> 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 (<a href="https://redirect.github.com/k9securityio/cedar-py/pull/106">#106</a>). Thanks <a href="https://github.com/h0rv"><code>@h0rv</code></a>!</p>
</li>
</ul>
<h3>Removed</h3>
<ul>
<li><strong>Dropped support for Python 3.9</strong>, which reached end-of-life on 2025-10-31 and no longer receives security fixes. <code>requires-python</code> is now <code>>=3.10</code>, 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.</li>
</ul>
<h3>Security</h3>
<ul>
<li>Updated <code>pyo3</code> 0.27.2 → 0.29.2, fixing <a href="https://github.com/advisories/GHSA-36hh-v3qg-5jq4">GHSA-36hh-v3qg-5jq4</a> (out-of-bounds read in <code>nth</code>/<code>nth_back</code> on <code>PyList</code>/<code>PyTuple</code> iterators) and <a href="https://github.com/advisories/GHSA-chgr-c6px-7xpp">GHSA-chgr-c6px-7xpp</a> (missing <code>Sync</code> bound on <code>PyCFunction::new_closure</code> closures). Neither vulnerable path is reachable from <code>cedarpy</code>'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 (<a href="https://redirect.github.com/k9securityio/cedar-py/pull/115">#115</a>). Thanks <a href="https://github.com/swenger"><code>@swenger</code></a>!</li>
<li>Updated <code>anyhow</code> 1.0.95 → 1.0.104, clearing the <a href="https://rustsec.org/advisories/RUSTSEC-2026-0190">RUSTSEC-2026-0190</a> unsoundness warning in <code>Error::downcast_mut</code> (fixed upstream in 1.0.103).</li>
</ul>
<h2>[4.8.7] - 2026-07-10</h2>
<h3>Added</h3>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/k9securityio/cedar-py/commit/f9a3af1fe49b8ffe6a3764da9ed19bf832227ade"><code>f9a3af1</code></a> Merge pull request <a href="https://redirect.github.com/k9securityio/cedar-py/issues/122">#122</a> from k9securityio/release/4.12.2</li>
<li><a href="https://github.com/k9securityio/cedar-py/commit/fd79b2d190d0b755f3f5cd1b7f6659203d2578a1"><code>fd79b2d</code></a> release: bump version to 4.12.2</li>
<li><a href="https://github.com/k9securityio/cedar-py/commit/5bf4e438622aa3c605295b477069fea9286795d9"><code>5bf4e43</code></a> feat: add opt-in release_gil to validation and handle constructors (<a href="https://redirect.github.com/k9securityio/cedar-py/issues/121">#121</a>)</li>
<li><a href="https://github.com/k9securityio/cedar-py/commit/1a8a2750734119277d44e3d0a65d74263fbd2ab9"><code>1a8a275</code></a> Merge pull request <a href="https://redirect.github.com/k9securityio/cedar-py/issues/119">#119</a> from k9securityio/release/4.12.1</li>
<li><a href="https://github.com/k9securityio/cedar-py/commit/148ecd0ff0b1e7a151053028faddf42b572d6e3c"><code>148ecd0</code></a> release: bump version to 4.12.1</li>
<li><a href="https://github.com/k9securityio/cedar-py/commit/6c6cdbcfdc23c5550ddec2d106dda907811ebf56"><code>6c6cdbc</code></a> Merge pull request <a href="https://redirect.github.com/k9securityio/cedar-py/issues/118">#118</a> from david-long1/fix/request-build-error-chain</li>
<li><a href="https://github.com/k9securityio/cedar-py/commit/a162ae271ae3538463b2324deb577a99f4ff7af2"><code>a162ae2</code></a> docs: credit <a href="https://github.com/david-long1"><code>@david-long1</code></a> in the CHANGELOG entry for <a href="https://redirect.github.com/k9securityio/cedar-py/issues/118">#118</a></li>
<li><a href="https://github.com/k9securityio/cedar-py/commit/ac361240048e82c92195778cb524cf8e6f524555"><code>ac36124</code></a> fix: report the cause when an authorization request cannot be built</li>
<li><a href="https://github.com/k9securityio/cedar-py/commit/dd6861ec96706aea83abc0c12a69cf646c1b9309"><code>dd6861e</code></a> chore(benchmark): move the regression baseline to v4.12.0</li>
<li><a href="https://github.com/k9securityio/cedar-py/commit/3d7b88f599c93d1674991cb837934f076dfea732"><code>3d7b88f</code></a> test(benchmark): capture v4.12.0 into the historical record</li>
<li>Additional commits viewable in <a href="https://github.com/k9securityio/cedar-py/compare/v4.1.0...v4.12.2">compare view</a></li>
</ul>
</details>
<br />
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-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill 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 versionwill 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 dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)</details>