Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add semgrep security issues scanning #961

Merged
merged 15 commits into from
Oct 1, 2024
39 changes: 39 additions & 0 deletions .github/workflows/run-semgrep.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Run Semgrep

on:
workflow_dispatch:
push:
paths:
- '**.sol'
pull_request:
paths:
- '**.sol'

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 --include packages/contracts/src/dollar --no-suppress-errors
env:
SEMGREP_RULES: rules/solidity/security

- name: Upload findings to GitHub Advanced Security Dashboard
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: semgrep.sarif
if: always()
8 changes: 8 additions & 0 deletions .semgrepignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# mocks
packages/contracts/src/dollar/mocks/

# deprecated contracts
packages/contracts/src/dollar/core/CreditNft.sol
packages/contracts/src/dollar/core/StakingShare.sol
packages/contracts/src/dollar/libraries/LibCreditNftManager.sol
packages/contracts/src/dollar/libraries/LibDollarMintExcess.sol
Loading