Fixes star history - #3152
Conversation
This new provider requires no token
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe README Star History embed now uses ChangesStar History embed
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ 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 |
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 `@README.md`:
- Around line 201-205: Update the CSP image-source allowlist in the security
headers configuration to permit https://star-history.dera.page, and update the
security headers test to assert this origin is allowed. Remove
https://api.star-history.com only if no remaining page uses it.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 540760b2-5edb-4b00-be33-6ed0df94fbf3
📒 Files selected for processing (1)
README.md
| <a href="https://star-history.dera.page/#npmx-dev/npmx.dev&type=date&legend=top-left"> | ||
| <picture> | ||
| <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/chart?repos=npmx-dev/npmx.dev&type=date&theme=dark&legend=top-left&sealed_token=1RI8ZdgQL3NncQeMm3sTwgYPL_7_ELdIGe5yiswir2iZipZwBtsYd4Y6zkO2fZLUP3wRcDN38GLKA4B1b3JE3pxEg7x_w8uOivwT3rL8Jcr-866HKSRMpjqmEwPavKp57ZdTyo04KHRbKthXVe360AJhcjmbXWxKVO9EDFh995ssNIH32hNArVB4MwAm" /> | ||
| <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/chart?repos=npmx-dev/npmx.dev&type=date&legend=top-left&sealed_token=1RI8ZdgQL3NncQeMm3sTwgYPL_7_ELdIGe5yiswir2iZipZwBtsYd4Y6zkO2fZLUP3wRcDN38GLKA4B1b3JE3pxEg7x_w8uOivwT3rL8Jcr-866HKSRMpjqmEwPavKp57ZdTyo04KHRbKthXVe360AJhcjmbXWxKVO9EDFh995ssNIH32hNArVB4MwAm" /> | ||
| <img alt="Star History Chart" src="https://api.star-history.com/chart?repos=npmx-dev/npmx.dev&type=date&legend=top-left&sealed_token=1RI8ZdgQL3NncQeMm3sTwgYPL_7_ELdIGe5yiswir2iZipZwBtsYd4Y6zkO2fZLUP3wRcDN38GLKA4B1b3JE3pxEg7x_w8uOivwT3rL8Jcr-866HKSRMpjqmEwPavKp57ZdTyo04KHRbKthXVe360AJhcjmbXWxKVO9EDFh995ssNIH32hNArVB4MwAm" /> | ||
| <source media="(prefers-color-scheme: dark)" srcset="https://star-history.dera.page/svg?repos=npmx-dev/npmx.dev&type=date&theme=dark&legend=top-left" /> | ||
| <source media="(prefers-color-scheme: light)" srcset="https://star-history.dera.page/svg?repos=npmx-dev/npmx.dev&type=date&legend=top-left" /> | ||
| <img alt="Star History Chart" src="https://star-history.dera.page/svg?repos=npmx-dev/npmx.dev&type=date&legend=top-left" /> |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Allow the new image origin in the page CSP before merging.
The <picture> sources and fallback <img> now request https://star-history.dera.page. modules/security-headers.ts:36-47 only lists https://api.star-history.com in img-src, so the rendered page can block the new chart images.
Add the new origin to the CSP allowlist. Update test/e2e/security-headers.spec.ts:3-22 to assert the new origin. Retain the legacy origin only if another page still uses it.
Suggested follow-up
const cspOnlyImgOrigins = [
'https://api.star-history.com',
+ 'https://star-history.dera.page',
]
-expect(cspContent).toContain('https://api.star-history.com')
+expect(cspContent).toContain('https://star-history.dera.page')🤖 Prompt for 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.
In `@README.md` around lines 201 - 205, Update the CSP image-source allowlist in
the security headers configuration to permit https://star-history.dera.page, and
update the security headers test to assert this origin is allowed. Remove
https://api.star-history.com only if no remaining page uses it.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This new provider requires no token
🔗 Linked issue
Fixes #3042
🧭 Context
📚 Description