-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #961 from cohow/add-semgrep
feat: add semgrep security issues scanning
- Loading branch information
Showing
2 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |