Skip to content
Snippets Groups Projects
Commit 9fa5ac38 authored by Jukka Veijanen's avatar Jukka Veijanen
Browse files

Implement audit report creation and audit fix

parent cef7c3e5
No related branches found
No related tags found
1 merge request!17Npm audit
......@@ -3,8 +3,12 @@ FROM node:12
ENV NODE_ENV=production
RUN useradd nodeuser -m -d /usr/src/app
USER nodeuser
# Allow nodeuser to run npm install globally
ENV NPM_CONFIG_PREFIX=/usr/src/app/.npm-global
# Create app directory
WORKDIR /usr/src/app
......@@ -18,7 +22,6 @@ RUN npm install
# RUN npm ci --only=production
# Check vulnerabilities
RUN npm install npm-audit-html
# Bundle app source
COPY . .
......
#!/bin/bash
npm audit fix
\ No newline at end of file
#!/bin/bash
npm audit --json | node_modules/npm-audit-html/index.js --output audit-report.html
......@@ -30,6 +30,7 @@
"mongoose": "4.6.4",
"mongoose-unique-validator": "1.0.2",
"morgan": "1.7.0",
"npm-audit-html": "^1.5.0",
"passport": "0.3.2",
"passport-local": "1.0.0",
"request": "2.69.0",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment