Skip to content
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

Merged
merged 12 commits into from
Mar 26, 2024

Conversation

joshbouncesecurity
Copy link
Contributor

Describe this PR

See discussion here;
https://discord.com/channels/937751382725886062/1218200207884288071

Basically, the docs make it seem like queryRaw and executeRaw 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

  • I have moved the "parameterized queries" section into the "SQL Injection" section (only minor changes which you can see in this specific commit: 8575fc5
  • I have made SQL injection a top level section so that I can include navigation within it
  • I have provided example of how queryRaw and executeRaw are used safely in a simple case.
  • I have provided examples of how queryRaw and executeRaw can also be used unsafely.
  • I have provided examples of how queryRaw and executeRaw 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.

Copy link

vercel bot commented Mar 19, 2024

@joshbouncesecurity is attempting to deploy a commit to the Prisma Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Member

@jharrell jharrell left a 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 !

Copy link

vercel bot commented Mar 25, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 26, 2024 3:09pm

Copy link
Contributor

@janpio janpio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@jharrell jharrell left a 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

@joshbouncesecurity joshbouncesecurity marked this pull request as draft March 25, 2024 19:20
@joshbouncesecurity joshbouncesecurity marked this pull request as ready for review March 25, 2024 19:31
@joshbouncesecurity
Copy link
Contributor Author

joshbouncesecurity commented Mar 25, 2024

Thanks @janpio @jharrell I think I have made all the requested changes

@joshbouncesecurity
Copy link
Contributor Author

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:
https://github.com/prisma/docs/pull/5735/files/6edc580fc29fcc95ffee52736cbd36122565dee1..228aa8354ab0112967a2ebb508802085ef2d4164

@jharrell jharrell merged commit 6a868ab into prisma:main Mar 26, 2024
2 of 4 checks passed
@jharrell
Copy link
Member

Thank you again for all your help @joshbouncesecurity ! We really appreciate you working with us and a special thanks for your contribution 🙂

@joshbouncesecurity
Copy link
Contributor Author

You're welcome, I always like to see more detailed security documentation :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants