Coder Social home page Coder Social logo

security_checklist's Introduction

Web Application Security Checklist

Checklist

We have a blog post that goes into more detail about each item on the checklist. Check it here

Objectives

We want to help developers making their web applications more secure. This checklist is supposed to be a brain exercise to ensure that essential controls are not forgotten.

Items on this list are frequently missed and were chosen based on their relevance to the overall security of the application. It's a starting point.

The checklist

General security

  • I use prepared statements in SQL queries
  • I do not concatenate any other input data to SQL queries other than the bound parameters
  • I validate all input data server-side
  • I encode all input data before sending the response to the browser
  • I have disabled directory listing in the web server
  • I include a CSRF token in requests that change state (or I use the SameSite cookie attribute for the session cookie)
  • I do not show errors with stack traces, source code, full paths or any other internal data.
  • I verify the content type of uploaded files and delete the bad ones
  • If I handle XML files, I disabled external entity and DTD processing
  • I use HTTPS and I send the Strict-Transport-Security header
  • I only accept TLS 1.2 or higher
  • I set the Secure, HttpOnly and SameSite=lax attributes in session cookies
  • I set the Secure attribute in all other cookies, and if possible HttpOnly also
  • All 3rd-party JavaScript libraries that my app uses, are updated to the latest version

I have a login feature and cannot use an already existent service:

  • I store passwords using a strong cryptographic function (scrypt, argon2, bcrypt, or PBKDF2)
  • I ask for the current password to set a new password, email or any other information used in the password reset process
  • I only accept passwords longer than 12 chars and reject common passwords (top 1000)
  • I support multi-factor authentication
  • I limit the number of attempts to endpoints such as login, password reset and 2FA validation
  • I use the language libraries to create and validate JSON Web Tokens (JWT)
  • I destroy the session server-side and invalidate the matching JSON Web Token (JWT) when the user logs out
  • I destroy the password reset token after it is used and after a pre-defined time

version 1.1

security_checklist's People

Contributors

nunoloureiro avatar poupas avatar tmendo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

security_checklist's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.