Note
Reviews paused
It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.
Use the following commands to manage reviews:
@coderabbitai resumeto resume automatic reviews.@coderabbitai reviewto trigger a single review.
Use the checkboxes below for quick actions:
- โถ๏ธ Resume reviews
- ๐ Trigger review
No actionable comments were generated in the recent review. ๐
โน๏ธ Recent review info
โ๏ธ Run configuration
- Configuration used: Organization UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
a4229836-b1e0-4f85-8c64-ec5a39601423
๐ฅ Commits
Reviewing files that changed from the base of the PR and between b19467ca14c304808b4d0c8e7cc13dacedd87e8e and fa3bd881e3699fc3dcb77eb4488be018e262a2fa.
๐ Files selected for processing (3)
core/crates/ployz-store/src/review/mod.rscore/crates/ployz-store/src/review/sealed.rscore/crates/ployz-store/tests/review.rs
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
๐ Summary
Summary by CodeRabbit
- Security
- Sealing a variable removes its earlier plaintext values from History; those older versions appear as Sealed.
- Rotating a sealed value replaces its older ciphertext in History with the current sealed value.
- Bug Fixes
- Deployments already queued continue using the value from the revision they were admitted with.
- Retrying a deployment from an older revision uses the sealed value, not its former value.
- Unrelated plaintext values remain visible in History.
- Documentation
- Updated the variable-sealing instructions to explain the History and deployment behavior.
Publishing a revision with sealed variables now updates matching values in eligible earlier Saved revisions. Revisions associated with in-flight deployments are skipped. Saving a deployment also triggers scrubbing when it is no longer in flight.
Changes: Sealed variable history
Layer / File(s) Summary Scrub earlier Saved revisions
core/crates/ployz-store/src/review/mod.rs,core/crates/ployz-store/src/review/sealed.rs,core/crates/ployz-store/src/deployment/mod.rsAfter inserting a revision, publishcallsscrub_sealed. The helper updates matching sealed values or removes earlier values recorded as ever sealed. It skips revisions used by in-flight deployments. Saving a deployment calls the helper when the deployment is no longer in flight.Verify history and deployment behavior
core/crates/ployz-store/tests/review.rs,docs/user/services/variables.mdTests cover plaintext and ciphertext scrubbing, unrelated plaintext, renamed and deleted values, deployment execution, and pending or expired leases. Documentation describes how older values appear in History and how retries use sealed values. Priority: โ Normal
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Bug fix ยท Unblocks: 3 PRs
Sequence Diagram(s)
mermaid1 sequenceDiagram 2 participant Publisher 3 participant ReviewPublish 4 participant ScrubSealed 5 participant SavedRevisions 6 Publisher->>ReviewPublish: publish a revision 7 ReviewPublish->>SavedRevisions: insert the new revision 8 ReviewPublish->>ScrubSealed: scrub earlier revisions 9 ScrubSealed->>SavedRevisions: update eligible earlier revisions - Security
Merge Risk: ๐ก Moderate ยท up to fa3bd
Earlier plaintext can remain visible in History after a deployment ends. Cover both lifecycle transitions and the unset-then-readd case before merging.
Security architecture risk: ๐ก Moderate ยท up to fa3bd
Removing historical secret values improves confidentiality, but retries of older deployments can now combine previously pinned code with newer secrets. Organization scoping limits exposure, and this behavior is documented, but it creates a security-relevant change in what historical code receives. Some lifecycle sequences also leave earlier plaintext uncleared.
Retained concerns
- Medium ยท security ยท inferred: Rewriting historical saved values changes the secret authority inherited by a retry: previously pinned service code can receive a newer sealed value rather than its original input. Retry remains organization-scoped and refuses when a newer deployment has applied, but it otherwise preserves historical code while loading the mutated revision. This creates a conditional confidentiality risk if that historical code is no longer trusted for the newer credential; unauthorized disclosure was not verified.
Security review details
Security Blast Radius
- inferred โ The demonstrated write scope is earlier saved revisions within one environment, with service identity constraining value matching. The introduced retry exposure concerns secrets delivered to historical versions of those services, not demonstrated cross-organization access. Downstream privileges depend on the credentials themselves and were not established.
Security Findings and Attack Paths
- inferred โ A conditional introduced path is: an older failed, unknown, or cancelled deployment retains pinned code; a later save rewrites its saved variable with a newer secret; an authorized retry reloads that revision for execution. Historical code capable of disclosing its inputs could thereby receive a credential it did not originally receive. This requires an eligible retry and untrusted historical code, neither of which establishes a verified exploit.
- inferred โ Earlier plaintext can also survive when a protected revision leaves flight without cleanup, or when a sealed variable is unset and recreated as plain text before the protected revision is scrubbed. The latter matches the present unsealed variable and skips replacement. These sequences retain plaintext exposure that predates this PR; they limit the new confidentiality guarantee rather than demonstrate a new reader or disclosure boundary.
Trust Boundaries and Controls
- observed โ History resolves projects through the actor's organization, and retries verify source deployment ownership. Retry also rejects a source when a newer deployment has applied. Normal publication performs review approval first; the new scrub is an internal storage operation rather than a new external endpoint.
Resilience and Maintainability Implications
- observed โ Directly replacing an existing secret with text is rejected, and History restoration preserves current sealed values or rejects historically sealed plaintext targets. These controls do not cover unset followed by recreation, and normal terminal cleanup does not cover every direct status transition.
Hardening Proposals
- proposed โ Make changed secret inputs explicit when retrying historical code, or require a fresh deployment when a retry's secret provenance differs from its original inputs. Separately, centralize cleanup eligibility across terminal and recovery transitions and apply historical sealing protection even when the latest matching variable is plain.
Pre-merge checks ยท Passed 5
Passed Passed checks (5 passed)
Check name Status Explanation Docstring Coverage Passed Docstring coverage is 80.95% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 21 functions across 4 files. Linked Issues check Passed Check skipped because no linked issues were found for this pull request. Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request. Title check Passed The title clearly and concisely describes the main change: sealing a variable removes its earlier values from History. Description check Passed The description directly explains the sealing behavior, deployment exception, idempotence, tests, and documentation changes.
โจ Finishing Touches ๐ก 1
-
๐ ๏ธ Fix failing CI checks ๐ก
- Commit to this branch
- Create a new PR
๐ Generate docstrings
- Commit to this branch
- Create a new PR
๐งช Generate unit tests (beta)
- Commit to this branch
- Create a new PR
- Autofix ยท Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.