fix(security): enforce headers and safe content links#2119
Conversation
|
Warning Review limit reached
More reviews will be available in 13 minutes and 20 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 (4)
✨ 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 |
|
Note Gittensory Gate skippedPR closed before full evaluation. No late first comment was created.
Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers. |
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
🔍 Maintainer advisory reviewReviewed 4 changed file(s) — two independent AI reviewers. This is an advisory review — it does not merge or close the PR. Suggested action: 🛠️ Request changes. Address the items below before merging. Reviewer A · Suggestions
Worth double-checking
Reviewer B · Suggestions
Worth double-checking
|
Motivation
Description
withSecurityHeadershelper that appliesapplySecurityHeadersto every server response so CSP and other headers are always present (apps/web/src/server.ts).isHttpUrlandisSafeSlughelpers and enforce slug format (lowercase letters, numbers, hyphens only) along with http(s)-only checks for contributor-controlled URL fields andsourceUrlsin the registry validator (packages/registry/src/content-schema.js).tests/crawler-policy.test.tsandtests/content-validation.test.ts).Testing
pnpm exec vitest run tests/content-validation.test.ts tests/crawler-policy.test.tsand all tests passed.pnpm validate:content:strictwhich validated existing content files successfully.pnpm type-check(generate +tsc) which completed without errors.Codex Task