Skip to content

Commit

Permalink
Updated Docs, Deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
sns-temp committed Nov 24, 2017
1 parent f0d8c5d commit 6e02881
Show file tree
Hide file tree
Showing 11 changed files with 43 additions and 6 deletions.
9 changes: 7 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
# Damn Vulnerable NodeJS Application

FROM node:carbon
LABEL MAINTAINER "Subash SN"

WORKDIR /app

RUN npm install -g nodemon
COPY . .

RUN chmod +x /app/entrypoint.sh \
&& npm install

CMD npm install ; nodemon
CMD ["bash", "/app/entrypoint.sh"]
11 changes: 11 additions & 0 deletions Dockerfile-dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Damn Vulnerable NodeJS Application
# https://github.com/appsecco/dvna

FROM node:carbon
LABEL MAINTAINER "Subash SN"

WORKDIR /app

RUN npm install -g nodemon

CMD ["/bin/bash", "/app/entrypoint-dev.sh"]
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,14 @@ The application will automatically reload on code changes, so feel free to patch

## TODO

- [ ] Add CONTRIBUTING.md
- [ ] Link commits to fixes in documentation
- [ ] Add new vulnerabilities from OWASP Top 10 2017
- [ ] Improve application features, documentation

## Contributing

In case of bugs in the application, please create an issue on github. Pull requests are hightly welcome!

## Thanks
[Abhisek Datta - abhisek](https://github.com/abhisek) for application architecture and front-end code

Expand Down
5 changes: 3 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
version: "2.1"
services:
app:
build: ./
build:
context: ./
dockerfile: Dockerfile-dev
ports:
- 9090:9090
volumes:
Expand All @@ -12,7 +14,6 @@ services:
- mysql-db
env_file:
- ./vars.env
entrypoint: bash wait-for-it.sh mysql-db:3306 -t 300 -- bash startup.sh

mysql-db:
image: mysql:5.7
Expand Down
6 changes: 5 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,14 @@ The application is powered by commonly used libraries such as [express](https://

It is aimed to be useful for developers with limited development expereience in NodeJS, and the fixes for the vulnerabilities will be available in the [fixes](https://github.com/appsecco/dvna/tree/fixes) branch in the repository.

This guide contains the following:
This guide contains the following

1. Instructions for setting up DVNA
2. Instructions on exploiting the vulnerabilities
3. Vulnerable code snippets and instructions on fixing vulnerabilities
4. Recommendations for avoid such vulnerabilities
5. References for learning more

#### Available on Github <i class="fa fa-github" aria-hidden="true"></i> [https://github.com/appsecco/dvna](https://github.com/appsecco/dvna)

This gitbook was generated from https://github.com/appsecco/dvna/tree/master/docs
2 changes: 2 additions & 0 deletions docs/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Summary

* [Cover](cover.md)

## Introduction

* [Introduction](README.md)
Expand Down
1 change: 1 addition & 0 deletions docs/cover.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
![dvna](resources/cover.png)
Binary file added docs/resources/cover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions entrypoint-dev.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

chmod +x /app/wait-for-it.sh

/bin/bash /app/wait-for-it.sh mysql-db:3306 -t 300 -- bash startup.sh
5 changes: 5 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

chmod +x /app/wait-for-it.sh

/bin/bash /app/wait-for-it.sh $MYSQL_HOST:$MYSQL_PORT -t 300 -- npm start
Empty file modified wait-for-it.sh
100644 → 100755
Empty file.

0 comments on commit 6e02881

Please sign in to comment.