Coder Social home page Coder Social logo

sonarsource / nodegoat Goto Github PK

View Code? Open in Web Editor NEW

This project forked from owasp/nodegoat

0.0 2.0 2.0 8.71 MB

The OWASP NodeGoat project provides an environment to learn how OWASP Top 10 security risks apply to web applications developed using Node.js and how to effectively address them.

Home Page: https://www.owasp.org/index.php/Projects/OWASP_Node_js_Goat_Project

License: Apache License 2.0

JavaScript 38.61% HTML 61.13% Dockerfile 0.26%

nodegoat's Introduction

NodeGoat

Being lightweight, fast, and scalable, Node.js is becoming a widely adopted platform for developing web applications. This project provides an environment to learn how OWASP Top 10 security risks apply to web applications developed using Node.js and how to effectively address them.

Getting Started

OWASP Top 10 for Node.js web applications:

Know it!

Tutorial Guide explaining how each of the OWASP Top 10 vulnerabilities can manifest in Node.js web apps and how to prevent it.

Do it!

A Vulnerable Node.js App for Ninjas to exploit, toast, and fix. You may like to set up your own copy of the app to fix and test vulnerabilities. Hint: Look for comments in the source code.

Default user accounts

The database comes pre-populated with these user accounts created as part of the seed data -

  • Admin Account - u:admin p:Admin_123
  • User Accounts (u:user1 p:User1_123), (u:user2 p:User2_123)
  • New users can also be added using the sign-up page.

How to Setup Your Copy of NodeGoat

OPTION 1 - One click install on Heroku

The the quickest way to get running with NodeGoat is to click the button below to deploy it on Heroku.

Even though it is not essential, but recommended that you fork this repository and deploy the forked repo. This would allow you to fix vulnerabilities in your own forked version, and deploy and test it on heroku.

Deploy

This Heroku instance uses Free ($0/month) node server and MongoLab add-on.

OPTION 2 - Run NodeGoat on your machine

If you do not wish to run NodeGoat on Heroku, please follow these steps to setup and run it locally -

  • Install Node.js - NodeGoat requires Node v8 or above

  • Clone the github repository

git clone https://github.com/OWASP/NodeGoat.git

*go to the directory

cd NodeGoat
  • Install node modules
npm install
  • Create Mongo DB: You can create a remote MongoDB instance or use local mongod installation

    • A. Using Remote MongoDB
      • Create a sandbox mongoDB instance (free) at mLab
      • Create a new database.
      • Create a user.
      • Update the db property in file config/env/development.js to reflect your DB setup. (in format: mongodb://<username>:<password>@<databasename>)
    • OR B.Using local MongoDB
      • If using local Mongo DB instance, start mongod.
      • Update the db property in file config/env/development.js to reflect your DB setup. (in format: mongodb://localhost:27017/<databasename>)
  • Populate MongoDB with seed data required for the app

    • Run the npm-script below to populate the DB with seed data required for the application. Pass the desired environment as argument. If not passed, "development" is the default:
npm run db:seed
npm start
npm run dev

OPTION 3 - Run NodeGoat on Docker

You need to install docker and docker compose to be able to use this option

The repo includes the Dockerfile and docker-compose.yml necessary to setup the app and the db instance then connect them together.

  • Change the db config in config/env/development.js to point to the respective Docker container.
db: "mongodb://mongo:27017/nodegoat",
  • Build the images:
docker-compose build
  • Run the app:
docker-compose up

Customizing the Default Application Configuration

The default application settings (database url, http port, etc.) can be changed by updating the [config file] (https://github.com/OWASP/NodeGoat/blob/master/config/env/all.js).

Report bugs, Feedback, Comments

  • Open a new issue or contact team by joining chat at Slack or Join the chat at https://gitter.im/OWASP/NodeGoat

Contributing

Please Follow the contributing guide

Code Of Conduct (CoC)

This project is bound by a Code of Conduct.

Contributors

Here are the amazing contributors to the NodeGoat project.

Supports

  • Thanks to JetBrains for providing licenses to fantastic WebStorm IDE to build this project.

License

Code licensed under the Apache License v2.0.

nodegoat's People

Contributors

ahnteve avatar binarymist avatar bizob2828 avatar ckarande avatar diniscruz avatar ilich avatar ingben avatar inosec2 avatar jboyer2012 avatar jesusprubio avatar jksdua avatar joebowbeer avatar karlhorky avatar kevinnz avatar kooltheba avatar lirantal avatar lucas1004jx avatar marcinhoppe avatar mhxbe avatar michaelficarra avatar mostafahussein avatar oleksiireshetnik avatar samanthagroves avatar servatj avatar tehtbl avatar tomtasche avatar ulisesgascon avatar

Watchers

 avatar  avatar

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.