Harden request and release security boundaries - #9
Conversation
|
Warning Review limit reached
Next review available in: 47 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Summary by CodeRabbit
WalkthroughThe release workflow now separates quality checks, building, validation, attestation, and publishing. Runtime changes move validation inside concurrency control, sanitize provider errors, serialize routes individually, and represent untrusted example output safely. ChangesRelease pipeline hardening
Runtime validation and safe output
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@pyproject.toml`:
- Line 2: Update the setuptools pin from 80.9.0 to 83.0.0 in pyproject.toml at
lines 2-2 and requirements/release-build.txt at lines 10-11, and replace the
release-lock hash with
29b23c360f22f414dc7336bb39178cc7bcbf6021ed2733cde173f09dba19abb3.
In `@tests/test_release_contract.py`:
- Around line 45-54: Update
test_release_attestation_privileges_are_isolated_from_project_code to split
attest_job at the publish-to-pypi job boundary, then assert the isolated attest
job contains the required id-token and attestation permissions and
actions/attest invocation. Also assert the publish-to-pypi section declares
needs: attest, while preserving the existing build-job and attest-job checks.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: fc4fea5c-2b75-4980-ab35-57476c2afdc2
📒 Files selected for processing (11)
.github/workflows/release.ymlCHANGELOG.mdSECURITY.mddocs/RELEASING.mdexamples/from_env.pyexamples/responses_api.pypyproject.tomlrequirements/release-build.txttests/test_release_contract.pytests/test_router.pyunified_llm/unified_llm.py
Closes all six validated findings from the standard repository security scan. Moves request materialization behind concurrency control, serializes one route at a time, severs secret-bearing exception chains, safely represents provider text in examples, gates tags to current main, hash-locks the artifact builder, and isolates attestation OIDC permissions. Verified locally with 135 tests at 94.69% coverage, Ruff, strict mypy, release contract tests, and a clean hash-locked no-isolation distribution build.