diff --git a/.github/workflows/check_security_vulnerability.yml b/.github/workflows/check_security_vulnerability.yml index 774148c3..98218cad 100644 --- a/.github/workflows/check_security_vulnerability.yml +++ b/.github/workflows/check_security_vulnerability.yml @@ -73,7 +73,11 @@ jobs: - name: Install Rust toolchain uses: dtolnay/rust-toolchain@stable - name: Install required cargo - run: cargo install clippy-sarif sarif-fmt + run: | + if ! command -v clippy-sarif &> /dev/null || ! command -v sarif-fmt &> /dev/null; then + cargo install clippy-sarif sarif-fmt + else + echo "clippy-sarif and sarif-fmt are already installed" - name: Run rust-clippy run: | cargo clippy --all-features --message-format=json | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt