-
Notifications
You must be signed in to change notification settings - Fork 410
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
check for frame ip safety #1036
check for frame ip safety #1036
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
✅ Heimdall Review Status
|
b04fd42
to
702d366
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
really nice 👏
} | ||
|
||
if (!allSafe) { | ||
return NextResponse.json({ message: 'Forbidden: Unsafe IP' }, { status: 403 }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: not 100% sure we want to expose this error msg to the client since it could reveal part of our mitigation strategy to a malicious actor, maybe some more generic "bad request" response is better?
* check for ip safety * add jest * add gh workflow * middleware->frame calls with dns lookup
https://linear.app/coinbase/issue/BAPP-653/create-blocklist-of-ips-we-should-not-resolve-dns-for-in-basenames
logic:
apps/web/src/middleware/ipSafe.ts
called via a wrapper on frames.js's default route handlers:
apps/web/app/frames/route.tsx