From 283bd069bd87cd21e1ce6a8f9693c56a54a62d79 Mon Sep 17 00:00:00 2001 From: Goldie Date: Sat, 14 Sep 2024 20:35:33 +0000 Subject: [PATCH] feat: add semgrep security issues scanning --- .github/workflows/run-semgrep.yaml | 34 ++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/run-semgrep.yaml diff --git a/.github/workflows/run-semgrep.yaml b/.github/workflows/run-semgrep.yaml new file mode 100644 index 000000000..a909db2c0 --- /dev/null +++ b/.github/workflows/run-semgrep.yaml @@ -0,0 +1,34 @@ +name: Run Semgrep + +on: + pull_request: {} + workflow_dispatch: {} + +jobs: + semgrep: + name: Scan + runs-on: ubuntu-latest + + container: + image: returntocorp/semgrep + + if: (github.actor != 'dependabot[bot]') + + steps: + - uses: actions/checkout@v3 + + - name: Fetch semgrep rules + uses: actions/checkout@v3 + with: + repository: decurity/semgrep-smart-contracts + path: rules + + - run: semgrep ci --sarif --output=semgrep.sarif || true + env: + SEMGREP_RULES: rules/solidity/security rules/solidity/performance + + - name: Upload findings to GitHub Advanced Security Dashboard + uses: github/codeql-action/upload-sarif@v2 + with: + sarif_file: semgrep.sarif + if: always() \ No newline at end of file