From 017d99fb92c729c9acc9de44cc65bd79eb78ccd5 Mon Sep 17 00:00:00 2001 From: Li Chaoran Date: Fri, 8 Sep 2023 23:18:53 +0800 Subject: [PATCH] using cargo audit to audit deps vulnerabilities Signed-off-by: Li Chaoran --- Jenkinsfile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2f334a2..da69e0a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -45,6 +45,7 @@ pipeline { [http] check-revoke = false EOF + cargo install cargo-audit ''' } } @@ -88,6 +89,15 @@ EOF ''' } } + stage('cargo audit') { + steps { + sh '''#!/bin/bash + + source $HOME/.cargo/env && cd PR-$giteePullRequestIid + cargo audit -D warnings + ''' + } + } } // post @@ -113,4 +123,4 @@ EOF } } } -} \ No newline at end of file +} -- Gitee