diff --git a/.automation/build.py b/.automation/build.py index 812c5b2d053..a1184dee3ed 100644 --- a/.automation/build.py +++ b/.automation/build.py @@ -473,9 +473,13 @@ def build_dockerfile( + "RUN npm --no-cache install --ignore-scripts --omit=dev \\\n " + " \\\n ".join(list(dict.fromkeys(npm_packages))) + " && \\\n" - + " npm audit fix --audit-level=critical || true \\\n" + # + ' echo "Fixing audit issues with npm..." \\\n' + # + " && npm audit fix --audit-level=critical || true \\\n" # Deactivated for now + + ' echo "Cleaning npm cache..." \\\n' + " && npm cache clean --force || true \\\n" + + ' && echo "Changing owner of node_modules files..." \\\n' + ' && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \\\n' + + ' && echo "Removing extra node_module files..." \\\n' + " && rm -rf /root/.npm/_cacache \\\n" + ' && find . -name "*.d.ts" -delete \\\n' + ' && find . -name "*.map" -delete \\\n' diff --git a/.github/workflows/deploy-ALPHA-flavors.yml b/.github/workflows/deploy-ALPHA-flavors.yml index 35655270517..91c09c24e96 100644 --- a/.github/workflows/deploy-ALPHA-flavors.yml +++ b/.github/workflows/deploy-ALPHA-flavors.yml @@ -130,7 +130,7 @@ jobs: format: 'table' exit-code: '1' ignore-unfixed: true - security-checks: vuln + scanners: vuln vuln-type: 'os,library' severity: 'CRITICAL,HIGH' timeout: 10m0s diff --git a/.github/workflows/deploy-BETA-flavors.yml b/.github/workflows/deploy-BETA-flavors.yml index dddd8b81c57..885f359f550 100644 --- a/.github/workflows/deploy-BETA-flavors.yml +++ b/.github/workflows/deploy-BETA-flavors.yml @@ -44,7 +44,7 @@ jobs: name: Deploy Docker Image - BETA - Flavors # Set the agent to run on runs-on: ${{ matrix.os }} - environment: + environment: name: beta-flavors strategy: fail-fast: false @@ -140,7 +140,7 @@ jobs: format: 'table' exit-code: '1' ignore-unfixed: true - security-checks: vuln + scanners: vuln vuln-type: 'os,library' severity: 'CRITICAL,HIGH' timeout: 10m0s diff --git a/.github/workflows/deploy-BETA-linters.yml b/.github/workflows/deploy-BETA-linters.yml index 4d0dca3922a..3ad86b6ed4d 100644 --- a/.github/workflows/deploy-BETA-linters.yml +++ b/.github/workflows/deploy-BETA-linters.yml @@ -41,7 +41,7 @@ jobs: prepare: name: Prepare matrix - runs-on: ubuntu-latest + runs-on: ubuntu-latest steps: - name: Build unique image name for beta @@ -50,10 +50,10 @@ jobs: - name: Prepare result is ${{ env.UNIQUE_DOCKER_IMAGE_NAME }} shell: bash - run: echo ${{ env.UNIQUE_DOCKER_IMAGE_NAME }} + run: echo ${{ env.UNIQUE_DOCKER_IMAGE_NAME }} outputs: - unique_docker_image_name: "${{ env.UNIQUE_DOCKER_IMAGE_NAME }}" + unique_docker_image_name: "${{ env.UNIQUE_DOCKER_IMAGE_NAME }}" build: needs: prepare @@ -264,7 +264,7 @@ jobs: format: 'table' exit-code: '1' ignore-unfixed: true - security-checks: vuln + scanners: vuln vuln-type: 'os,library' severity: 'CRITICAL,HIGH' timeout: 10m0s diff --git a/.github/workflows/deploy-BETA.yml b/.github/workflows/deploy-BETA.yml index ddcdf54531a..dbe79b5a574 100644 --- a/.github/workflows/deploy-BETA.yml +++ b/.github/workflows/deploy-BETA.yml @@ -45,7 +45,7 @@ jobs: runs-on: ubuntu-latest # Only run this on the main repo if: github.repository == 'oxsecurity/megalinter' && !contains(github.event.head_commit.message, 'skip deploy') - environment: + environment: name: beta ################## # Load all steps # @@ -139,7 +139,7 @@ jobs: # format: 'table' # exit-code: '1' # ignore-unfixed: true -# security-checks: vuln +# scanners: vuln # vuln-type: 'os,library' # severity: 'CRITICAL,HIGH' # timeout: 10m0s diff --git a/.github/workflows/deploy-DEV-linters.yml b/.github/workflows/deploy-DEV-linters.yml index e2a9e6ca876..1e928af5405 100644 --- a/.github/workflows/deploy-DEV-linters.yml +++ b/.github/workflows/deploy-DEV-linters.yml @@ -230,7 +230,7 @@ jobs: TEST_KEYWORDS_TO_USE_UPPER="${{ matrix.linter }}" TEST_KEYWORDS_TO_USE="${TEST_KEYWORDS_TO_USE_UPPER,,}" - + docker run -e TEST_CASE_RUN=true -e OUTPUT_FORMAT=text -e OUTPUT_FOLDER=${{ github.sha }} -e OUTPUT_DETAIL=detailed -e GITHUB_SHA=${{ github.sha }} -e GITHUB_REPOSITORY=${GITHUB_REPOSITORY} -e GITHUB_BRANCH=${GITHUB_BRANCH} -e PAT="${{ secrets.PAT }}" -e TEST_KEYWORDS="${TEST_KEYWORDS_TO_USE}" -e MEGALINTER_VOLUME_ROOT="${GITHUB_WORKSPACE}" -v "/var/run/docker.sock:/var/run/docker.sock:rw" -v ${GITHUB_WORKSPACE}:/tmp/lint oxsecurity/megalinter-only-${{ matrix.linter }}:${{ needs.prepare.outputs.tag }} timeout-minutes: 30 @@ -244,7 +244,7 @@ jobs: format: 'table' exit-code: '1' ignore-unfixed: true - security-checks: vuln + scanners: vuln vuln-type: 'os,library' severity: 'CRITICAL,HIGH' timeout: 10m0s diff --git a/.github/workflows/deploy-DEV.yml b/.github/workflows/deploy-DEV.yml index 0eecdd16823..79dcf4f1f5e 100644 --- a/.github/workflows/deploy-DEV.yml +++ b/.github/workflows/deploy-DEV.yml @@ -269,7 +269,7 @@ jobs: format: 'table' exit-code: '1' ignore-unfixed: true - security-checks: vuln + scanners: vuln vuln-type: 'os,library' severity: 'CRITICAL,HIGH' timeout: 15m0s diff --git a/.github/workflows/deploy-RELEASE-flavors.yml b/.github/workflows/deploy-RELEASE-flavors.yml index 6a8ca82d607..a5f71d475f0 100644 --- a/.github/workflows/deploy-RELEASE-flavors.yml +++ b/.github/workflows/deploy-RELEASE-flavors.yml @@ -34,7 +34,7 @@ jobs: name: Deploy Docker Image - RELEASE - Flavors # Set the agent to run on runs-on: ${{ matrix.os }} - environment: + environment: name: latest-flavors strategy: fail-fast: false @@ -120,7 +120,7 @@ jobs: format: 'table' exit-code: '1' ignore-unfixed: true - security-checks: vuln + scanners: vuln vuln-type: 'os,library' severity: 'CRITICAL,HIGH' timeout: 10m0s diff --git a/.github/workflows/deploy-RELEASE-linters.yml b/.github/workflows/deploy-RELEASE-linters.yml index be499e98ebc..495dbd3310e 100644 --- a/.github/workflows/deploy-RELEASE-linters.yml +++ b/.github/workflows/deploy-RELEASE-linters.yml @@ -238,7 +238,7 @@ jobs: format: 'table' exit-code: '1' ignore-unfixed: true - security-checks: vuln + scanners: vuln vuln-type: 'os,library' severity: 'CRITICAL,HIGH' timeout: 10m0s diff --git a/.trivyignore b/.trivyignore index ca0b068081d..c7e5b04f136 100644 --- a/.trivyignore +++ b/.trivyignore @@ -157,6 +157,7 @@ CVE-2022-42889 CVE-2022-43680 CVE-2022-46175 CVE-2023-0286 +CVE-2023-29017 DS001 DS002 DS003 diff --git a/Dockerfile b/Dockerfile index f8f773cdf40..b224cb6ef40 100644 --- a/Dockerfile +++ b/Dockerfile @@ -241,9 +241,11 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \ prettyjson \ @typescript-eslint/eslint-plugin \ @typescript-eslint/parser && \ - npm audit fix --audit-level=critical || true \ + echo "Cleaning npm cache..." \ && npm cache clean --force || true \ + && echo "Changing owner of node_modules files..." \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ + && echo "Removing extra node_module files..." \ && rm -rf /root/.npm/_cacache \ && find . -name "*.d.ts" -delete \ && find . -name "*.map" -delete \ diff --git a/flavors/ci_light/Dockerfile b/flavors/ci_light/Dockerfile index 8b3e796978c..13fafc4d17f 100644 --- a/flavors/ci_light/Dockerfile +++ b/flavors/ci_light/Dockerfile @@ -115,9 +115,11 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \ secretlint \ @secretlint/secretlint-rule-preset-recommend \ @secretlint/secretlint-formatter-sarif && \ - npm audit fix --audit-level=critical || true \ + echo "Cleaning npm cache..." \ && npm cache clean --force || true \ + && echo "Changing owner of node_modules files..." \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ + && echo "Removing extra node_module files..." \ && rm -rf /root/.npm/_cacache \ && find . -name "*.d.ts" -delete \ && find . -name "*.map" -delete \ diff --git a/flavors/cupcake/Dockerfile b/flavors/cupcake/Dockerfile index a8b17ba261a..c545e4c5e80 100644 --- a/flavors/cupcake/Dockerfile +++ b/flavors/cupcake/Dockerfile @@ -201,9 +201,11 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \ prettyjson \ @typescript-eslint/eslint-plugin \ @typescript-eslint/parser && \ - npm audit fix --audit-level=critical || true \ + echo "Cleaning npm cache..." \ && npm cache clean --force || true \ + && echo "Changing owner of node_modules files..." \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ + && echo "Removing extra node_module files..." \ && rm -rf /root/.npm/_cacache \ && find . -name "*.d.ts" -delete \ && find . -name "*.map" -delete \ diff --git a/flavors/documentation/Dockerfile b/flavors/documentation/Dockerfile index a4e12f9297b..6721d168f6f 100644 --- a/flavors/documentation/Dockerfile +++ b/flavors/documentation/Dockerfile @@ -146,9 +146,11 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \ cspell \ sql-lint \ tekton-lint && \ - npm audit fix --audit-level=critical || true \ + echo "Cleaning npm cache..." \ && npm cache clean --force || true \ + && echo "Changing owner of node_modules files..." \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ + && echo "Removing extra node_module files..." \ && rm -rf /root/.npm/_cacache \ && find . -name "*.d.ts" -delete \ && find . -name "*.map" -delete \ diff --git a/flavors/dotnet/Dockerfile b/flavors/dotnet/Dockerfile index 45ae9669204..a8271da7ad7 100644 --- a/flavors/dotnet/Dockerfile +++ b/flavors/dotnet/Dockerfile @@ -166,9 +166,11 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \ cspell \ sql-lint \ tekton-lint && \ - npm audit fix --audit-level=critical || true \ + echo "Cleaning npm cache..." \ && npm cache clean --force || true \ + && echo "Changing owner of node_modules files..." \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ + && echo "Removing extra node_module files..." \ && rm -rf /root/.npm/_cacache \ && find . -name "*.d.ts" -delete \ && find . -name "*.map" -delete \ diff --git a/flavors/go/Dockerfile b/flavors/go/Dockerfile index a4f02e960be..ed6aa8ce5e9 100644 --- a/flavors/go/Dockerfile +++ b/flavors/go/Dockerfile @@ -153,9 +153,11 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \ cspell \ sql-lint \ tekton-lint && \ - npm audit fix --audit-level=critical || true \ + echo "Cleaning npm cache..." \ && npm cache clean --force || true \ + && echo "Changing owner of node_modules files..." \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ + && echo "Removing extra node_module files..." \ && rm -rf /root/.npm/_cacache \ && find . -name "*.d.ts" -delete \ && find . -name "*.map" -delete \ diff --git a/flavors/java/Dockerfile b/flavors/java/Dockerfile index 763c8657232..0aa3ea7a4a3 100644 --- a/flavors/java/Dockerfile +++ b/flavors/java/Dockerfile @@ -146,9 +146,11 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \ cspell \ sql-lint \ tekton-lint && \ - npm audit fix --audit-level=critical || true \ + echo "Cleaning npm cache..." \ && npm cache clean --force || true \ + && echo "Changing owner of node_modules files..." \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ + && echo "Removing extra node_module files..." \ && rm -rf /root/.npm/_cacache \ && find . -name "*.d.ts" -delete \ && find . -name "*.map" -delete \ diff --git a/flavors/javascript/Dockerfile b/flavors/javascript/Dockerfile index cf54fbc6a9a..ffb2a8a9647 100644 --- a/flavors/javascript/Dockerfile +++ b/flavors/javascript/Dockerfile @@ -166,9 +166,11 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \ prettyjson \ @typescript-eslint/eslint-plugin \ @typescript-eslint/parser && \ - npm audit fix --audit-level=critical || true \ + echo "Cleaning npm cache..." \ && npm cache clean --force || true \ + && echo "Changing owner of node_modules files..." \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ + && echo "Removing extra node_module files..." \ && rm -rf /root/.npm/_cacache \ && find . -name "*.d.ts" -delete \ && find . -name "*.map" -delete \ diff --git a/flavors/php/Dockerfile b/flavors/php/Dockerfile index 16bab34c5ee..519f573159d 100644 --- a/flavors/php/Dockerfile +++ b/flavors/php/Dockerfile @@ -158,9 +158,11 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \ cspell \ sql-lint \ tekton-lint && \ - npm audit fix --audit-level=critical || true \ + echo "Cleaning npm cache..." \ && npm cache clean --force || true \ + && echo "Changing owner of node_modules files..." \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ + && echo "Removing extra node_module files..." \ && rm -rf /root/.npm/_cacache \ && find . -name "*.d.ts" -delete \ && find . -name "*.map" -delete \ diff --git a/flavors/python/Dockerfile b/flavors/python/Dockerfile index 3d8bfe98a85..f11f85bc6ac 100644 --- a/flavors/python/Dockerfile +++ b/flavors/python/Dockerfile @@ -157,9 +157,11 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \ cspell \ sql-lint \ tekton-lint && \ - npm audit fix --audit-level=critical || true \ + echo "Cleaning npm cache..." \ && npm cache clean --force || true \ + && echo "Changing owner of node_modules files..." \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ + && echo "Removing extra node_module files..." \ && rm -rf /root/.npm/_cacache \ && find . -name "*.d.ts" -delete \ && find . -name "*.map" -delete \ diff --git a/flavors/ruby/Dockerfile b/flavors/ruby/Dockerfile index dab6fc26827..022b92215c5 100644 --- a/flavors/ruby/Dockerfile +++ b/flavors/ruby/Dockerfile @@ -145,9 +145,11 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \ cspell \ sql-lint \ tekton-lint && \ - npm audit fix --audit-level=critical || true \ + echo "Cleaning npm cache..." \ && npm cache clean --force || true \ + && echo "Changing owner of node_modules files..." \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ + && echo "Removing extra node_module files..." \ && rm -rf /root/.npm/_cacache \ && find . -name "*.d.ts" -delete \ && find . -name "*.map" -delete \ diff --git a/flavors/rust/Dockerfile b/flavors/rust/Dockerfile index 77eb6f8b794..321642ef4fc 100644 --- a/flavors/rust/Dockerfile +++ b/flavors/rust/Dockerfile @@ -145,9 +145,11 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \ cspell \ sql-lint \ tekton-lint && \ - npm audit fix --audit-level=critical || true \ + echo "Cleaning npm cache..." \ && npm cache clean --force || true \ + && echo "Changing owner of node_modules files..." \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ + && echo "Removing extra node_module files..." \ && rm -rf /root/.npm/_cacache \ && find . -name "*.d.ts" -delete \ && find . -name "*.map" -delete \ diff --git a/flavors/salesforce/Dockerfile b/flavors/salesforce/Dockerfile index 167c7d0b2e7..c6e26d176b1 100644 --- a/flavors/salesforce/Dockerfile +++ b/flavors/salesforce/Dockerfile @@ -148,9 +148,11 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \ cspell \ sql-lint \ tekton-lint && \ - npm audit fix --audit-level=critical || true \ + echo "Cleaning npm cache..." \ && npm cache clean --force || true \ + && echo "Changing owner of node_modules files..." \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ + && echo "Removing extra node_module files..." \ && rm -rf /root/.npm/_cacache \ && find . -name "*.d.ts" -delete \ && find . -name "*.map" -delete \ diff --git a/flavors/security/Dockerfile b/flavors/security/Dockerfile index 8a4b82b52aa..f5a1081a583 100644 --- a/flavors/security/Dockerfile +++ b/flavors/security/Dockerfile @@ -115,9 +115,11 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \ secretlint \ @secretlint/secretlint-rule-preset-recommend \ @secretlint/secretlint-formatter-sarif && \ - npm audit fix --audit-level=critical || true \ + echo "Cleaning npm cache..." \ && npm cache clean --force || true \ + && echo "Changing owner of node_modules files..." \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ + && echo "Removing extra node_module files..." \ && rm -rf /root/.npm/_cacache \ && find . -name "*.d.ts" -delete \ && find . -name "*.map" -delete \ diff --git a/flavors/swift/Dockerfile b/flavors/swift/Dockerfile index 893ecd307bc..90b2900d22a 100644 --- a/flavors/swift/Dockerfile +++ b/flavors/swift/Dockerfile @@ -147,9 +147,11 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \ cspell \ sql-lint \ tekton-lint && \ - npm audit fix --audit-level=critical || true \ + echo "Cleaning npm cache..." \ && npm cache clean --force || true \ + && echo "Changing owner of node_modules files..." \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ + && echo "Removing extra node_module files..." \ && rm -rf /root/.npm/_cacache \ && find . -name "*.d.ts" -delete \ && find . -name "*.map" -delete \ diff --git a/flavors/terraform/Dockerfile b/flavors/terraform/Dockerfile index 7d1b8fb3c93..8e2590ff006 100644 --- a/flavors/terraform/Dockerfile +++ b/flavors/terraform/Dockerfile @@ -151,9 +151,11 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \ cspell \ sql-lint \ tekton-lint && \ - npm audit fix --audit-level=critical || true \ + echo "Cleaning npm cache..." \ && npm cache clean --force || true \ + && echo "Changing owner of node_modules files..." \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ + && echo "Removing extra node_module files..." \ && rm -rf /root/.npm/_cacache \ && find . -name "*.d.ts" -delete \ && find . -name "*.map" -delete \ diff --git a/linters/coffee_coffeelint/Dockerfile b/linters/coffee_coffeelint/Dockerfile index deb249f722c..c9428d6bab6 100644 --- a/linters/coffee_coffeelint/Dockerfile +++ b/linters/coffee_coffeelint/Dockerfile @@ -87,9 +87,11 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \ WORKDIR /node-deps RUN npm --no-cache install --ignore-scripts --omit=dev \ @coffeelint/cli && \ - npm audit fix --audit-level=critical || true \ + echo "Cleaning npm cache..." \ && npm cache clean --force || true \ + && echo "Changing owner of node_modules files..." \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ + && echo "Removing extra node_module files..." \ && rm -rf /root/.npm/_cacache \ && find . -name "*.d.ts" -delete \ && find . -name "*.map" -delete \ diff --git a/linters/copypaste_jscpd/Dockerfile b/linters/copypaste_jscpd/Dockerfile index d8bef923b90..823240e9fdf 100644 --- a/linters/copypaste_jscpd/Dockerfile +++ b/linters/copypaste_jscpd/Dockerfile @@ -88,9 +88,11 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \ WORKDIR /node-deps RUN npm --no-cache install --ignore-scripts --omit=dev \ jscpd && \ - npm audit fix --audit-level=critical || true \ + echo "Cleaning npm cache..." \ && npm cache clean --force || true \ + && echo "Changing owner of node_modules files..." \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ + && echo "Removing extra node_module files..." \ && rm -rf /root/.npm/_cacache \ && find . -name "*.d.ts" -delete \ && find . -name "*.map" -delete \ diff --git a/linters/css_stylelint/Dockerfile b/linters/css_stylelint/Dockerfile index e641a847e8f..50738cbd102 100644 --- a/linters/css_stylelint/Dockerfile +++ b/linters/css_stylelint/Dockerfile @@ -90,9 +90,11 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \ stylelint-config-standard \ stylelint-config-sass-guidelines \ stylelint-scss && \ - npm audit fix --audit-level=critical || true \ + echo "Cleaning npm cache..." \ && npm cache clean --force || true \ + && echo "Changing owner of node_modules files..." \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ + && echo "Removing extra node_module files..." \ && rm -rf /root/.npm/_cacache \ && find . -name "*.d.ts" -delete \ && find . -name "*.map" -delete \ diff --git a/linters/gherkin_gherkin_lint/Dockerfile b/linters/gherkin_gherkin_lint/Dockerfile index 8d570243b9b..28e17c68647 100644 --- a/linters/gherkin_gherkin_lint/Dockerfile +++ b/linters/gherkin_gherkin_lint/Dockerfile @@ -87,9 +87,11 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \ WORKDIR /node-deps RUN npm --no-cache install --ignore-scripts --omit=dev \ gherkin-lint && \ - npm audit fix --audit-level=critical || true \ + echo "Cleaning npm cache..." \ && npm cache clean --force || true \ + && echo "Changing owner of node_modules files..." \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ + && echo "Removing extra node_module files..." \ && rm -rf /root/.npm/_cacache \ && find . -name "*.d.ts" -delete \ && find . -name "*.map" -delete \ diff --git a/linters/graphql_graphql_schema_linter/Dockerfile b/linters/graphql_graphql_schema_linter/Dockerfile index b7c35885d5a..5f009a72fd6 100644 --- a/linters/graphql_graphql_schema_linter/Dockerfile +++ b/linters/graphql_graphql_schema_linter/Dockerfile @@ -88,9 +88,11 @@ WORKDIR /node-deps RUN npm --no-cache install --ignore-scripts --omit=dev \ graphql \ graphql-schema-linter && \ - npm audit fix --audit-level=critical || true \ + echo "Cleaning npm cache..." \ && npm cache clean --force || true \ + && echo "Changing owner of node_modules files..." \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ + && echo "Removing extra node_module files..." \ && rm -rf /root/.npm/_cacache \ && find . -name "*.d.ts" -delete \ && find . -name "*.map" -delete \ diff --git a/linters/groovy_npm_groovy_lint/Dockerfile b/linters/groovy_npm_groovy_lint/Dockerfile index 4e437a84077..9e06915905e 100644 --- a/linters/groovy_npm_groovy_lint/Dockerfile +++ b/linters/groovy_npm_groovy_lint/Dockerfile @@ -88,9 +88,11 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \ WORKDIR /node-deps RUN npm --no-cache install --ignore-scripts --omit=dev \ npm-groovy-lint && \ - npm audit fix --audit-level=critical || true \ + echo "Cleaning npm cache..." \ && npm cache clean --force || true \ + && echo "Changing owner of node_modules files..." \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ + && echo "Removing extra node_module files..." \ && rm -rf /root/.npm/_cacache \ && find . -name "*.d.ts" -delete \ && find . -name "*.map" -delete \ diff --git a/linters/html_htmlhint/Dockerfile b/linters/html_htmlhint/Dockerfile index e635e97253b..4207a18295f 100644 --- a/linters/html_htmlhint/Dockerfile +++ b/linters/html_htmlhint/Dockerfile @@ -87,9 +87,11 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \ WORKDIR /node-deps RUN npm --no-cache install --ignore-scripts --omit=dev \ htmlhint && \ - npm audit fix --audit-level=critical || true \ + echo "Cleaning npm cache..." \ && npm cache clean --force || true \ + && echo "Changing owner of node_modules files..." \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ + && echo "Removing extra node_module files..." \ && rm -rf /root/.npm/_cacache \ && find . -name "*.d.ts" -delete \ && find . -name "*.map" -delete \ diff --git a/linters/javascript_es/Dockerfile b/linters/javascript_es/Dockerfile index fb808c57281..e2b4484e735 100644 --- a/linters/javascript_es/Dockerfile +++ b/linters/javascript_es/Dockerfile @@ -99,9 +99,11 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \ @babel/core \ @babel/eslint-parser \ @microsoft/eslint-formatter-sarif && \ - npm audit fix --audit-level=critical || true \ + echo "Cleaning npm cache..." \ && npm cache clean --force || true \ + && echo "Changing owner of node_modules files..." \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ + && echo "Removing extra node_module files..." \ && rm -rf /root/.npm/_cacache \ && find . -name "*.d.ts" -delete \ && find . -name "*.map" -delete \ diff --git a/linters/javascript_prettier/Dockerfile b/linters/javascript_prettier/Dockerfile index a905e916822..916750e5f84 100644 --- a/linters/javascript_prettier/Dockerfile +++ b/linters/javascript_prettier/Dockerfile @@ -87,9 +87,11 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \ WORKDIR /node-deps RUN npm --no-cache install --ignore-scripts --omit=dev \ prettier && \ - npm audit fix --audit-level=critical || true \ + echo "Cleaning npm cache..." \ && npm cache clean --force || true \ + && echo "Changing owner of node_modules files..." \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ + && echo "Removing extra node_module files..." \ && rm -rf /root/.npm/_cacache \ && find . -name "*.d.ts" -delete \ && find . -name "*.map" -delete \ diff --git a/linters/javascript_standard/Dockerfile b/linters/javascript_standard/Dockerfile index d30a74b7a35..3dd0c5b38c8 100644 --- a/linters/javascript_standard/Dockerfile +++ b/linters/javascript_standard/Dockerfile @@ -87,9 +87,11 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \ WORKDIR /node-deps RUN npm --no-cache install --ignore-scripts --omit=dev \ standard && \ - npm audit fix --audit-level=critical || true \ + echo "Cleaning npm cache..." \ && npm cache clean --force || true \ + && echo "Changing owner of node_modules files..." \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ + && echo "Removing extra node_module files..." \ && rm -rf /root/.npm/_cacache \ && find . -name "*.d.ts" -delete \ && find . -name "*.map" -delete \ diff --git a/linters/json_eslint_plugin_jsonc/Dockerfile b/linters/json_eslint_plugin_jsonc/Dockerfile index 14d9ff94e2b..b2b673cab52 100644 --- a/linters/json_eslint_plugin_jsonc/Dockerfile +++ b/linters/json_eslint_plugin_jsonc/Dockerfile @@ -89,9 +89,11 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \ eslint \ eslint-plugin-jsonc \ @microsoft/eslint-formatter-sarif && \ - npm audit fix --audit-level=critical || true \ + echo "Cleaning npm cache..." \ && npm cache clean --force || true \ + && echo "Changing owner of node_modules files..." \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ + && echo "Removing extra node_module files..." \ && rm -rf /root/.npm/_cacache \ && find . -name "*.d.ts" -delete \ && find . -name "*.map" -delete \ diff --git a/linters/json_jsonlint/Dockerfile b/linters/json_jsonlint/Dockerfile index 00b5f66395e..a63d72a1f7d 100644 --- a/linters/json_jsonlint/Dockerfile +++ b/linters/json_jsonlint/Dockerfile @@ -87,9 +87,11 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \ WORKDIR /node-deps RUN npm --no-cache install --ignore-scripts --omit=dev \ @prantlf/jsonlint && \ - npm audit fix --audit-level=critical || true \ + echo "Cleaning npm cache..." \ && npm cache clean --force || true \ + && echo "Changing owner of node_modules files..." \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ + && echo "Removing extra node_module files..." \ && rm -rf /root/.npm/_cacache \ && find . -name "*.d.ts" -delete \ && find . -name "*.map" -delete \ diff --git a/linters/json_npm_package_json_lint/Dockerfile b/linters/json_npm_package_json_lint/Dockerfile index ee206235af9..06a3be77ece 100644 --- a/linters/json_npm_package_json_lint/Dockerfile +++ b/linters/json_npm_package_json_lint/Dockerfile @@ -88,9 +88,11 @@ WORKDIR /node-deps RUN npm --no-cache install --ignore-scripts --omit=dev \ npm-package-json-lint \ npm-package-json-lint-config-default && \ - npm audit fix --audit-level=critical || true \ + echo "Cleaning npm cache..." \ && npm cache clean --force || true \ + && echo "Changing owner of node_modules files..." \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ + && echo "Removing extra node_module files..." \ && rm -rf /root/.npm/_cacache \ && find . -name "*.d.ts" -delete \ && find . -name "*.map" -delete \ diff --git a/linters/json_prettier/Dockerfile b/linters/json_prettier/Dockerfile index 15b3092d4bc..16deabe69ef 100644 --- a/linters/json_prettier/Dockerfile +++ b/linters/json_prettier/Dockerfile @@ -87,9 +87,11 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \ WORKDIR /node-deps RUN npm --no-cache install --ignore-scripts --omit=dev \ prettier && \ - npm audit fix --audit-level=critical || true \ + echo "Cleaning npm cache..." \ && npm cache clean --force || true \ + && echo "Changing owner of node_modules files..." \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ + && echo "Removing extra node_module files..." \ && rm -rf /root/.npm/_cacache \ && find . -name "*.d.ts" -delete \ && find . -name "*.map" -delete \ diff --git a/linters/json_v8r/Dockerfile b/linters/json_v8r/Dockerfile index 376522a347e..4b5f6eb2e73 100644 --- a/linters/json_v8r/Dockerfile +++ b/linters/json_v8r/Dockerfile @@ -87,9 +87,11 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \ WORKDIR /node-deps RUN npm --no-cache install --ignore-scripts --omit=dev \ v8r && \ - npm audit fix --audit-level=critical || true \ + echo "Cleaning npm cache..." \ && npm cache clean --force || true \ + && echo "Changing owner of node_modules files..." \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ + && echo "Removing extra node_module files..." \ && rm -rf /root/.npm/_cacache \ && find . -name "*.d.ts" -delete \ && find . -name "*.map" -delete \ diff --git a/linters/jsx_eslint/Dockerfile b/linters/jsx_eslint/Dockerfile index 7d209df465e..f87c4baa621 100644 --- a/linters/jsx_eslint/Dockerfile +++ b/linters/jsx_eslint/Dockerfile @@ -90,9 +90,11 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \ eslint-plugin-react \ eslint-plugin-jsx-a11y \ @microsoft/eslint-formatter-sarif && \ - npm audit fix --audit-level=critical || true \ + echo "Cleaning npm cache..." \ && npm cache clean --force || true \ + && echo "Changing owner of node_modules files..." \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ + && echo "Removing extra node_module files..." \ && rm -rf /root/.npm/_cacache \ && find . -name "*.d.ts" -delete \ && find . -name "*.map" -delete \ diff --git a/linters/markdown_markdown_link_check/Dockerfile b/linters/markdown_markdown_link_check/Dockerfile index 193b3651239..88a94599aa8 100644 --- a/linters/markdown_markdown_link_check/Dockerfile +++ b/linters/markdown_markdown_link_check/Dockerfile @@ -87,9 +87,11 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \ WORKDIR /node-deps RUN npm --no-cache install --ignore-scripts --omit=dev \ markdown-link-check@3.10.3 && \ - npm audit fix --audit-level=critical || true \ + echo "Cleaning npm cache..." \ && npm cache clean --force || true \ + && echo "Changing owner of node_modules files..." \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ + && echo "Removing extra node_module files..." \ && rm -rf /root/.npm/_cacache \ && find . -name "*.d.ts" -delete \ && find . -name "*.map" -delete \ diff --git a/linters/markdown_markdown_table_formatter/Dockerfile b/linters/markdown_markdown_table_formatter/Dockerfile index 9968d26b557..0353b523f1f 100644 --- a/linters/markdown_markdown_table_formatter/Dockerfile +++ b/linters/markdown_markdown_table_formatter/Dockerfile @@ -87,9 +87,11 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \ WORKDIR /node-deps RUN npm --no-cache install --ignore-scripts --omit=dev \ markdown-table-formatter && \ - npm audit fix --audit-level=critical || true \ + echo "Cleaning npm cache..." \ && npm cache clean --force || true \ + && echo "Changing owner of node_modules files..." \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ + && echo "Removing extra node_module files..." \ && rm -rf /root/.npm/_cacache \ && find . -name "*.d.ts" -delete \ && find . -name "*.map" -delete \ diff --git a/linters/markdown_markdownlint/Dockerfile b/linters/markdown_markdownlint/Dockerfile index cba37ac794b..e5d974de28d 100644 --- a/linters/markdown_markdownlint/Dockerfile +++ b/linters/markdown_markdownlint/Dockerfile @@ -87,9 +87,11 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \ WORKDIR /node-deps RUN npm --no-cache install --ignore-scripts --omit=dev \ markdownlint-cli && \ - npm audit fix --audit-level=critical || true \ + echo "Cleaning npm cache..." \ && npm cache clean --force || true \ + && echo "Changing owner of node_modules files..." \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ + && echo "Removing extra node_module files..." \ && rm -rf /root/.npm/_cacache \ && find . -name "*.d.ts" -delete \ && find . -name "*.map" -delete \ diff --git a/linters/markdown_remark_lint/Dockerfile b/linters/markdown_remark_lint/Dockerfile index dcc1492fb2c..e023d01ea82 100644 --- a/linters/markdown_remark_lint/Dockerfile +++ b/linters/markdown_remark_lint/Dockerfile @@ -88,9 +88,11 @@ WORKDIR /node-deps RUN npm --no-cache install --ignore-scripts --omit=dev \ remark-cli \ remark-preset-lint-recommended && \ - npm audit fix --audit-level=critical || true \ + echo "Cleaning npm cache..." \ && npm cache clean --force || true \ + && echo "Changing owner of node_modules files..." \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ + && echo "Removing extra node_module files..." \ && rm -rf /root/.npm/_cacache \ && find . -name "*.d.ts" -delete \ && find . -name "*.map" -delete \ diff --git a/linters/openapi_spectral/Dockerfile b/linters/openapi_spectral/Dockerfile index 8323bde1b54..9338f941cb8 100644 --- a/linters/openapi_spectral/Dockerfile +++ b/linters/openapi_spectral/Dockerfile @@ -87,9 +87,11 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \ WORKDIR /node-deps RUN npm --no-cache install --ignore-scripts --omit=dev \ @stoplight/spectral-cli && \ - npm audit fix --audit-level=critical || true \ + echo "Cleaning npm cache..." \ && npm cache clean --force || true \ + && echo "Changing owner of node_modules files..." \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ + && echo "Removing extra node_module files..." \ && rm -rf /root/.npm/_cacache \ && find . -name "*.d.ts" -delete \ && find . -name "*.map" -delete \ diff --git a/linters/repository_secretlint/Dockerfile b/linters/repository_secretlint/Dockerfile index c493a2955b9..1e6c130dc6d 100644 --- a/linters/repository_secretlint/Dockerfile +++ b/linters/repository_secretlint/Dockerfile @@ -89,9 +89,11 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \ secretlint \ @secretlint/secretlint-rule-preset-recommend \ @secretlint/secretlint-formatter-sarif && \ - npm audit fix --audit-level=critical || true \ + echo "Cleaning npm cache..." \ && npm cache clean --force || true \ + && echo "Changing owner of node_modules files..." \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ + && echo "Removing extra node_module files..." \ && rm -rf /root/.npm/_cacache \ && find . -name "*.d.ts" -delete \ && find . -name "*.map" -delete \ diff --git a/linters/salesforce_sfdx_scanner_apex/Dockerfile b/linters/salesforce_sfdx_scanner_apex/Dockerfile index a634e95d8b7..be4b050b0c7 100644 --- a/linters/salesforce_sfdx_scanner_apex/Dockerfile +++ b/linters/salesforce_sfdx_scanner_apex/Dockerfile @@ -88,9 +88,11 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \ WORKDIR /node-deps RUN npm --no-cache install --ignore-scripts --omit=dev \ sfdx-cli && \ - npm audit fix --audit-level=critical || true \ + echo "Cleaning npm cache..." \ && npm cache clean --force || true \ + && echo "Changing owner of node_modules files..." \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ + && echo "Removing extra node_module files..." \ && rm -rf /root/.npm/_cacache \ && find . -name "*.d.ts" -delete \ && find . -name "*.map" -delete \ diff --git a/linters/salesforce_sfdx_scanner_aura/Dockerfile b/linters/salesforce_sfdx_scanner_aura/Dockerfile index 0bcabedda7f..1208543e433 100644 --- a/linters/salesforce_sfdx_scanner_aura/Dockerfile +++ b/linters/salesforce_sfdx_scanner_aura/Dockerfile @@ -88,9 +88,11 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \ WORKDIR /node-deps RUN npm --no-cache install --ignore-scripts --omit=dev \ sfdx-cli && \ - npm audit fix --audit-level=critical || true \ + echo "Cleaning npm cache..." \ && npm cache clean --force || true \ + && echo "Changing owner of node_modules files..." \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ + && echo "Removing extra node_module files..." \ && rm -rf /root/.npm/_cacache \ && find . -name "*.d.ts" -delete \ && find . -name "*.map" -delete \ diff --git a/linters/salesforce_sfdx_scanner_lwc/Dockerfile b/linters/salesforce_sfdx_scanner_lwc/Dockerfile index ed25cb95cfd..47a7487c09a 100644 --- a/linters/salesforce_sfdx_scanner_lwc/Dockerfile +++ b/linters/salesforce_sfdx_scanner_lwc/Dockerfile @@ -88,9 +88,11 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \ WORKDIR /node-deps RUN npm --no-cache install --ignore-scripts --omit=dev \ sfdx-cli && \ - npm audit fix --audit-level=critical || true \ + echo "Cleaning npm cache..." \ && npm cache clean --force || true \ + && echo "Changing owner of node_modules files..." \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ + && echo "Removing extra node_module files..." \ && rm -rf /root/.npm/_cacache \ && find . -name "*.d.ts" -delete \ && find . -name "*.map" -delete \ diff --git a/linters/spell_cspell/Dockerfile b/linters/spell_cspell/Dockerfile index 3b530a99677..ad9df400f4b 100644 --- a/linters/spell_cspell/Dockerfile +++ b/linters/spell_cspell/Dockerfile @@ -87,9 +87,11 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \ WORKDIR /node-deps RUN npm --no-cache install --ignore-scripts --omit=dev \ cspell && \ - npm audit fix --audit-level=critical || true \ + echo "Cleaning npm cache..." \ && npm cache clean --force || true \ + && echo "Changing owner of node_modules files..." \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ + && echo "Removing extra node_module files..." \ && rm -rf /root/.npm/_cacache \ && find . -name "*.d.ts" -delete \ && find . -name "*.map" -delete \ diff --git a/linters/sql_sql_lint/Dockerfile b/linters/sql_sql_lint/Dockerfile index e435be5304c..8d970c6b320 100644 --- a/linters/sql_sql_lint/Dockerfile +++ b/linters/sql_sql_lint/Dockerfile @@ -87,9 +87,11 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \ WORKDIR /node-deps RUN npm --no-cache install --ignore-scripts --omit=dev \ sql-lint && \ - npm audit fix --audit-level=critical || true \ + echo "Cleaning npm cache..." \ && npm cache clean --force || true \ + && echo "Changing owner of node_modules files..." \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ + && echo "Removing extra node_module files..." \ && rm -rf /root/.npm/_cacache \ && find . -name "*.d.ts" -delete \ && find . -name "*.map" -delete \ diff --git a/linters/tekton_tekton_lint/Dockerfile b/linters/tekton_tekton_lint/Dockerfile index 4cab8512071..a351914923f 100644 --- a/linters/tekton_tekton_lint/Dockerfile +++ b/linters/tekton_tekton_lint/Dockerfile @@ -87,9 +87,11 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \ WORKDIR /node-deps RUN npm --no-cache install --ignore-scripts --omit=dev \ tekton-lint && \ - npm audit fix --audit-level=critical || true \ + echo "Cleaning npm cache..." \ && npm cache clean --force || true \ + && echo "Changing owner of node_modules files..." \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ + && echo "Removing extra node_module files..." \ && rm -rf /root/.npm/_cacache \ && find . -name "*.d.ts" -delete \ && find . -name "*.map" -delete \ diff --git a/linters/tsx_eslint/Dockerfile b/linters/tsx_eslint/Dockerfile index c187a8a6dc3..4c8780ce8be 100644 --- a/linters/tsx_eslint/Dockerfile +++ b/linters/tsx_eslint/Dockerfile @@ -99,9 +99,11 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \ @typescript-eslint/eslint-plugin \ @typescript-eslint/parser \ @microsoft/eslint-formatter-sarif && \ - npm audit fix --audit-level=critical || true \ + echo "Cleaning npm cache..." \ && npm cache clean --force || true \ + && echo "Changing owner of node_modules files..." \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ + && echo "Removing extra node_module files..." \ && rm -rf /root/.npm/_cacache \ && find . -name "*.d.ts" -delete \ && find . -name "*.map" -delete \ diff --git a/linters/typescript_es/Dockerfile b/linters/typescript_es/Dockerfile index 40ee9bdfdf5..d74b3ecebc0 100644 --- a/linters/typescript_es/Dockerfile +++ b/linters/typescript_es/Dockerfile @@ -102,9 +102,11 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \ @typescript-eslint/eslint-plugin \ @typescript-eslint/parser \ @microsoft/eslint-formatter-sarif && \ - npm audit fix --audit-level=critical || true \ + echo "Cleaning npm cache..." \ && npm cache clean --force || true \ + && echo "Changing owner of node_modules files..." \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ + && echo "Removing extra node_module files..." \ && rm -rf /root/.npm/_cacache \ && find . -name "*.d.ts" -delete \ && find . -name "*.map" -delete \ diff --git a/linters/typescript_prettier/Dockerfile b/linters/typescript_prettier/Dockerfile index a58cc0b8ef0..eb7f8033443 100644 --- a/linters/typescript_prettier/Dockerfile +++ b/linters/typescript_prettier/Dockerfile @@ -88,9 +88,11 @@ WORKDIR /node-deps RUN npm --no-cache install --ignore-scripts --omit=dev \ typescript \ prettier && \ - npm audit fix --audit-level=critical || true \ + echo "Cleaning npm cache..." \ && npm cache clean --force || true \ + && echo "Changing owner of node_modules files..." \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ + && echo "Removing extra node_module files..." \ && rm -rf /root/.npm/_cacache \ && find . -name "*.d.ts" -delete \ && find . -name "*.map" -delete \ diff --git a/linters/typescript_standard/Dockerfile b/linters/typescript_standard/Dockerfile index 7354c8a0992..29b66d2de86 100644 --- a/linters/typescript_standard/Dockerfile +++ b/linters/typescript_standard/Dockerfile @@ -90,9 +90,11 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \ standard \ @typescript-eslint/eslint-plugin \ @typescript-eslint/parser && \ - npm audit fix --audit-level=critical || true \ + echo "Cleaning npm cache..." \ && npm cache clean --force || true \ + && echo "Changing owner of node_modules files..." \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ + && echo "Removing extra node_module files..." \ && rm -rf /root/.npm/_cacache \ && find . -name "*.d.ts" -delete \ && find . -name "*.map" -delete \ diff --git a/linters/yaml_prettier/Dockerfile b/linters/yaml_prettier/Dockerfile index 56f3076d8f8..36764cd7047 100644 --- a/linters/yaml_prettier/Dockerfile +++ b/linters/yaml_prettier/Dockerfile @@ -87,9 +87,11 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \ WORKDIR /node-deps RUN npm --no-cache install --ignore-scripts --omit=dev \ prettier && \ - npm audit fix --audit-level=critical || true \ + echo "Cleaning npm cache..." \ && npm cache clean --force || true \ + && echo "Changing owner of node_modules files..." \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ + && echo "Removing extra node_module files..." \ && rm -rf /root/.npm/_cacache \ && find . -name "*.d.ts" -delete \ && find . -name "*.map" -delete \ diff --git a/linters/yaml_v8r/Dockerfile b/linters/yaml_v8r/Dockerfile index e13fd62efb1..5644c78b45d 100644 --- a/linters/yaml_v8r/Dockerfile +++ b/linters/yaml_v8r/Dockerfile @@ -87,9 +87,11 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \ WORKDIR /node-deps RUN npm --no-cache install --ignore-scripts --omit=dev \ v8r && \ - npm audit fix --audit-level=critical || true \ + echo "Cleaning npm cache..." \ && npm cache clean --force || true \ + && echo "Changing owner of node_modules files..." \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ + && echo "Removing extra node_module files..." \ && rm -rf /root/.npm/_cacache \ && find . -name "*.d.ts" -delete \ && find . -name "*.map" -delete \