-
Notifications
You must be signed in to change notification settings - Fork 782
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
Update documentation related to SQL injection with raw queries #5735
Conversation
@joshbouncesecurity is attempting to deploy a commit to the Prisma Team on Vercel. A member of the Team first needs to authorize it. |
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.
Thank you very much @joshbouncesecurity !
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
see internal Slack discussion: https://prisma-company.slack.com/archives/C058VM009HT/p1710493203426249
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.
Few notes from our internal review. Thank you again @joshbouncesecurity
content/200-orm/200-prisma-client/100-queries/090-raw-database-access/050-raw-queries.mdx
Outdated
Show resolved
Hide resolved
content/200-orm/200-prisma-client/100-queries/090-raw-database-access/050-raw-queries.mdx
Outdated
Show resolved
Hide resolved
content/200-orm/200-prisma-client/100-queries/090-raw-database-access/050-raw-queries.mdx
Outdated
Show resolved
Hide resolved
content/200-orm/200-prisma-client/100-queries/090-raw-database-access/050-raw-queries.mdx
Outdated
Show resolved
Hide resolved
content/200-orm/200-prisma-client/100-queries/090-raw-database-access/050-raw-queries.mdx
Outdated
Show resolved
Hide resolved
content/200-orm/200-prisma-client/100-queries/090-raw-database-access/050-raw-queries.mdx
Outdated
Show resolved
Hide resolved
content/200-orm/200-prisma-client/100-queries/090-raw-database-access/050-raw-queries.mdx
Outdated
Show resolved
Hide resolved
content/200-orm/200-prisma-client/100-queries/090-raw-database-access/050-raw-queries.mdx
Outdated
Show resolved
Hide resolved
Co-authored-by: Jon Harrell <[email protected]>
content/200-orm/200-prisma-client/100-queries/090-raw-database-access/050-raw-queries.mdx
Outdated
Show resolved
Hide resolved
content/200-orm/200-prisma-client/100-queries/090-raw-database-access/050-raw-queries.mdx
Outdated
Show resolved
Hide resolved
content/200-orm/200-prisma-client/100-queries/090-raw-database-access/050-raw-queries.mdx
Outdated
Show resolved
Hide resolved
content/200-orm/200-prisma-client/100-queries/090-raw-database-access/050-raw-queries.mdx
Outdated
Show resolved
Hide resolved
content/200-orm/200-prisma-client/100-queries/090-raw-database-access/050-raw-queries.mdx
Outdated
Show resolved
Hide resolved
content/200-orm/200-prisma-client/100-queries/090-raw-database-access/050-raw-queries.mdx
Outdated
Show resolved
Hide resolved
content/200-orm/200-prisma-client/100-queries/090-raw-database-access/050-raw-queries.mdx
Outdated
Show resolved
Hide resolved
content/200-orm/200-prisma-client/100-queries/090-raw-database-access/050-raw-queries.mdx
Outdated
Show resolved
Hide resolved
content/200-orm/200-prisma-client/100-queries/090-raw-database-access/050-raw-queries.mdx
Outdated
Show resolved
Hide resolved
content/200-orm/200-prisma-client/100-queries/090-raw-database-access/050-raw-queries.mdx
Show resolved
Hide resolved
Co-authored-by: Jan Piotrowski <[email protected]>
Hi @janpio I think I handled all your comments except this one which I think is better not changed. You can see the specific updates here: |
content/200-orm/200-prisma-client/100-queries/090-raw-database-access/050-raw-queries.mdx
Outdated
Show resolved
Hide resolved
content/200-orm/200-prisma-client/100-queries/090-raw-database-access/050-raw-queries.mdx
Outdated
Show resolved
Hide resolved
Co-authored-by: Jan Piotrowski <[email protected]>
Thank you again for all your help @joshbouncesecurity ! We really appreciate you working with us and a special thanks for your contribution 🙂 |
You're welcome, I always like to see more detailed security documentation :) |
Describe this PR
See discussion here;
https://discord.com/channels/937751382725886062/1218200207884288071
Basically, the docs make it seem like
queryRaw
andexecuteRaw
are safe from SQL injection when it fact is possible to use them unsafely as well.I have prepared an update to the documentation to reflect this.
Changes
queryRaw
andexecuteRaw
are used safely in a simple case.queryRaw
andexecuteRaw
can also be used unsafely.queryRaw
andexecuteRaw
can be used safely in more complicated cases as well.What issue does this fix?
N/A
Any other relevant information
I deliberately tried to make all examples compatible with the Prisma playground so you can verify them.