Skip to content

Commit

Permalink
Merge pull request #171 from ossf/add_sql_injection_lab
Browse files Browse the repository at this point in the history
Add SQL injection lab
  • Loading branch information
david-a-wheeler authored Oct 4, 2024
2 parents 176d6cc + a8ab7c6 commit b3bdbbe
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions secure_software_development_fundamentals.md
Original file line number Diff line number Diff line change
Expand Up @@ -2731,6 +2731,12 @@ Of course, like any technique, if you use it wrongly then it won’t be secure.

This insecure program uses a prepared statement, but instead of correctly using “**?**” as a value placeholder (which will then be properly escaped), this code directly concatenates data into the query. Unless the data is properly escaped (and it almost certainly is not), this code can quickly lead to a serious vulnerability if this data can be controlled by an attacker.

##### Lab: SQL injection

🧪 **Lab: Please try lab [sql-injection](https://best.openssf.org/labs/sql-injection.html), which lets you experiment with how to counter a SQL injection vulnerability.**

*Labs are optional, but you're strongly encouraged to try them!*

#### Examples: Parameterized and Prepared Statements in some Other Languages

Parameterized and prepared statements are widely available, though the
Expand Down

0 comments on commit b3bdbbe

Please sign in to comment.