Skip to content
Snippets Groups Projects
Commit a17be5e7 authored by P1375's avatar P1375
Browse files

Merge branch 'npm-audit' into 'master'

Npm audit

See merge request !17
parents cef7c3e5 4ad4d766
No related branches found
No related tags found
1 merge request!17Npm audit
Pipeline #283530 passed
...@@ -5,6 +5,9 @@ ENV NODE_ENV=production ...@@ -5,6 +5,9 @@ ENV NODE_ENV=production
RUN useradd nodeuser -m -d /usr/src/app RUN useradd nodeuser -m -d /usr/src/app
USER nodeuser USER nodeuser
# Allow nodeuser to run npm install globally
ENV NPM_CONFIG_PREFIX=/usr/src/app/.npm-global
# Create app directory # Create app directory
WORKDIR /usr/src/app WORKDIR /usr/src/app
...@@ -17,9 +20,6 @@ RUN npm install ...@@ -17,9 +20,6 @@ RUN npm install
# If you are building your code for production # If you are building your code for production
# RUN npm ci --only=production # RUN npm ci --only=production
# Check vulnerabilities
RUN npm install npm-audit-html
# Bundle app source # Bundle app source
COPY . . 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 @@ ...@@ -30,6 +30,7 @@
"mongoose": "4.6.4", "mongoose": "4.6.4",
"mongoose-unique-validator": "1.0.2", "mongoose-unique-validator": "1.0.2",
"morgan": "1.7.0", "morgan": "1.7.0",
"npm-audit-html": "^1.5.0",
"passport": "0.3.2", "passport": "0.3.2",
"passport-local": "1.0.0", "passport-local": "1.0.0",
"request": "2.69.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