Skip to content

fix : reject path traversal patterns in isValidGitScope#2475

Open
tmdeveloper007 wants to merge 3 commits into
nisshchayarathi:mainfrom
tmdeveloper007:fix/2503-isValidGitScope-path-traversal
Open

fix : reject path traversal patterns in isValidGitScope#2475
tmdeveloper007 wants to merge 3 commits into
nisshchayarathi:mainfrom
tmdeveloper007:fix/2503-isValidGitScope-path-traversal

Conversation

@tmdeveloper007

Copy link
Copy Markdown
Contributor

Summary

The isValidGitScope function in lib/utils/validators.ts uses the regex /^[a-zA-Z0-9_.\//\-]+$/ which allows .. patterns. An attacker could potentially pass a scope containing path traversal sequences.

Changes

  • lib/utils/validators.ts: Added check if (value.includes("..")) return false; before the regex test

Closes #2471

@vercel

vercel Bot commented Jun 23, 2026

Copy link
Copy Markdown

@tmdeveloper007 is attempting to deploy a commit to the Nisshchaya's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@tmdeveloper007, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 35 minutes and 38 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses rolling per-developer review limits. Reviews become available again as older review attempts age out of the rolling limit window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 815f7227-a752-4a77-94e4-5ad3ae40cddd

📥 Commits

Reviewing files that changed from the base of the PR and between cd4e69b and f61bcff.

📒 Files selected for processing (3)
  • app/api/analysis-jobs/[id]/route.ts
  • app/api/repositories/[id]/route.ts
  • lib/utils/validators.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the GSSoC'26 Part of GirlScript Summer of Code 2026 label Jun 23, 2026
@github-actions

Copy link
Copy Markdown

🎉 Thanks for your contribution, @tmdeveloper007!

Your PR has passed our automated GSSoC quality checks. Here's a quick summary:

Check Status
PR description ✅ Provided
PR title ✅ Meaningful
Linked issue ✅ Found
Change size ✅ Looks good (9 lines across 3 file(s))

A maintainer will review your PR soon. Please be patient and available for feedback. 💪

GSSoC'26 automation · Maintainer: @nisshchayarathi

@tmdeveloper007

Copy link
Copy Markdown
Contributor Author

CI Status: CodeQL PASSED, Prisma Schema Check PASSED, GSSoC spam check PASSED. Playwright Tests in progress. Test Platform failures are pre-existing upstream TypeScript errors (CodeDependencyGraph.tsx, gitlabService.ts, bitbucketService.ts). Worker Consistency failures are pre-existing upstream issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

GSSoC'26 Part of GirlScript Summer of Code 2026

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Security]: isValidGitScope allows path traversal via .. patterns

1 participant