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

sync master<> dev #2407

Merged
merged 219 commits into from
Apr 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
219 commits
Select commit Hold shift + click to select a range
c1e3743
Undo changes from new branch re: cross-contract taint
webthethird Mar 31, 2023
4b07282
Add failing test of `get_implementation_var`
webthethird Mar 31, 2023
11bbe69
Merge remote-tracking branch 'crytic/slither/dev' into dev-upgradeabi…
webthethird Mar 31, 2023
1e40d19
Add TODO
webthethird Mar 31, 2023
382c5b9
Create `RETURN` node for implicit (named) returns
webthethird May 2, 2023
c0764c9
Merge branch 'dev-upgradeability-utils' into dev-named-implicit-returns
webthethird May 2, 2023
ee5a790
Add `nodes` property getter to `YulBlock`
webthethird May 2, 2023
d7ef685
Fix implicit returns after parsing Yul blocks
webthethird May 2, 2023
d902457
Fix typo
webthethird May 2, 2023
80ac920
Black
webthethird May 2, 2023
457b80c
Handle legacy AST too
webthethird May 3, 2023
0a16995
Black
webthethird May 3, 2023
5e051ce
Merge branch 'dev' into dev-named-implicit-returns
webthethird May 15, 2023
91a63bb
Do not add implicit return after `THROW` node
webthethird May 15, 2023
ba3b604
Merge remote-tracking branch 'origin/dev-named-implicit-returns' into…
webthethird May 15, 2023
30794d0
Update expected json artifacts
webthethird May 15, 2023
53f4842
Merge branch 'dev' into dev-named-implicit-returns
webthethird May 16, 2023
643242a
Update expected json artifacts
webthethird May 16, 2023
d28bf61
Update compiles
webthethird May 16, 2023
f5ef00d
Update json artifacts
webthethird May 16, 2023
2d8fd3a
Add missing json artifact
webthethird May 16, 2023
d215d05
Bump
webthethird May 16, 2023
d2ae168
Add missing json artifact
webthethird May 16, 2023
3d8ff74
Merge remote-tracking branch 'origin/dev-named-implicit-returns' into…
webthethird May 16, 2023
3a0f005
Revert "Update expected json artifacts"
webthethird May 16, 2023
e3a8a98
Revert "Update compiles"
webthethird May 16, 2023
728e40c
Update 18 affected json artifacts
webthethird May 16, 2023
bffb172
Update expected json artifacts for conditional-all.sol
webthethird May 16, 2023
371ca7d
Add parser tests for implicit returns
webthethird May 16, 2023
e4864de
Fix expected json artifacts
webthethird May 17, 2023
0d93648
Remove debugging statement
webthethird May 17, 2023
326ec90
Remove AST parsing tests
webthethird May 18, 2023
ba1d536
Add legacy option to `slither_from_source` fixture
webthethird May 18, 2023
80c96cf
Begin test_implicit_returns.py
webthethird May 18, 2023
9c8eb75
Fix typos
webthethird May 18, 2023
e63b578
Fix typos, lint
webthethird May 18, 2023
242a04b
Remove implicit-returns.sol from test_ast_parsing.py
webthethird May 18, 2023
3cf394e
Add more test cases to test_implicit_returns.py
webthethird May 18, 2023
5875b54
Test legacy and compact in test_implicit_returns.py
webthethird May 18, 2023
d618971
Test additional tests in test_implicit_returns.py
webthethird May 18, 2023
e8a8081
Typo, solc version
webthethird May 18, 2023
b1d6177
Black
webthethird May 18, 2023
583d60a
Merge branch 'dev' into dev-named-implicit-returns
webthethird May 19, 2023
55da69e
Merge branch 'dev' into dev-named-implicit-returns
webthethird May 25, 2023
70c2742
leave None in tuple assignments for empty components. don't reuse var…
kevinclancy Jul 7, 2023
695b6ee
replaced find_start_loop with find_if_loop
Tiko7454 Jul 13, 2023
f9df823
attached continue node to if_loop in tests
Tiko7454 Jul 13, 2023
9994acc
Merge branch 'dev' into fix-continue-bug
Tiko7454 Jul 13, 2023
709d5e9
Merge branch 'dev' into fix-continue-bug
Tiko7454 Aug 21, 2023
64ad837
fixed continue bug for `for` case
Tiko7454 Sep 11, 2023
7e6a8aa
Merge branch 'fix-continue-bug' of https://github.com/cast-tech/slith…
Tiko7454 Sep 11, 2023
7fad723
Merge branch 'dev' into fix-continue-bug
Tiko7454 Sep 11, 2023
a2d88b8
add support for send builtin
0xalpharush Nov 1, 2023
e3365a7
remove newline separators in mutation output
bohendo Jan 30, 2024
007789f
count valid RR ad CR mutants
bohendo Jan 30, 2024
3c468b6
count different categories of total mutants
bohendo Jan 30, 2024
f951ec7
print more detailed campaign summary
bohendo Jan 30, 2024
a832b98
flag mutants that fail to compile
bohendo Feb 5, 2024
bbf6896
be more careful while replacing revert strings
bohendo Feb 5, 2024
abe0036
bug: address issue #2107 add contract id in inheritance graph printer
dokzai Oct 7, 2023
9f255d8
update test to use output method
dokzai Feb 6, 2024
f15fbf1
tweak logs
bohendo Feb 7, 2024
a3e6c4b
reset mutant counts after each analyzed files
bohendo Feb 7, 2024
c990b9a
fix mutant count calculations & add more verbose logs
bohendo Feb 7, 2024
f23ca68
move mutant count reset logic
bohendo Feb 7, 2024
9ef4c2a
don't mutate interfaces
bohendo Feb 7, 2024
fcbd327
remove redundant skip-mutating-contract logic
bohendo Feb 12, 2024
5d43f9e
use dedicated variable for naming mutant files
bohendo Feb 12, 2024
69748c8
update debug logs and mutant counters
bohendo Feb 12, 2024
c7cd137
hide very verbose logs behind a -vv flag
bohendo Feb 12, 2024
fa8be85
tidy up logs
bohendo Feb 12, 2024
ef0e354
rename in/valid mutants to un/caught
bohendo Feb 12, 2024
ef1fce3
Merge branch 'dev' into mutator/fit-and-finish
bohendo Feb 12, 2024
43ec72f
log warning instead of crashing on test timeout/interruption
bohendo Feb 16, 2024
9862a1b
exit testing subprocess more gracefully on ctrl-c or timeout
bohendo Feb 16, 2024
15e56ee
clean up mutated files on interrupt
bohendo Feb 16, 2024
dcea61a
ensure timeout is an int
bohendo Feb 16, 2024
89e2318
run tests before starting, abort if they don't pass
bohendo Feb 16, 2024
61242af
set smart default timeout
bohendo Feb 16, 2024
b362a3c
force recompilation during initial timing test run
bohendo Feb 16, 2024
34ab55f
replace quick flag with comprehensive flag
bohendo Feb 16, 2024
e47f4e1
rm some obsolete code & polish logs
bohendo Feb 16, 2024
924252e
run black reformatter
bohendo Feb 16, 2024
fac7042
log output if tests fail before mutating
bohendo Feb 16, 2024
df4154d
log total elapsed time
bohendo Feb 16, 2024
bb68df0
black format
bohendo Feb 16, 2024
14bdd7c
ignore pylint warning re too-many-branches
bohendo Feb 16, 2024
b1c58ca
format
dokzai Feb 17, 2024
c1cd3e5
Merge branch 'dev' into dev
Tiko7454 Feb 20, 2024
80efe77
Merge branch 'dev' into pull/1880/head
0xalpharush Feb 20, 2024
f71b016
comment and refactor
0xalpharush Feb 20, 2024
5035c79
dev: update lint dependencies
elopez Feb 12, 2024
925102b
ci: test:: make scripts executable
elopez Feb 12, 2024
04f0dbe
README, CONTRIBUTING, trophies: fix markdown lint errors
elopez Feb 12, 2024
bef04ef
ci: linter: fix gitleaks false positive
elopez Feb 12, 2024
5123d38
pylint: fix linting errors
elopez Feb 12, 2024
624df5f
ci: linter: disable checkov, JS, shfmt, enable actionlint
elopez Feb 12, 2024
e487934
actionlint: fix linting errors
elopez Feb 12, 2024
d820145
Bump super-linter/super-linter from 4.9.2 to 6.0.0
dependabot[bot] Feb 5, 2024
40a1594
ci: black: temporarily roll back to previous version
elopez Feb 12, 2024
ff0db03
pylint: fix further lint errors
elopez Feb 12, 2024
7dc5b06
Bump super-linter/super-linter to v6.1.1
elopez Feb 20, 2024
0b204cb
Merge branch 'dev' into fix/model-named-returns
0xalpharush Feb 20, 2024
b106acf
Check the folded length in __eq__
smonicas Feb 21, 2024
2dff825
updated tests
Tiko7454 Feb 21, 2024
a382bfa
Merge branch 'crytic:dev' into dev
Tiko7454 Feb 21, 2024
39abbfb
fixed merge conflictes, merged dev
Tiko7454 Feb 21, 2024
81054b1
Add virtual and override attributes
smonicas Feb 21, 2024
86de161
Remove duplicated code
smonicas Feb 21, 2024
377494a
Merge pull request #2047 from cast-tech/fix-continue-bug
0xalpharush Mar 1, 2024
c9e9cff
Merge branch 'dev' into fix/model-named-returns
0xalpharush Mar 1, 2024
b7607f7
Merge pull request #2326 from crytic/fix/model-named-returns
0xalpharush Mar 1, 2024
c983185
Merge pull request #2159 from dokzai/issue-2107
0xalpharush Mar 1, 2024
ac786fe
update version of pylint in contributing.md
0xalpharush Mar 1, 2024
f17133f
Merge branch 'dev' into dev-super-linter
0xalpharush Mar 1, 2024
6368368
Merge pull request #2303 from crytic/dev-super-linter
0xalpharush Mar 1, 2024
0c10e27
add support for python 3.12
0xalpharush Mar 1, 2024
1af07d1
add known solc bugs, remove allowed versions, improve formatting
0xalpharush Mar 1, 2024
d24347b
Bump pypa/gh-action-pypi-publish from 1.8.11 to 1.8.12
dependabot[bot] Mar 4, 2024
66ae9d2
Merge pull request #2353 from crytic/dependabot/github_actions/dev/py…
0xalpharush Mar 6, 2024
5d36814
Improve file handling in Mutator
DarkaMaul Mar 7, 2024
4081125
Fix wrong path
DarkaMaul Mar 8, 2024
f46574e
Run formatters
DarkaMaul Mar 8, 2024
354f5ba
Remove os module usage
DarkaMaul Mar 8, 2024
c37c506
Fix typo in encoding
DarkaMaul Mar 8, 2024
4d2ab83
Save mutant file in mutation_campaign directory
DarkaMaul Mar 8, 2024
4664c97
Fix a bug where contract-names parameter where not properly handled.
DarkaMaul Mar 8, 2024
59327fa
Fix a bug where also directories were iterated on
DarkaMaul Mar 8, 2024
c2ff06e
Only mutate contracts once.
DarkaMaul Mar 8, 2024
3d1742f
Bump pypa/gh-action-pypi-publish from 1.8.12 to 1.8.14
dependabot[bot] Mar 11, 2024
0e1713b
Bump cachix/install-nix-action from 25 to 26
dependabot[bot] Mar 11, 2024
84efb2f
omit --force flag in hardhat tests
bohendo Feb 29, 2024
134cadf
Fix parsing of events
smonicas Mar 18, 2024
3f2d189
Create issue-metrics.yml
0xalpharush Mar 18, 2024
de268d3
Merge pull request #2365 from crytic/dev-fix-event-parsing
0xalpharush Mar 18, 2024
84053e6
Merge pull request #2366 from crytic/feat/issue-metrics
0xalpharush Mar 18, 2024
0f56da1
Merge pull request #2361 from crytic/dependabot/github_actions/dev/ca…
0xalpharush Mar 18, 2024
c162138
Merge pull request #2360 from crytic/dependabot/github_actions/dev/py…
0xalpharush Mar 18, 2024
0cfb897
Merge pull request #2357 from DarkaMaul/mutator/fit-and-finish
0xalpharush Mar 18, 2024
ed6edff
Fix IR for top level functions with using-for
smonicas Mar 19, 2024
19fc24b
Fix comment and lint
smonicas Mar 19, 2024
58155bf
Add all variables read/written
smonicas Mar 19, 2024
69ece6d
fix: support aliases for NewContract operation
0xalpharush Mar 20, 2024
14f4a32
register references for HighLevelCall's
0xalpharush Mar 21, 2024
28688b3
fix: add offsets for state variables
0xalpharush Mar 21, 2024
fc9416c
fix: attach references for inheritance specifier and top level types
0xalpharush Mar 22, 2024
294850f
add missing file
0xalpharush Mar 22, 2024
db6ff66
fix pylint
0xalpharush Mar 22, 2024
209df4e
split test into its own file
0xalpharush Mar 22, 2024
b5993c3
Merge pull request #2212 from crytic/fix-vyper-send
0xalpharush Mar 22, 2024
84c3199
add regression tests for reference API on windows
0xalpharush Mar 22, 2024
609a5e1
add missing python versions to matrix
0xalpharush Mar 22, 2024
20b32df
use ValueError instead of broad exception
0xalpharush Mar 22, 2024
93bbb22
use crytic-compile master with windows path fix
0xalpharush Mar 22, 2024
ea90b38
Merge pull request #2348 from crytic/support-python3.12
0xalpharush Mar 22, 2024
757d892
feat: which contracts' function defs are overridden with refs
0xalpharush Mar 23, 2024
09dd74a
Merge branch 'fix/references-high-level-call' into feat/virtual-overr…
0xalpharush Mar 23, 2024
b15d9df
Merge branch 'dev' into dev-fix-toplevelfn-ir
smonicas Mar 26, 2024
9a0fc30
Add ir test
smonicas Mar 26, 2024
ecf8c3d
Make using-for utils
smonicas Mar 26, 2024
20ed490
feat: add is_abstract
0xalpharush Mar 28, 2024
0933dfa
reference API handles abstract contract, interface, and virtual func
0xalpharush Mar 28, 2024
0b0f155
Implement pytest parameterize on test_implicit_returns (#2350)
nsiregar Mar 28, 2024
759a4fc
add test
0xalpharush Mar 28, 2024
e574c02
Merge pull request #2381 from nsiregar/implement-pytest-parameterize
0xalpharush Mar 28, 2024
e7edac5
add override for all instance of virtual, inherited functions
0xalpharush Mar 28, 2024
b4260b1
refactor for linter
0xalpharush Mar 28, 2024
98f37bc
fix lints
0xalpharush Mar 28, 2024
2ad318c
Merge pull request #2376 from crytic/feat/virtual-override-with-refs
0xalpharush Mar 28, 2024
ef1fd7e
Merge pull request #2370 from crytic/fix/support-alias-NewContract
0xalpharush Mar 29, 2024
f04a3c1
fix: guard literal implicit conversion for arrays
0xalpharush Mar 29, 2024
3c11786
lint and updates tests
0xalpharush Mar 29, 2024
448d77f
lint and text update
0xalpharush Mar 29, 2024
53c769d
fmt and lint
0xalpharush Mar 29, 2024
ee0afad
Merge branch 'dev' into update-pr-2034
0xalpharush Mar 29, 2024
2df8939
update test
0xalpharush Mar 29, 2024
613c62b
add pylint disable to buggy_versions.py
0xalpharush Mar 29, 2024
3181a45
Merge branch 'dev' into HEAD
0xalpharush Mar 29, 2024
73fa244
update too-many-digits help
0xalpharush Mar 29, 2024
6cc0bda
fix: add newline to incorrect-modifier output
0xalpharush Mar 29, 2024
6bda75d
Merge branch 'dev' into fix/guard-implicit-conversion-of-literals
0xalpharush Mar 29, 2024
8786642
Merge pull request #2386 from crytic/fix/incorrect-modifier-formatting
0xalpharush Mar 29, 2024
4ff39d2
Merge pull request #2385 from crytic/wiki/too-many-digits
0xalpharush Mar 29, 2024
36ebff8
Merge branch 'dev' into update-pr-2034
0xalpharush Mar 29, 2024
365ecf2
Merge pull request #2367 from crytic/dev-fix-toplevelfn-ir
0xalpharush Mar 29, 2024
5e7562a
Merge pull request #2384 from crytic/update-pr-2034
0xalpharush Mar 29, 2024
c704a32
Merge pull request #2383 from crytic/fix/guard-implicit-conversion-of…
0xalpharush Mar 29, 2024
1907ace
Merge branch 'dev' into mutator/fit-and-finish
bohendo Mar 29, 2024
9dee8a2
fix lint/formatting problems
bohendo Mar 29, 2024
28402ae
Merge pull request #2302 from crytic/mutator/fit-and-finish
0xalpharush Mar 29, 2024
640d675
upgrade slither-mutate readme
bohendo Mar 29, 2024
3e8a643
Merge pull request #2391 from crytic/mutator/fit-and-finish
0xalpharush Mar 29, 2024
5f5aacd
feat: add detector for unused imports
0xalpharush Mar 30, 2024
5de2360
Filter name-reused detector to only run on Truffle projects (#2390)
nsiregar Mar 31, 2024
3dd3521
Bump actions/configure-pages from 4 to 5
dependabot[bot] Apr 1, 2024
c034713
Bump github/issue-metrics from 2 to 3
dependabot[bot] Apr 1, 2024
2ba9c85
Merge pull request #2397 from crytic/dependabot/github_actions/dev/gi…
0xalpharush Apr 3, 2024
ef44825
Merge pull request #2396 from crytic/dependabot/github_actions/dev/ac…
0xalpharush Apr 3, 2024
524a863
Merge pull request #2368 from crytic/dev-all-variables
0xalpharush Apr 3, 2024
34f1735
Merge pull request #2349 from crytic/update-solc-detectors
0xalpharush Apr 3, 2024
090c815
metamorpho, v4, endaoment work
0xalpharush Apr 6, 2024
fc0d9ca
fix legacy and solc < 0.8.8 aliasing
0xalpharush Apr 6, 2024
e2d0047
fix member of unit alias lookup
0xalpharush Apr 6, 2024
9cecef8
fix: lookup of type alias as member of contract
0xalpharush Apr 6, 2024
5a6ef0d
cleanup code and add test
0xalpharush Apr 7, 2024
8c9b7dd
Merge pull request #2404 from crytic/fix/contract-member-lookup
0xalpharush Apr 7, 2024
0165614
add another test and fix pylint issues
0xalpharush Apr 7, 2024
dd4ba2d
remove unused var
0xalpharush Apr 7, 2024
4cf8c9a
add test for https://github.com/crytic/slither/issues/2307
0xalpharush Apr 7, 2024
b4f4a20
Merge pull request #2403 from crytic/fix/scoping
0xalpharush Apr 7, 2024
7071098
Merge pull request #2394 from nsiregar/filter-name-reused-only-truffle
0xalpharush Apr 7, 2024
8f018b1
Merge pull request #2405 from crytic/pull/2331/head
0xalpharush Apr 7, 2024
098851c
add tests
0xalpharush Apr 7, 2024
beb3f38
Merge pull request #2392 from crytic/feat/unused-import
0xalpharush Apr 7, 2024
873319a
prepare for 0.10.2 release
0xalpharush Apr 7, 2024
e2a2ba7
Merge pull request #2406 from crytic/prepare-release
0xalpharush Apr 7, 2024
9388750
Merge branch 'master' into dev
0xalpharush Apr 7, 2024
c329a4b
removed unused import
0xalpharush Apr 7, 2024
118c916
Merge pull request #2408 from crytic/chore/pylint
0xalpharush Apr 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Empty file modified .github/scripts/integration_test_runner.sh
100644 → 100755
Empty file.
Empty file modified .github/scripts/tool_test_runner.sh
100644 → 100755
Empty file.
Empty file modified .github/scripts/unit_test_runner.sh
100644 → 100755
Empty file.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
fail-fast: false
matrix:
os: ["ubuntu-latest", "windows-2022"]
python: ${{ (github.event_name == 'pull_request' && fromJSON('["3.8", "3.11"]')) || fromJSON('["3.8", "3.9", "3.10", "3.11"]') }}
python: ${{ (github.event_name == 'pull_request' && fromJSON('["3.8", "3.12"]')) || fromJSON('["3.8", "3.9", "3.10", "3.11", "3.12"]') }}
type: ["cli",
"dapp",
"data_dependency",
Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:

- name: Set up nix
if: matrix.type == 'dapp'
uses: cachix/install-nix-action@v25
uses: cachix/install-nix-action@v26

- name: Set up cachix
if: matrix.type == 'dapp'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v4
uses: actions/configure-pages@v5
- uses: actions/setup-python@v5
with:
python-version: '3.8'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/doctor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
fail-fast: false
matrix:
os: ["ubuntu-latest", "windows-2022"]
python: ["3.8", "3.9", "3.10", "3.11"]
python: ["3.8", "3.9", "3.10", "3.11", "3.12"]
exclude:
# strange failure
- os: windows-2022
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/issue-metrics.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Monthly issue metrics
on:
workflow_dispatch:
schedule:
- cron: '3 2 1 * *'

permissions:
issues: write
pull-requests: read

jobs:
build:
name: issue metrics
runs-on: ubuntu-latest
steps:
- name: Get dates for last month
shell: bash
run: |
# Calculate the first day of the previous month
first_day=$(date -d "last month" +%Y-%m-01)

# Calculate the last day of the previous month
last_day=$(date -d "$first_day +1 month -1 day" +%Y-%m-%d)

#Set an environment variable with the date range
echo "$first_day..$last_day"
echo "last_month=$first_day..$last_day" >> "$GITHUB_ENV"

- name: Run issue-metrics tool
uses: github/issue-metrics@v3
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SEARCH_QUERY: 'repo:crytic/slither is:issue created:${{ env.last_month }} -reason:"not planned" -reason:"duplicate"'

- name: Create issue
uses: peter-evans/create-issue-from-file@v5
with:
title: Monthly issue metrics report
token: ${{ secrets.GITHUB_TOKEN }}
content-filepath: ./issue_metrics.md
8 changes: 5 additions & 3 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
echo "::add-matcher::.github/workflows/matchers/yamllint.json"

- name: Lint everything else
uses: super-linter/super-linter/slim@v4.9.2
uses: super-linter/super-linter/slim@v6.1.1
if: always()
env:
# run linter on everything to catch preexisting problems
Expand All @@ -58,14 +58,16 @@ jobs:
VALIDATE_PYTHON_BLACK: false
VALIDATE_PYTHON_ISORT: false
VALIDATE_JSON: false
VALIDATE_JAVASCRIPT_ES: false
VALIDATE_JAVASCRIPT_STANDARD: false
VALIDATE_PYTHON_FLAKE8: false
VALIDATE_DOCKERFILE: false
VALIDATE_DOCKERFILE_HADOLINT: false
VALIDATE_EDITORCONFIG: false
VALIDATE_JSCPD: false
VALIDATE_PYTHON_MYPY: false
# Until we upgrade the super linter for actionlintÒ
VALIDATE_GITHUB_ACTIONS: false
VALIDATE_CHECKOV: false
# TODO: consider enabling
VALIDATE_SHELL_SHFMT: false
SHELLCHECK_OPTS: "-e SC1090"
FILTER_REGEX_EXCLUDE: .*tests/.*.(json|zip|sol)
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
path: dist/

- name: publish
uses: pypa/[email protected].11
uses: pypa/[email protected].14

- name: sign
uses: sigstore/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
echo "::add-matcher::.github/workflows/matchers/pylint.json"

- name: Pylint
uses: super-linter/super-linter/slim@v4.9.2
uses: super-linter/super-linter/slim@v6.1.1
if: always()
env:
# Run linters only on new files for pylint to speed up the CI
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
matrix:
os: ["ubuntu-latest", "windows-2022"]
type: ["unit", "integration", "tool"]
python: ${{ (github.event_name == 'pull_request' && fromJSON('["3.8", "3.11"]')) || fromJSON('["3.8", "3.9", "3.10", "3.11"]') }}
python: ${{ (github.event_name == 'pull_request' && fromJSON('["3.8", "3.12"]')) || fromJSON('["3.8", "3.9", "3.10", "3.11", "3.12"]') }}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python }}
Expand Down Expand Up @@ -80,11 +80,11 @@ jobs:
# Only run coverage on ubuntu-latest.
run: |
if [ ${{ matrix.os }} = "ubuntu-latest" ]; then
TEST_ARGS="--cov=slither --cov-append"
TEST_ARGS=(--cov=slither --cov-append)
elif [ ${{ matrix.os }} = "windows-2022" ]; then
TEST_ARGS=""
TEST_ARGS=()
fi
bash "./.github/scripts/${TEST_TYPE}_test_runner.sh" $TEST_ARGS
bash "./.github/scripts/${TEST_TYPE}_test_runner.sh" "${TEST_ARGS[@]}"


- name: Upload coverage
Expand Down Expand Up @@ -119,5 +119,5 @@ jobs:
run: |
set +e
python -m coverage combine
echo "## python coverage" >> $GITHUB_STEP_SUMMARY
python -m coverage report -m --format=markdown >> $GITHUB_STEP_SUMMARY
echo "## python coverage" >> "$GITHUB_STEP_SUMMARY"
python -m coverage report -m --format=markdown >> "$GITHUB_STEP_SUMMARY"
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ If you're unsure where to start, we recommend our [`good first issue`](https://g

## Bug reports and feature suggestions

Bug reports and feature suggestions can be submitted to our issue tracker. For bug reports, attaching the contract that caused the bug will help us in debugging and resolving the issue quickly. If you find a security vulnerability, do not open an issue; email [email protected] instead.
Bug reports and feature suggestions can be submitted to our issue tracker. For bug reports, attaching the contract that caused the bug will help us in debugging and resolving the issue quickly. If you find a security vulnerability, do not open an issue; email <[email protected]> instead.

## Questions

Questions can be submitted to the "Discussions" page, and you may also join our [chat room](https://empireslacking.herokuapp.com/) (in the #ethereum channel).

## Code

Slither uses the pull request contribution model. Please make an account on Github, fork this repo, and submit code contributions via pull request. For more documentation, look [here](https://guides.github.com/activities/forking/).
Slither uses the pull request contribution model. Please make an account on GitHub, fork this repository, and submit code contributions via pull request. For more documentation, look [here](https://guides.github.com/activities/forking/).

Some pull request guidelines:

Expand Down Expand Up @@ -63,7 +63,7 @@ To automatically reformat the code:

- `make reformat`

We use pylint `2.13.4`, black `22.3.0`.
We use pylint `3.0.3`, black `22.3.0`.

### Testing

Expand All @@ -82,7 +82,7 @@ For each new detector, at least one regression tests must be present.
1. Create a folder in `tests/e2e/detectors/test_data` with the detector's argument name.
2. Create a test contract in `tests/e2e/detectors/test_data/<detector_name>/`.
3. Update `ALL_TESTS` in `tests/e2e/detectors/test_detectors.py`.
4. Run `python tests/e2e/detectors/test_detectors.py --compile` to create a zip file of the compilation artifacts.
4. Run `python tests/e2e/detectors/test_detectors.py --compile` to create a ZIP file of the compilation artifacts.
5. `pytest tests/e2e/detectors/test_detectors.py --insta update-new`. This will generate a snapshot of the detector output in `tests/e2e/detectors/snapshots/`. If updating an existing detector, run `pytest tests/e2e/detectors/test_detectors.py --insta review` and accept or reject the updates.
6. Run `pytest tests/e2e/detectors/test_detectors.py` to ensure everything worked. Then, add and commit the files to git.

Expand Down
37 changes: 19 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,17 +191,18 @@ Num | Detector | What it Detects | Impact | Confidence
80 | `redundant-statements` | [Redundant statements](https://github.com/crytic/slither/wiki/Detector-Documentation#redundant-statements) | Informational | High
81 | `solc-version` | [Incorrect Solidity version](https://github.com/crytic/slither/wiki/Detector-Documentation#incorrect-versions-of-solidity) | Informational | High
82 | `unimplemented-functions` | [Unimplemented functions](https://github.com/crytic/slither/wiki/Detector-Documentation#unimplemented-functions) | Informational | High
83 | `unused-state` | [Unused state variables](https://github.com/crytic/slither/wiki/Detector-Documentation#unused-state-variable) | Informational | High
84 | `costly-loop` | [Costly operations in a loop](https://github.com/crytic/slither/wiki/Detector-Documentation#costly-operations-inside-a-loop) | Informational | Medium
85 | `dead-code` | [Functions that are not used](https://github.com/crytic/slither/wiki/Detector-Documentation#dead-code) | Informational | Medium
86 | `reentrancy-unlimited-gas` | [Reentrancy vulnerabilities through send and transfer](https://github.com/crytic/slither/wiki/Detector-Documentation#reentrancy-vulnerabilities-4) | Informational | Medium
87 | `similar-names` | [Variable names are too similar](https://github.com/crytic/slither/wiki/Detector-Documentation#variable-names-too-similar) | Informational | Medium
88 | `too-many-digits` | [Conformance to numeric notation best practices](https://github.com/crytic/slither/wiki/Detector-Documentation#too-many-digits) | Informational | Medium
89 | `cache-array-length` | [Detects `for` loops that use `length` member of some storage array in their loop condition and don't modify it.](https://github.com/crytic/slither/wiki/Detector-Documentation#cache-array-length) | Optimization | High
90 | `constable-states` | [State variables that could be declared constant](https://github.com/crytic/slither/wiki/Detector-Documentation#state-variables-that-could-be-declared-constant) | Optimization | High
91 | `external-function` | [Public function that could be declared external](https://github.com/crytic/slither/wiki/Detector-Documentation#public-function-that-could-be-declared-external) | Optimization | High
92 | `immutable-states` | [State variables that could be declared immutable](https://github.com/crytic/slither/wiki/Detector-Documentation#state-variables-that-could-be-declared-immutable) | Optimization | High
93 | `var-read-using-this` | [Contract reads its own variable using `this`](https://github.com/crytic/slither/wiki/Detector-Documentation#public-variable-read-in-external-context) | Optimization | High
83 | `unused-import` | [Detects unused imports](https://github.com/crytic/slither/wiki/Detector-Documentation#unused-imports) | Informational | High
84 | `unused-state` | [Unused state variables](https://github.com/crytic/slither/wiki/Detector-Documentation#unused-state-variable) | Informational | High
85 | `costly-loop` | [Costly operations in a loop](https://github.com/crytic/slither/wiki/Detector-Documentation#costly-operations-inside-a-loop) | Informational | Medium
86 | `dead-code` | [Functions that are not used](https://github.com/crytic/slither/wiki/Detector-Documentation#dead-code) | Informational | Medium
87 | `reentrancy-unlimited-gas` | [Reentrancy vulnerabilities through send and transfer](https://github.com/crytic/slither/wiki/Detector-Documentation#reentrancy-vulnerabilities-4) | Informational | Medium
88 | `similar-names` | [Variable names are too similar](https://github.com/crytic/slither/wiki/Detector-Documentation#variable-names-too-similar) | Informational | Medium
89 | `too-many-digits` | [Conformance to numeric notation best practices](https://github.com/crytic/slither/wiki/Detector-Documentation#too-many-digits) | Informational | Medium
90 | `cache-array-length` | [Detects `for` loops that use `length` member of some storage array in their loop condition and don't modify it.](https://github.com/crytic/slither/wiki/Detector-Documentation#cache-array-length) | Optimization | High
91 | `constable-states` | [State variables that could be declared constant](https://github.com/crytic/slither/wiki/Detector-Documentation#state-variables-that-could-be-declared-constant) | Optimization | High
92 | `external-function` | [Public function that could be declared external](https://github.com/crytic/slither/wiki/Detector-Documentation#public-function-that-could-be-declared-external) | Optimization | High
93 | `immutable-states` | [State variables that could be declared immutable](https://github.com/crytic/slither/wiki/Detector-Documentation#state-variables-that-could-be-declared-immutable) | Optimization | High
94 | `var-read-using-this` | [Contract reads its own variable using `this`](https://github.com/crytic/slither/wiki/Detector-Documentation#public-variable-read-in-external-context) | Optimization | High

For more information, see

Expand Down Expand Up @@ -289,16 +290,16 @@ Slither is licensed and distributed under the AGPLv3 license. [Contact us](mailt

Title | Usage | Authors | Venue | Code
--- | --- | --- | --- | ---
[ReJection: A AST-Based Reentrancy Vulnerability Detection Method](https://www.researchgate.net/publication/339354823_ReJection_A_AST-Based_Reentrancy_Vulnerability_Detection_Method) | AST-based analysis built on top of Slither | Rui Ma, Zefeng Jian, Guangyuan Chen, Ke Ma, Yujia Chen | CTCIS 19
[ReJection: A AST-Based Reentrancy Vulnerability Detection Method](https://www.researchgate.net/publication/339354823_ReJection_A_AST-Based_Reentrancy_Vulnerability_Detection_Method) | AST-based analysis built on top of Slither | Rui Ma, Zefeng Jian, Guangyuan Chen, Ke Ma, Yujia Chen | CTCIS 19 | -
[MPro: Combining Static and Symbolic Analysis forScalable Testing of Smart Contract](https://arxiv.org/pdf/1911.00570.pdf) | Leverage data dependency through Slither | William Zhang, Sebastian Banescu, Leodardo Pasos, Steven Stewart, Vijay Ganesh | ISSRE 2019 | [MPro](https://github.com/QuanZhang-William/M-Pro)
[ETHPLOIT: From Fuzzing to Efficient Exploit Generation against Smart Contracts](https://wcventure.github.io/FuzzingPaper/Paper/SANER20_ETHPLOIT.pdf) | Leverage data dependency through Slither | Qingzhao Zhang, Yizhuo Wang, Juanru Li, Siqi Ma | SANER 20
[Verification of Ethereum Smart Contracts: A Model Checking Approach](http://www.ijmlc.org/vol10/977-AM0059.pdf) | Symbolic execution built on top of Slither’s CFG | Tam Bang, Hoang H Nguyen, Dung Nguyen, Toan Trieu, Tho Quan | IJMLC 20
[ETHPLOIT: From Fuzzing to Efficient Exploit Generation against Smart Contracts](https://wcventure.github.io/FuzzingPaper/Paper/SANER20_ETHPLOIT.pdf) | Leverage data dependency through Slither | Qingzhao Zhang, Yizhuo Wang, Juanru Li, Siqi Ma | SANER 20 | -
[Verification of Ethereum Smart Contracts: A Model Checking Approach](http://www.ijmlc.org/vol10/977-AM0059.pdf) | Symbolic execution built on top of Slither’s CFG | Tam Bang, Hoang H Nguyen, Dung Nguyen, Toan Trieu, Tho Quan | IJMLC 20 | -
[Smart Contract Repair](https://arxiv.org/pdf/1912.05823.pdf) | Rely on Slither’s vulnerabilities detectors | Xiao Liang Yu, Omar Al-Bataineh, David Lo, Abhik Roychoudhury | TOSEM 20 | [SCRepair](https://github.com/xiaoly8/SCRepair/)
[Demystifying Loops in Smart Contracts](https://www.microsoft.com/en-us/research/uploads/prod/2020/08/loops_solidity__camera_ready-5f3fec3f15c69.pdf) | Leverage data dependency through Slither | Ben Mariano, Yanju Chen, Yu Feng, Shuvendu Lahiri, Isil Dillig | ASE 20
[Trace-Based Dynamic Gas Estimation of Loops in Smart Contracts](https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=9268144) | Use Slither’s CFG to detect loops | Chunmiao Li, Shijie Nie, Yang Cao, Yijun Yu, Zhenjiang Hu | IEEE Open J. Comput. Soc. 1 (2020)
[Demystifying Loops in Smart Contracts](https://www.microsoft.com/en-us/research/uploads/prod/2020/08/loops_solidity__camera_ready-5f3fec3f15c69.pdf) | Leverage data dependency through Slither | Ben Mariano, Yanju Chen, Yu Feng, Shuvendu Lahiri, Isil Dillig | ASE 20 | -
[Trace-Based Dynamic Gas Estimation of Loops in Smart Contracts](https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=9268144) | Use Slither’s CFG to detect loops | Chunmiao Li, Shijie Nie, Yang Cao, Yijun Yu, Zhenjiang Hu | IEEE Open J. Comput. Soc. 1 (2020) | -
[SAILFISH: Vetting Smart Contract State-Inconsistency Bugs in Seconds](https://arxiv.org/pdf/2104.08638.pdf) | Rely on SlithIR to build a *storage dependency graph* | Priyanka Bose, Dipanjan Das, Yanju Chen, Yu Feng, Christopher Kruegel, and Giovanni Vigna | S&P 22 | [Sailfish](https://github.com/ucsb-seclab/sailfish)
[SolType: Refinement Types for Arithmetic Overflow in Solidity](https://arxiv.org/abs/2110.00677) | Use Slither as frontend to build refinement type system | Bryan Tan, Benjamin Mariano, Shuvendu K. Lahiri, Isil Dillig, Yu Feng | POPL 22
[Do Not Rug on Me: Leveraging Machine Learning Techniques for Automated Scam Detection](https://www.mdpi.com/2227-7390/10/6/949) | Use Slither to extract tokens' features (mintable, pausable, ..) | Mazorra, Bruno, Victor Adan, and Vanesa Daza | Mathematics 10.6 (2022)
[SolType: Refinement Types for Arithmetic Overflow in Solidity](https://arxiv.org/abs/2110.00677) | Use Slither as frontend to build refinement type system | Bryan Tan, Benjamin Mariano, Shuvendu K. Lahiri, Isil Dillig, Yu Feng | POPL 22 | -
[Do Not Rug on Me: Leveraging Machine Learning Techniques for Automated Scam Detection](https://www.mdpi.com/2227-7390/10/6/949) | Use Slither to extract tokens' features (mintable, pausable, ..) | Mazorra, Bruno, Victor Adan, and Vanesa Daza | Mathematics 10.6 (2022) | -
[MANDO: Multi-Level Heterogeneous Graph Embeddings for Fine-Grained Detection of Smart Contract Vulnerabilities](https://arxiv.org/abs/2208.13252) | Use Slither to extract the CFG and call graph | Hoang Nguyen, Nhat-Minh Nguyen, Chunyao Xie, Zahra Ahmadi, Daniel Kudendo, Thanh-Nam Doan and Lingxiao Jiang| IEEE 9th International Conference on Data Science and Advanced Analytics (DSAA, 2022) | [ge-sc](https://github.com/MANDO-Project/ge-sc)
[Automated Auditing of Price Gouging TOD Vulnerabilities in Smart Contracts](https://www.cs.toronto.edu/~fanl/papers/price-icbc22.pdf) | Use Slither to extract the CFG and data dependencies| Sidi Mohamed Beillahi, Eric Keilty, Keerthi Nelaturu, Andreas Veneris, and Fan Long | 2022 IEEE International Conference on Blockchain and Cryptocurrency (ICBC) | [Smart-Contract-Repair](https://github.com/Veneris-Group/TOD-Location-Rectification)

Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ missing-module-docstring,
missing-class-docstring,
missing-function-docstring,
unnecessary-lambda,
bad-continuation,
cyclic-import,
line-too-long,
invalid-name,
Expand All @@ -18,5 +17,6 @@ logging-fstring-interpolation,
logging-not-lazy,
duplicate-code,
import-error,
unsubscriptable-object
unsubscriptable-object,
unnecessary-lambda-assignment
"""
Empty file modified scripts/ci_test_interface.sh
100644 → 100755
Empty file.
28 changes: 28 additions & 0 deletions scripts/update_buggy_versions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import json
from pathlib import Path
import urllib.request


def retrieve_json(url):
with urllib.request.urlopen(url) as response:
data = response.read().decode("utf-8")
return json.loads(data)


def organize_data(json_data):
version_bugs = {}
for version, info in json_data.items():
version_bugs[version] = info["bugs"]
return version_bugs


if __name__ == "__main__":
bug_list_url = (
"https://raw.githubusercontent.com/ethereum/solidity/develop/docs/bugs_by_version.json"
)
bug_data = retrieve_json(bug_list_url)
bugs_by_version = organize_data(bug_data)

with open(Path.cwd() / Path("slither/utils/buggy_versions.py"), "w", encoding="utf-8") as file:
file.write("# pylint: disable=too-many-lines\n")
file.write(f"bugs_by_version = {bugs_by_version}")
Loading
Loading