From 4764c30e61f0213b9683339bc167e7d3e46d1046 Mon Sep 17 00:00:00 2001 From: Philippe Perrin Date: Fri, 24 Sep 2021 14:58:58 +0200 Subject: [PATCH] Fix frontend dependency audit tasks --- server/sonar-docs/build.gradle | 4 ++-- server/sonar-web/build.gradle | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/server/sonar-docs/build.gradle b/server/sonar-docs/build.gradle index d0fc7a471b9..0a60cb45dd5 100644 --- a/server/sonar-docs/build.gradle +++ b/server/sonar-docs/build.gradle @@ -98,10 +98,10 @@ clean.dependsOn(cleanYarn_run) } // Check for known vulnerabilities -yarn_audit { +task dependency_audit(type: Exec) { inputs.file('package.json') outputs.cacheIf { false } - args = ['--groups', 'dependencies', '--level', 'high'] + commandLine 'yarn', 'npm', 'audit', '--environment', 'production', '--severity', 'high' ignoreExitValue = true dependsOn(yarn) } diff --git a/server/sonar-web/build.gradle b/server/sonar-web/build.gradle index 77194301796..3987f4f2679 100644 --- a/server/sonar-web/build.gradle +++ b/server/sonar-web/build.gradle @@ -55,10 +55,10 @@ build.dependsOn(yarn_run) } // Check for known vulnerabilities -yarn_audit { +task dependency_audit(type: Exec) { inputs.file('package.json') outputs.cacheIf { false } - args = ['--groups', 'dependencies', '--level', 'high'] + commandLine 'yarn', 'npm', 'audit', '--environment', 'production', '--severity', 'high' ignoreExitValue = true dependsOn(yarn) } -- 2.39.5