fix(audit): reject unsafe tenant queries - #89
Open
XnLemon wants to merge 4 commits into
Open
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughEnglish
中文变更概述
兼容性与行为风险
建议验证步骤执行: go test ./platform
go vet ./platform
git diff --check同时确认安全的租户过滤条件查询成功,缺少租户 ID 时仍返回 Walkthrough
ChangesAudit filter validation
Estimated code review effort: 1 (Trivial) | ~5 minutes 中文
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
XnLemon
force-pushed
the
codex/phase2-storage-error-redaction
branch
from
July 11, 2026 13:38
9850d9c to
50d976d
Compare
XnLemon
force-pushed
the
codex/phase2-audit-query-redaction
branch
from
July 11, 2026 13:38
822da9a to
402953b
Compare
XnLemon
changed the base branch from
codex/phase2-storage-error-redaction
to
main
July 13, 2026 02:23
* platform: add multi-tenant contracts * platform/gateway: add text loop * platform/toolpolicy: add governance bridge * platform/channeladapter: add adapter outbox skeleton * platform/gateway: enqueue outbound handoff * platform/storagerouter: add storage routing contracts * platform/gateway: add session lease * platform: add gray routing helpers * platform: add tenant budget helpers * platform: validate storage migration modes * platform: validate audit policies * platform: validate audit records * platform: add capacity estimator * platform/channeladapter: replay dead letters * platform: populate audit record ids * platform: validate audit sink writes * platform: add usage record contracts * platform: add usage sink contracts * platform: add config version contracts * platform: select config version by session gray bucket * platform: add config version lifecycle helpers * platform: add usage summary contracts * platform: add audit query contracts * platform: add config version diff contracts * platform: add config gray status summary * platform: add operational action audit contracts * platform: add config cache invalidation contracts * platform: add secret rotation status contracts * platform: add backend migration status contracts * platform: add storage router status summary * platform: add config operation summary contracts * platform/toolpolicy: add approval summary contract * fix(platform): enforce binding ACL and redact outbox errors * fix(platform): redact gateway audit error reasons * fix(toolpolicy): enforce auditable policy identity * platform: harden identity and idempotency contracts * platform: tighten routing identity contracts * fix(platform): reconcile hardened contracts with gateway * platform: add budget decision audit contracts * platform/gateway: add minimum loop acceptance test * platform/gateway: add outbound dispatch acceptance test * platform/gateway: correlate audit trace ids * platform/gateway: add trace skeleton spans * platform/gateway: enable runner session trace * platform/gateway: add message event trace contract * feat(platform): mark tool call trace spans Adds safe platform tool-call trace contract spans. Independent re-review reported P0/P1 clear; CodeRabbit only reported a trivial test-helper nitpick. * feat(platform): trace memory search spans Adds safe memory search trace spans on the current memory.Reader boundary. Independent review reported P0/P1 clear; local focused validation and build passed. * feat(platform): trace memory write spans Adds safe memory write trace spans for add/update/delete/clear. Independent review reported P0/P1 clear; local focused validation and build passed. * feat(platform): mark summary create trace spans Adds summary-create trace contract markers for Redis/PostgreSQL summary creation spans. Independent review reported P0/P1 clear; local focused validation and build passed. * fix(platform): address CI checks * fix(platform): address CodeRabbit review feedback * fix(platform): bound in-memory sink records --------- Co-authored-by: xnlemon <xianingawa@gmail.com>
XnLemon
force-pushed
the
codex/phase2-audit-query-redaction
branch
from
July 13, 2026 02:34
402953b to
35493a2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Objective
Close a small Phase2 audit-query safety gap by rejecting tenant-scoped audit queries that include unredacted sensitive content in the tenant filter itself.
Changes
AuditQueryFilter.TenantIDafter trimming and before matching records.ErrTenantIDRequired.Validation
go test ./platformgo vet ./platformgit diff --checkKnown Risks / Limitations
Follow-up