fix(registry): validate content URL schemes#2105
Conversation
|
Warning Review limit reached
More reviews will be available in 14 minutes and 14 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more credits in the billing tab to continue. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 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 |
|
Important Gittensory found maintainer review notesPublic GitHub metadata was checked for review readiness. Gittensor-specific context appears only when confirmed. Readiness score: 93/100
Signal definitions
Review context
Maintainer notes
Contributor next steps
Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers. Learn more about Gittensor contribution workflows. |
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
🔍 Maintainer advisory reviewReviewed 2 changed file(s) — two independent AI reviewers. This is an advisory review — it does not merge or close the PR. Suggested action: 🛠️ Request changes. (reviewers split: request changes / merge) Address the items below before merging. Reviewer A · Suggestions
Worth double-checking
Reviewer B · Suggestions
Worth double-checking
|
Motivation
href/window.open) with unsafe schemes likejavascript:ordata:./downloads/while rejecting unsafe download schemes.Description
validateEntry(packages/registry/src/content-schema.js) by introducingHTTPS_URL_FIELDSand checkingisHttpsUrlfor each field.HTTPS_URL_LIST_FIELDS) usinginvalidHttpsUrlListItemsto ensure each item is an HTTPS URL.isSafeDownloadUrlto accept safe/downloads/paths (with simple sanity checks) while requiring HTTPS for remote download URLs, and validaterepoUrlas HTTPS.documentationUrl,sourceUrl,sourceUrls, anddownloadUrlcases and the allowed/downloads/path intests/content-validation.test.ts.Testing
pnpm exec vitest run tests/content-validation.test.tsand the content validation test suite passed.pnpm validate:content:strictand it completed successfully.pnpm buildwhich completed without errors.git diff --checkto ensure no whitespace/check failures and it reported clean results.Codex Task