diff --git a/.github/workflows/sast-linters.yml b/.github/workflows/sast-linters.yml index d8f3e64094..060d545e11 100644 --- a/.github/workflows/sast-linters.yml +++ b/.github/workflows/sast-linters.yml @@ -184,8 +184,10 @@ jobs: labels: ["nosec"] }) - - name: Check for pattern + - name: Check for '#nosec' without specificed rule run: | DIFF=$(git diff ${{ github.event.pull_request.base.sha }}) - echo "$DIFF" | grep -P '#nosec(?!(\sG\d{3}))(?![^\s\t])([\s\t]*|$)' && echo "Pattern found!" || echo "Pattern not found!" + echo "$DIFF" | grep -P '#nosec(?!(\sG\d{3}))(?![^\s\t])([\s\t]*|$)' && echo "nosec without specificed rule found!" && exit 1 || exit 0 + + \ No newline at end of file