Web Application Security

Website security must be thought about while building every level of the web stack. However, this section includes topics that deserve particular treatment, such as cross-site scripting (XSS), SQL injection, cross-site request forgery and usage of public-private keypairs.

Security open source projects

  • Bro is a network security and traffic monitor.

  • quick NIX secure script for securing Linux distributions.

  • lynis is a really cool security audit tool that can be run as a shell script on a Linux system to find out its vulnerabilities so that you can fix them instead of allowing them to be exploited by malicious actors.

HTTPS resources

General security resources

Web security learning checklist

  1. Read and understand the major web application security flaws that are commonly exploited by malicious actors. These include cross-site request forgery (CSRF), cross-site scripting (XSS), SQL injection and session hijacking. The OWASP top 10 web application vulnerabilities list is a great place to get an overview of these topics.

  2. Determine how the framework you've chosen mitigates these vulnerabilities.

  3. Ensure your code implements the mitigation techniques for your framework.

  4. Think like an attacker and actively work to break into your own system. If you do not have enough experience to confidently break the security consider hiring a known white hat attacker. Have her break the application's security, report the easiest vulnerabilities to exploit in your app and help implement protections against those weaknesses.

  5. Recognize that no system is ever totally secure. However, the more popular an application becomes the more attractive a target it is to attackers. Reevaluate your web application security on a frequent basis.

What web development topic do you want to learn about next?

I want to learn more about app users via web analytics.

How do I integrate existing web APIs into my application?

How do I log errors that occur in my application?

Sign up for a monthly email with Full Stack Python tutorials. No spam ever.

Sponsored By

Digital Ocean logo.

Easily deploy your Python web apps to Digital Ocean's reliable cloud computing platform.

Okta logo.

Secure and manage identities in your Python web apps with Okta.

Mapbox logo.

Easily build maps, search and navigation into your Python applications with Mapbox.

Scout logo

Scout monitors the performance of your Python apps, identifying slow queries, memory bloat, and more. Free during Tech Preview.

Real Python logo

Upgrade your Python skills by reading Real Python's awesome programming email newsletter.

Full Stack Python

Full Stack Python is an open book that explains concepts in plain language and provides helpful resources for those topics.
Updates via newsletter, Twitter & Facebook.

Matt Makai 2012-2018