fix: keep generated browser CI least-privileged - #1759
Conversation
|
Warning Review limit reached
Next review available in: 38 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)
📝 WalkthroughWalkthrough생성된 브라우저 테스트 워크플로에 Changes브라우저 워크플로 최소 권한
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant GeneratedApp as 생성 앱
participant RunValidation as runValidation
participant PolicyValidator as assertGeneratedBrowserWorkflowLeastPrivilege
GeneratedApp->>RunValidation: browserWorkflowPolicy 경로 전달
RunValidation->>PolicyValidator: browser-tests.yml 검증 호출
PolicyValidator->>GeneratedApp: YAML 정책 읽기
PolicyValidator-->>RunValidation: 권한 및 checkout 설정 검증 결과
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: 1
🤖 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 `@scripts/create-croco-app-generated-smoke.mts`:
- Around line 3694-3712: Reject mixed-case actions/checkout references by first
locating checkout steps case-insensitively, then validating the original uses
value begins with the exact case-sensitive actions/checkout@ prefix. Apply this
in scripts/create-croco-app-generated-smoke.mts lines 3694-3712 and
packages/create-croco-app/src/tests/e2e-generation.spec.ts lines 361-372. In
scripts/tests/create-croco-app-generated-smoke.spec.ts lines 97-100, add a
mixed-case fixture retaining persist-credentials: false and assert that the
casing error is rejected.
🪄 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: 35f1fbe3-f37e-468d-a7fc-bc7e8c24248b
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (7)
.changeset/quiet-pandas-read.mdpackages/create-croco-app/package.jsonpackages/create-croco-app/src/tests/e2e-generation.spec.tspackages/create-croco-app/src/tests/templates-build.spec.tspackages/create-croco-app/templates/spa-be-split/.github/workflows/browser-tests.ymlscripts/create-croco-app-generated-smoke.mtsscripts/tests/create-croco-app-generated-smoke.spec.ts
📊 Benchmark Results✅ All benchmarks passed
Updated: 2026-08-05T16:05:01.035Z · Commit: feefb23 |
|
@coderabbitai resolve |
✅ Action performedComments resolved and changes approved. |
Outcome
Generated browser-test workflows now grant the GitHub token only read access to repository contents and disable credential persistence in every checkout step. The generated-app smoke parses the workflow and rejects top-level or job-level permission escalation, persistent checkout credentials, and mixed-case checkout references.
Fixes #1675
Verification
pnpm exec vitest run scripts/tests/create-croco-app-generated-smoke.spec.ts --config vitest.config.ts— 40 passedpnpm --filter create-croco-app test— 140 passedpnpm --filter create-croco-app lint,typecheck, andbuild— passedpnpm package-manifests:check— 115 checked, 0 modifiedpnpm public-api:check— 115 package snapshots matchedpnpm check— 24/25 passed, 1 not applicableReview gates
create-croco-app.Residual risk
None identified within the issue scope.
Summary by CodeRabbit
보안 개선
품질 개선