Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
025e157a
Unverified
Commit
025e157a
authored
Apr 03, 2023
by
mergify[bot]
Committed by
GitHub
Apr 03, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5296 from ethereum-optimism/jm/reactivate-slither
ctb: Update slither config
parents
b9a82814
d5b6cd80
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
38250 additions
and
277 deletions
+38250
-277
config.yml
.circleci/config.yml
+23
-6
package.json
packages/contracts-bedrock/package.json
+1
-0
slither.sh
packages/contracts-bedrock/scripts/slither.sh
+20
-6
slither.config.json
packages/contracts-bedrock/slither.config.json
+6
-5
slither.db.json
packages/contracts-bedrock/slither.db.json
+38200
-260
No files found.
.circleci/config.yml
View file @
025e157a
...
...
@@ -333,12 +333,6 @@ jobs:
command
:
|
yarn lint:check || echo "export LINT_STATUS=1" >> "$BASH_ENV"
working_directory
:
packages/contracts-bedrock
-
run
:
name
:
slither
command
:
|
slither --version
yarn slither || exit 0
working_directory
:
packages/contracts-bedrock
-
run
:
name
:
gas snapshot
command
:
|
...
...
@@ -382,6 +376,26 @@ jobs:
exit 1
fi
contracts-bedrock-slither
:
docker
:
-
image
:
ethereumoptimism/ci-builder:latest
resource_class
:
xlarge
steps
:
-
checkout
-
attach_workspace
:
{
at
:
"
."
}
-
restore_cache
:
name
:
Restore Yarn Package Cache
keys
:
-
yarn-packages-v2-{{ checksum "yarn.lock" }}
-
check-changed
:
patterns
:
contracts-bedrock,hardhat-deploy-config
-
run
:
name
:
slither
command
:
|
slither --version
yarn slither
working_directory
:
packages/contracts-bedrock
contracts-bedrock-validate-spaces
:
docker
:
-
image
:
ethereumoptimism/ci-builder:latest
...
...
@@ -995,6 +1009,9 @@ workflows:
-
contracts-bedrock-checks
:
requires
:
-
yarn-monorepo
-
contracts-bedrock-slither
:
requires
:
-
yarn-monorepo
-
contracts-bedrock-validate-spaces
:
requires
:
-
yarn-monorepo
...
...
packages/contracts-bedrock/package.json
View file @
025e157a
...
...
@@ -32,6 +32,7 @@
"storage-snapshot"
:
"./scripts/storage-snapshot.sh"
,
"validate-spacers"
:
"hardhat compile && hardhat validate-spacers"
,
"slither"
:
"./scripts/slither.sh"
,
"slither:triage"
:
"TRIAGE_MODE=1 ./scripts/slither.sh"
,
"clean"
:
"rm -rf ./dist ./artifacts ./forge-artifacts ./cache ./tsconfig.tsbuildinfo ./tsconfig.build.tsbuildinfo ./src/contract-artifacts.ts ./test-case-generator/fuzz"
,
"lint:ts:check"
:
"eslint . --max-warnings=0"
,
"lint:forge-tests:check"
:
"ts-node scripts/forge-test-names.ts"
,
...
...
packages/contracts-bedrock/scripts/slither.sh
View file @
025e157a
...
...
@@ -2,10 +2,24 @@
rm
-rf
artifacts forge-artifacts
# Handle slither bug unable to work with the foundry tests
TEMP
=
$(
mktemp
-d
)
mv
contracts/test
$TEMP
/test
# See slither.config.json for slither settings
if
[
-n
"
$TRIAGE_MODE
"
]
;
then
# Slither's triage mode will run an 'interview' in the terminal, allowing you to review each of
# its findings, and specify which should be ignored in future runs of slither. This will update
# (or create) the slither.db.json file. This DB is a cleaner alternative to adding slither-disable
# comments throughout the codebase.
# Triage mode should only be run manually, and can be used to update the db when new findings are
# causing a CI failure.
slither
.
--triage-mode
slither
.
--foundry-out-directory
artifacts
mv
$TEMP
/test contracts/test
# For whatever reason the slither db contains a filename_absolute property which includes the full
# local path to source code on the machine where it was generated. This property does not
# seem to be required for slither to run, so we remove it.
DB
=
slither.db.json
TEMP_DB
=
temp-slither.db.json
mv
$DB
$TEMP_DB
jq
'walk(if type == "object" then del(.filename_absolute) else . end)'
$TEMP_DB
>
$DB
rm
-f
$TEMP_DB
else
slither
.
fi
packages/contracts-bedrock/slither.config.json
View file @
025e157a
{
"detectors_to_exclude"
:
"assembly-usage,block-timestamp,naming-convention,solc-version"
,
"exclude_informational"
:
fals
e
,
"exclude_low"
:
fals
e
,
"exclude_medium"
:
fals
e
,
"exclude_informational"
:
tru
e
,
"exclude_low"
:
tru
e
,
"exclude_medium"
:
tru
e
,
"exclude_high"
:
false
,
"solc_disable_warnings"
:
false
,
"hardhat_ignore_compile"
:
false
,
"disable_color"
:
false
,
"exclude_dependencies"
:
false
,
"filter_paths"
:
"contracts/test|lib"
"exclude_dependencies"
:
true
,
"filter_paths"
:
"contracts/test,contracts/vendor,contracts/echidna,node_modules"
,
"foundry_out_directory"
:
"artifacts"
}
packages/contracts-bedrock/slither.db.json
View file @
025e157a
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment