From ece1d1952ac12c75a068873301147a8759c13b70 Mon Sep 17 00:00:00 2001 From: Jorge Turrado Ferrero Date: Tue, 6 Dec 2022 08:06:01 +0100 Subject: [PATCH] fix: remove vendor folder from semgrep scan and fix workflow (#3959) * chore: remove vendor folder from semgrep scan Signed-off-by: Jorge Turrado * fix the checkout Signed-off-by: Jorge Turrado * add ne wline Signed-off-by: Jorge Turrado Signed-off-by: Jorge Turrado --- .github/workflows/static-analysis.yml | 8 ++++---- .semgrepignore | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 .semgrepignore diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 4c03b5f8ad4..93c65f2a688 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -20,14 +20,14 @@ jobs: uses: actions/checkout@v3 - name: Register workspace path - if: github.ref != 'refs/heads/main' + if: ${{ github.event.number > 0 }} run: git config --global --add safe.directory "$GITHUB_WORKSPACE" - name: Checkout Pull Request env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} id: checkout - if: github.ref != 'refs/heads/main' + if: ${{ github.event.number > 0 }} run: | gh pr checkout ${{ github.event.number }} @@ -60,14 +60,14 @@ jobs: steps: - uses: actions/checkout@v3 - name: Register workspace path - if: github.ref != 'refs/heads/main' + if: ${{ github.event.number > 0 }} run: git config --global --add safe.directory "$GITHUB_WORKSPACE" - name: Checkout Pull Request env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} id: checkout - if: github.ref != 'refs/heads/main' + if: ${{ github.event.number > 0 }} run: | gh pr checkout ${{ github.event.number }} diff --git a/.semgrepignore b/.semgrepignore new file mode 100644 index 00000000000..d865a9dc741 --- /dev/null +++ b/.semgrepignore @@ -0,0 +1,2 @@ +# Common large paths +vendor/