-
Notifications
You must be signed in to change notification settings - Fork 2
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
Review security of the Strapi endpoints #7
Comments
So far, I have disabled all update/delete/create routes for all the schemas we added. Some routes added by plugins like the i18n and menus still the have those non-read routes public. But we have disabled access to that through the admin panel (using the Roles and Permissions plugin). Other than the sitemap, all the read routes of the schemas we added also require a API token. Also added a few simple sanitizations to make sure we are exposing any data that we don't want through the API. So, I'd say we are good for the launch. I'll keep exploring to see if we can solidify it more |
Just starting to go through this and these are my primary questions and initial notes. Feel free to add context to it but don't feel like it's required since this is just raw notes as I'm getting started. Are these routes consumed by clients and/or servers?I see an API token in prod labeled "client-token" that is consistently used, however I haven't yet seen a site that made any XHR calls to an API. It may only be a next.js backend fetching this data but will need to confirm. Is any sensitive data stored in this API?Looking at the content-types it looks like it does not. It doesn't look like we have any staged unpublished content that might reveal plans or allow inside information leaks but I suspect it may happen since we did that with Medium posts. Does this API access any sensitive data sources?
Looks like it's primary storage is Sqlite for local dev and Postres for prod. I don't see any references to external databases in the codebase or config. What's the worst case scenario if this API is compromised?External links or impersonation content would make us look pretty bad but maybe not critical to the business. Good chance of an XSS injection but that's likely only through the admin which I think is out of scope for this review. TODO
Will update this post as I go. I'll add new replies if I find anything important or have any questions. |
Thanks for looking into this 🙏🏻
All API are consumed by the Next.js server. We don't make XHR calls directly from client, it's a pass-through (from Client <> Next.js Server <> Strapi server) to not expose the API key on the client side
I'd say we may have to worry a bit more about impersonation of content. Someone can link Story or OUSD to a phishing site or something that can steal funds from their web3 wallet (if they connect it). |
Having trouble understanding their magic route generation. For instance, the origin-cms/src/api/blog/routes/author.js Lines 9 to 11 in 6abf87b
But none of these return:
I got lost in their abstractions in the source on how singular/plural names are defined so that was no help. Though I suspect singular/plural names will equal what's defined in the content-type here: origin-cms/src/api/blog/content-types/author/schema.json Lines 5 to 6 in 6abf87b
Their docs suggest it should just be |
No description provided.
The text was updated successfully, but these errors were encountered: