fix(security): reconcile tenant-scoped admin deletion on current main - #436
fix(security): reconcile tenant-scoped admin deletion on current main#436seonghobae wants to merge 6 commits into
Conversation
|
Warning Review limit reached
Next review available in: 118 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: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
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 |
|
Exact-current-head review request for @opencode-agent review |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
echo '== Repository state =='
git rev-parse HEAD
git status --short
git merge-base 3187b9b5b1a2c9a8c9f9b27fbaee5808721daaef 961f44a19c4ced87f8062b3ab9842a9a08d05235
git diff --stat 961f44a19c4ced87f8062b3ab9842a9a08d05235 3187b9b5b1a2c9a8c9f9b27fbaee5808721daaef
git diff --name-status 961f44a19c4ced87f8062b3ab9842a9a08d05235 3187b9b5b1a2c9a8c9f9b27fbaee5808721daaef
git diff --find-renames --find-copies --unified=80 \
961f44a19c4ced87f8062b3ab9842a9a08d05235 \
3187b9b5b1a2c9a8c9f9b27fbaee5808721daaef
echo '== Pull request metadata and checks =='
gh pr view 436 --repo ContextualWisdomLab/clearfolio \
--json number,state,isDraft,mergeable,headRefOid,baseRefOid,reviewDecision,statusCheckRollup,reviews \
--jq '{number,state,isDraft,mergeable,headRefOid,baseRefOid,reviewDecision,statusCheckRollup:[.statusCheckRollup[]|{name,conclusion,status}],reviews:[.reviews[]|{author:.author.login,state,commit:.commit.oid}]}'
echo '== Review threads =='
gh api graphql -F owner='ContextualWisdomLab' -F name='clearfolio' -F number=436 -f query='
query($owner: String!, $name: String!, $number: Int!) {
repository(owner: $owner, name: $name) {
pullRequest(number: $number) {
reviewThreads(first: 100) {
nodes { isResolved isOutdated comments(first: 10) { nodes { author { login } body path line originalLine } } }
}
}
}
}' --jq '[.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved == false)]'Length of output: 20404 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo '== Candidate source files =='
fd -t f -e java . src | rg '/(DocumentConversionService|TenantAccessService|TenantContext|ApiExceptionHandler|AdminController)\.java$'
echo '== Relevant declarations =='
ast-grep outline src/main/java --items all --type class,interface,method \
--match 'DocumentConversionService|TenantAccessService|TenantContext|ApiExceptionHandler|AdminController|deleteJob|require'
echo '== Tenant-scoped deletion declarations and calls =='
rg -n -C 5 --glob '*.java' \
'\bdeleteJob\s*\(\s*[^,\)]*,\s*(?:context|[A-Za-z][A-Za-z0-9_]*Context)\s*\)|\bdeleteJob\s*\(\s*[^,\)]*,\s*TenantContext\b' \
src
echo '== Administrative-controller construction sites =='
rg -n -C 4 --glob '*.java' \
'\bnew\s+AdminController\s*\(' \
src
echo '== Tenant authorization and exception mapping =='
for f in \
"$(fd -t f 'TenantAccessService.java' src/main/java -1)" \
"$(fd -t f 'TenantContext.java' src/main/java -1)" \
"$(fd -t f 'ApiExceptionHandler.java' src/main/java -1)" \
"$(fd -t f 'DocumentConversionService.java' src/main/java -1)"
do
if [ -n "$f" ]; then
echo "----- $f -----"
cat -n "$f"
fi
doneLength of output: 52492 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo '== Repository contracts and implementations =='
fd -t f -e java . src/main/java | rg '/.*(?:ConversionJobRepository|.*ConversionJob.*Repository|.*Job.*Store)\.java$'
rg -n -C 8 --glob '*.java' \
'\b(findByTenantAndId|deleteById|belongsToTenant)\s*\(' \
src/main/java
echo '== Service contract =='
service_file="$(fd -t f 'DocumentConversionService.java' src/main/java -1)"
cat -n "$service_file"
echo '== Deletion-related tests =='
rg -n -C 6 --glob '*Test.java' \
'\b(deleteJob|findByTenantAndId|belongsToTenant|tenant.*delete|delete.*tenant)\b' \
src/test
echo '== Spring application and controller bean wiring =='
fd -t f -e java . src/main/java | rg '/.*(?:Application|Configuration|Config)\.java$' | while IFS= read -r f; do
echo "----- $f -----"
ast-grep outline "$f" --items all --type class,method
rg -n -C 4 --glob '*.java' \
'\bAdminController\s*\(|\bTenantAccessService\s*\(' "$f" || true
doneLength of output: 78980
I found no blocking issues in the three-file change.
The PR is mergeable. The reported CI, security, SAST, fuzz, and review checks are successful. No unresolved review threads exist. This review is read-only. I did not modify the branch or approve the pull request. Independent approval remains required. You are interacting with an AI system. |
|
Superseded by #440. The canonical auth/RBAC contract defines Keeping this narrower branch open would create a competing permission contract and overlapping |
Current-main replacement for #341. Exact head 3187b9b preserves the three-file tenant-scoped administrative deletion delta on protected main 961f44a. Regenerate all exact-head CI, security, SAST, fuzz, review, and independent approval evidence before merge.