Skip to content

Commit

Permalink
Use latest npm version (#1276)
Browse files Browse the repository at this point in the history
* Use latest npm

* Build

* WORKDIR /

* trivy
  • Loading branch information
nvuillam authored Feb 20, 2022
1 parent bbac3d1 commit cebe7f9
Show file tree
Hide file tree
Showing 18 changed files with 44 additions and 48 deletions.
9 changes: 9 additions & 0 deletions .trivyignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ CVE-2020-14040
CVE-2020-14343
CVE-2020-16250
CVE-2020-28469
CVE-2020-28477
CVE-2020-29529
CVE-2020-29529
CVE-2020-29651
Expand All @@ -15,13 +16,20 @@ CVE-2020-7219
CVE-2020-8558
CVE-2020-9283
CVE-2021-22569
CVE-2021-23337
CVE-2021-23358
CVE-2021-23406
CVE-2021-23436
CVE-2021-23807
CVE-2021-25741
CVE-2021-28918
CVE-2021-29482
CVE-2021-3121
CVE-2021-32803
CVE-2021-32804
CVE-2021-32923
CVE-2021-33503
CVE-2021-3538
CVE-2021-35515
CVE-2021-35516
CVE-2021-35517
Expand All @@ -31,6 +39,7 @@ CVE-2021-36222
CVE-2021-3711
CVE-2021-3712
CVE-2021-37219
CVE-2021-3757
CVE-2021-37701
CVE-2021-37712
CVE-2021-37713
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

Note: Can be used with `megalinter/megalinter@beta` in your GitHub Action mega-linter.yml file, or with `megalinter/megalinter:beta` docker image

- Fixes
- Use latest version of npm

- Linter versions upgrades
- [cpplint](https://github.com/cpplint/cpplint) from 1.5.5 to **1.6.0** on 2022-02-20
<!-- linter-versions-end -->
Expand Down
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ ARG PSSA_VERSION='latest'
# Run APK installs #
####################

WORKDIR /

# APK Packages used by mega-linter core architecture
RUN apk add --update --no-cache \
bash \
Expand Down Expand Up @@ -160,9 +162,6 @@ RUN pip3 install --no-cache-dir --upgrade pip && pip3 install --no-cache-dir --u
#############################################################################################

# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile
RUN npm install npm@latest-6 -g
# Disable package-lock.json to avoid sudden crash. Try to remove later if possible
RUN echo 'package-lock=false' >> .npmrc
ENV NODE_OPTIONS="--max-old-space-size=8192"
#NPM__START
RUN npm install --no-cache --ignore-scripts \
Expand Down
5 changes: 2 additions & 3 deletions flavors/ci_light/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ FROM python:3.9.7-alpine3.13
# Run APK installs #
####################

WORKDIR /

# APK Packages used by mega-linter core architecture
RUN apk add --update --no-cache \
bash \
Expand Down Expand Up @@ -93,9 +95,6 @@ RUN pip3 install --no-cache-dir --upgrade pip && pip3 install --no-cache-dir --u
#############################################################################################

# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile
RUN npm install npm@latest-6 -g
# Disable package-lock.json to avoid sudden crash. Try to remove later if possible
RUN echo 'package-lock=false' >> .npmrc
ENV NODE_OPTIONS="--max-old-space-size=8192"
#NPM__START
RUN npm install --no-cache --ignore-scripts \
Expand Down
5 changes: 2 additions & 3 deletions flavors/dart/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ ARG GLIBC_VERSION='2.31-r0'
# Run APK installs #
####################

WORKDIR /

# APK Packages used by mega-linter core architecture
RUN apk add --update --no-cache \
bash \
Expand Down Expand Up @@ -99,9 +101,6 @@ RUN pip3 install --no-cache-dir --upgrade pip && pip3 install --no-cache-dir --u
#############################################################################################

# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile
RUN npm install npm@latest-6 -g
# Disable package-lock.json to avoid sudden crash. Try to remove later if possible
RUN echo 'package-lock=false' >> .npmrc
ENV NODE_OPTIONS="--max-old-space-size=8192"
#NPM__START
RUN npm install --no-cache --ignore-scripts \
Expand Down
5 changes: 2 additions & 3 deletions flavors/documentation/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ FROM python:3.9.7-alpine3.13
# Run APK installs #
####################

WORKDIR /

# APK Packages used by mega-linter core architecture
RUN apk add --update --no-cache \
bash \
Expand Down Expand Up @@ -98,9 +100,6 @@ RUN pip3 install --no-cache-dir --upgrade pip && pip3 install --no-cache-dir --u
#############################################################################################

# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile
RUN npm install npm@latest-6 -g
# Disable package-lock.json to avoid sudden crash. Try to remove later if possible
RUN echo 'package-lock=false' >> .npmrc
ENV NODE_OPTIONS="--max-old-space-size=8192"
#NPM__START
RUN npm install --no-cache --ignore-scripts \
Expand Down
5 changes: 2 additions & 3 deletions flavors/dotnet/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ ARG PSSA_VERSION='latest'
# Run APK installs #
####################

WORKDIR /

# APK Packages used by mega-linter core architecture
RUN apk add --update --no-cache \
bash \
Expand Down Expand Up @@ -107,9 +109,6 @@ RUN pip3 install --no-cache-dir --upgrade pip && pip3 install --no-cache-dir --u
#############################################################################################

# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile
RUN npm install npm@latest-6 -g
# Disable package-lock.json to avoid sudden crash. Try to remove later if possible
RUN echo 'package-lock=false' >> .npmrc
ENV NODE_OPTIONS="--max-old-space-size=8192"
#NPM__START
RUN npm install --no-cache --ignore-scripts \
Expand Down
5 changes: 2 additions & 3 deletions flavors/go/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ FROM python:3.9.7-alpine3.13
# Run APK installs #
####################

WORKDIR /

# APK Packages used by mega-linter core architecture
RUN apk add --update --no-cache \
bash \
Expand Down Expand Up @@ -99,9 +101,6 @@ RUN pip3 install --no-cache-dir --upgrade pip && pip3 install --no-cache-dir --u
#############################################################################################

# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile
RUN npm install npm@latest-6 -g
# Disable package-lock.json to avoid sudden crash. Try to remove later if possible
RUN echo 'package-lock=false' >> .npmrc
ENV NODE_OPTIONS="--max-old-space-size=8192"
#NPM__START
RUN npm install --no-cache --ignore-scripts \
Expand Down
5 changes: 2 additions & 3 deletions flavors/java/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ FROM python:3.9.7-alpine3.13
# Run APK installs #
####################

WORKDIR /

# APK Packages used by mega-linter core architecture
RUN apk add --update --no-cache \
bash \
Expand Down Expand Up @@ -100,9 +102,6 @@ RUN pip3 install --no-cache-dir --upgrade pip && pip3 install --no-cache-dir --u
#############################################################################################

# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile
RUN npm install npm@latest-6 -g
# Disable package-lock.json to avoid sudden crash. Try to remove later if possible
RUN echo 'package-lock=false' >> .npmrc
ENV NODE_OPTIONS="--max-old-space-size=8192"
#NPM__START
RUN npm install --no-cache --ignore-scripts \
Expand Down
5 changes: 2 additions & 3 deletions flavors/javascript/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ FROM python:3.9.7-alpine3.13
# Run APK installs #
####################

WORKDIR /

# APK Packages used by mega-linter core architecture
RUN apk add --update --no-cache \
bash \
Expand Down Expand Up @@ -98,9 +100,6 @@ RUN pip3 install --no-cache-dir --upgrade pip && pip3 install --no-cache-dir --u
#############################################################################################

# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile
RUN npm install npm@latest-6 -g
# Disable package-lock.json to avoid sudden crash. Try to remove later if possible
RUN echo 'package-lock=false' >> .npmrc
ENV NODE_OPTIONS="--max-old-space-size=8192"
#NPM__START
RUN npm install --no-cache --ignore-scripts \
Expand Down
5 changes: 2 additions & 3 deletions flavors/php/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ FROM python:3.9.7-alpine3.13
# Run APK installs #
####################

WORKDIR /

# APK Packages used by mega-linter core architecture
RUN apk add --update --no-cache \
bash \
Expand Down Expand Up @@ -119,9 +121,6 @@ RUN pip3 install --no-cache-dir --upgrade pip && pip3 install --no-cache-dir --u
#############################################################################################

# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile
RUN npm install npm@latest-6 -g
# Disable package-lock.json to avoid sudden crash. Try to remove later if possible
RUN echo 'package-lock=false' >> .npmrc
ENV NODE_OPTIONS="--max-old-space-size=8192"
#NPM__START
RUN npm install --no-cache --ignore-scripts \
Expand Down
5 changes: 2 additions & 3 deletions flavors/python/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ FROM python:3.9.7-alpine3.13
# Run APK installs #
####################

WORKDIR /

# APK Packages used by mega-linter core architecture
RUN apk add --update --no-cache \
bash \
Expand Down Expand Up @@ -108,9 +110,6 @@ RUN pip3 install --no-cache-dir --upgrade pip && pip3 install --no-cache-dir --u
#############################################################################################

# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile
RUN npm install npm@latest-6 -g
# Disable package-lock.json to avoid sudden crash. Try to remove later if possible
RUN echo 'package-lock=false' >> .npmrc
ENV NODE_OPTIONS="--max-old-space-size=8192"
#NPM__START
RUN npm install --no-cache --ignore-scripts \
Expand Down
5 changes: 2 additions & 3 deletions flavors/ruby/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ FROM python:3.9.7-alpine3.13
# Run APK installs #
####################

WORKDIR /

# APK Packages used by mega-linter core architecture
RUN apk add --update --no-cache \
bash \
Expand Down Expand Up @@ -102,9 +104,6 @@ RUN pip3 install --no-cache-dir --upgrade pip && pip3 install --no-cache-dir --u
#############################################################################################

# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile
RUN npm install npm@latest-6 -g
# Disable package-lock.json to avoid sudden crash. Try to remove later if possible
RUN echo 'package-lock=false' >> .npmrc
ENV NODE_OPTIONS="--max-old-space-size=8192"
#NPM__START
RUN npm install --no-cache --ignore-scripts \
Expand Down
5 changes: 2 additions & 3 deletions flavors/rust/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ FROM python:3.9.7-alpine3.13
# Run APK installs #
####################

WORKDIR /

# APK Packages used by mega-linter core architecture
RUN apk add --update --no-cache \
bash \
Expand Down Expand Up @@ -98,9 +100,6 @@ RUN pip3 install --no-cache-dir --upgrade pip && pip3 install --no-cache-dir --u
#############################################################################################

# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile
RUN npm install npm@latest-6 -g
# Disable package-lock.json to avoid sudden crash. Try to remove later if possible
RUN echo 'package-lock=false' >> .npmrc
ENV NODE_OPTIONS="--max-old-space-size=8192"
#NPM__START
RUN npm install --no-cache --ignore-scripts \
Expand Down
5 changes: 2 additions & 3 deletions flavors/salesforce/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ FROM python:3.9.7-alpine3.13
# Run APK installs #
####################

WORKDIR /

# APK Packages used by mega-linter core architecture
RUN apk add --update --no-cache \
bash \
Expand Down Expand Up @@ -99,9 +101,6 @@ RUN pip3 install --no-cache-dir --upgrade pip && pip3 install --no-cache-dir --u
#############################################################################################

# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile
RUN npm install npm@latest-6 -g
# Disable package-lock.json to avoid sudden crash. Try to remove later if possible
RUN echo 'package-lock=false' >> .npmrc
ENV NODE_OPTIONS="--max-old-space-size=8192"
#NPM__START
RUN npm install --no-cache --ignore-scripts \
Expand Down
5 changes: 2 additions & 3 deletions flavors/scala/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ FROM python:3.9.7-alpine3.13
# Run APK installs #
####################

WORKDIR /

# APK Packages used by mega-linter core architecture
RUN apk add --update --no-cache \
bash \
Expand Down Expand Up @@ -98,9 +100,6 @@ RUN pip3 install --no-cache-dir --upgrade pip && pip3 install --no-cache-dir --u
#############################################################################################

# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile
RUN npm install npm@latest-6 -g
# Disable package-lock.json to avoid sudden crash. Try to remove later if possible
RUN echo 'package-lock=false' >> .npmrc
ENV NODE_OPTIONS="--max-old-space-size=8192"
#NPM__START
RUN npm install --no-cache --ignore-scripts \
Expand Down
5 changes: 2 additions & 3 deletions flavors/swift/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ FROM python:3.9.7-alpine3.13
# Run APK installs #
####################

WORKDIR /

# APK Packages used by mega-linter core architecture
RUN apk add --update --no-cache \
bash \
Expand Down Expand Up @@ -100,9 +102,6 @@ RUN pip3 install --no-cache-dir --upgrade pip && pip3 install --no-cache-dir --u
#############################################################################################

# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile
RUN npm install npm@latest-6 -g
# Disable package-lock.json to avoid sudden crash. Try to remove later if possible
RUN echo 'package-lock=false' >> .npmrc
ENV NODE_OPTIONS="--max-old-space-size=8192"
#NPM__START
RUN npm install --no-cache --ignore-scripts \
Expand Down
5 changes: 2 additions & 3 deletions flavors/terraform/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ FROM python:3.9.7-alpine3.13
# Run APK installs #
####################

WORKDIR /

# APK Packages used by mega-linter core architecture
RUN apk add --update --no-cache \
bash \
Expand Down Expand Up @@ -102,9 +104,6 @@ RUN pip3 install --no-cache-dir --upgrade pip && pip3 install --no-cache-dir --u
#############################################################################################

# Downgrade npm because from npm@v7, npm install crashes when called from root directory within Dockerfile
RUN npm install npm@latest-6 -g
# Disable package-lock.json to avoid sudden crash. Try to remove later if possible
RUN echo 'package-lock=false' >> .npmrc
ENV NODE_OPTIONS="--max-old-space-size=8192"
#NPM__START
RUN npm install --no-cache --ignore-scripts \
Expand Down

0 comments on commit cebe7f9

Please sign in to comment.