-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into cfn-lint-ci
- Loading branch information
Showing
2 changed files
with
50 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,27 @@ | ||
stages: | ||
- scan_and_report | ||
|
||
before_script: | ||
- apt update | ||
# install slither | ||
- python -m pip install --upgrade pip | ||
- pip3 install slither-analyzer | ||
|
||
scan_and_report: | ||
stage: scan_and_report | ||
image: nikolaik/python-nodejs:latest # requires an image with python and nodejs | ||
|
||
script: | ||
# Run Slither | ||
# make sure to modify the solidity compiler version | ||
- export SOLC_VERSION=0.4.15 | ||
- solc-select install $SOLC_VERSION | ||
# make sure to modify the path to your contracts | ||
- slither . --sarif slither.sarif --fail-none | ||
# Install the DeepSource CLI and send the report to DeepSource | ||
# Make sure you set the `DEEPSOURCE_DSN` env variable as a secret in your project. | ||
- curl https://deepsource.io/cli | sh | ||
- ./bin/deepsource report --analyzer slither --analyzer-type community --value-file slither.sarif | ||
|
||
rules: | ||
- if: $CI_PIPELINE_SOURCE == "push" |
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,23 @@ | ||
stages: | ||
- scan_and_report | ||
|
||
before_script: | ||
- apt update | ||
# install Solhint | ||
- npm install solhint@^4.1.1 # version installed should be greater than 4.1.1 | ||
|
||
scan_and_report: | ||
stage: scan_and_report | ||
image: node:latest # requires an image with nodejs | ||
|
||
script: | ||
# Run solhint | ||
# make sure to modify the path to your contracts | ||
- npx solhint '*.sol' -f sarif > solhint.sarif || true | ||
# Install the DeepSource CLI and send the report to DeepSource | ||
# Make sure you set the `DEEPSOURCE_DSN` env variable as a secret in your project. | ||
- curl https://deepsource.io/cli | sh | ||
- ./bin/deepsource report --analyzer solhint --analyzer-type community --value-file solhint.sarif | ||
|
||
rules: | ||
- if: $CI_PIPELINE_SOURCE == "push" |