Skip to content

Commit 167dc5b

Browse files
committed
Merge branch 'dev' into dev-echidna
2 parents c23b8fe + 280a710 commit 167dc5b

File tree

953 files changed

+8515
-4588
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

953 files changed

+8515
-4588
lines changed

.github/workflows/black.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626

2727
steps:
2828
- name: Checkout Code
29-
uses: actions/checkout@v3
29+
uses: actions/checkout@v4
3030
with:
3131
# Full git history is needed to get a proper list of changed files within `super-linter`
3232
fetch-depth: 0

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
- os: windows-2022
5454
type: truffle
5555
steps:
56-
- uses: actions/checkout@v3
56+
- uses: actions/checkout@v4
5757
- name: Set up Python ${{ matrix.python }}
5858
uses: actions/setup-python@v4
5959
with:
@@ -67,7 +67,7 @@ jobs:
6767
6868
- name: Set up nix
6969
if: matrix.type == 'dapp'
70-
uses: cachix/install-nix-action@v22
70+
uses: cachix/install-nix-action@v23
7171

7272
- name: Set up cachix
7373
if: matrix.type == 'dapp'

.github/workflows/docker.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- name: Checkout
20-
uses: actions/checkout@v3
20+
uses: actions/checkout@v4
2121

2222
- name: Set up QEMU
23-
uses: docker/setup-qemu-action@v2
23+
uses: docker/setup-qemu-action@v3
2424

2525
- name: Set up Docker Buildx
26-
uses: docker/setup-buildx-action@v2
26+
uses: docker/setup-buildx-action@v3
2727
id: buildx
2828
with:
2929
install: true
@@ -40,14 +40,14 @@ jobs:
4040
type=edge
4141
4242
- name: GitHub Container Registry Login
43-
uses: docker/login-action@v2
43+
uses: docker/login-action@v3
4444
with:
4545
registry: ghcr.io
4646
username: ${{ github.actor }}
4747
password: ${{ secrets.GITHUB_TOKEN }}
4848

4949
- name: Docker Build and Push
50-
uses: docker/build-push-action@v4
50+
uses: docker/build-push-action@v5
5151
with:
5252
platforms: linux/amd64,linux/arm64/v8,linux/arm/v7
5353
target: final

.github/workflows/docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
runs-on: ubuntu-latest
2929
steps:
3030
- name: Checkout
31-
uses: actions/checkout@v3
31+
uses: actions/checkout@v4
3232
- name: Setup Pages
3333
uses: actions/configure-pages@v3
3434
- uses: actions/setup-python@v4
@@ -37,7 +37,7 @@ jobs:
3737
- run: pip install -e ".[doc]"
3838
- run: pdoc -o html/ slither '!slither.tools' #TODO fix import errors on pdoc run
3939
- name: Upload artifact
40-
uses: actions/upload-pages-artifact@v1
40+
uses: actions/upload-pages-artifact@v2
4141
with:
4242
# Upload the doc
4343
path: './html/'

.github/workflows/doctor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- os: windows-2022
3030
python: 3.8
3131
steps:
32-
- uses: actions/checkout@v3
32+
- uses: actions/checkout@v4
3333

3434
- name: Set up Python ${{ matrix.python }}
3535
uses: actions/setup-python@v4

.github/workflows/linter.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ defaults:
99
on:
1010
pull_request:
1111
branches: [master, dev]
12-
paths:
13-
- "**/*.py"
1412

1513
schedule:
1614
# run CI every day even if no PRs/merges occur
@@ -27,7 +25,7 @@ jobs:
2725

2826
steps:
2927
- name: Checkout Code
30-
uses: actions/checkout@v3
28+
uses: actions/checkout@v4
3129
with:
3230
# Full git history is needed to get a proper list of changed files within `super-linter`
3331
fetch-depth: 0
@@ -42,6 +40,10 @@ jobs:
4240
mkdir -p .github/linters
4341
cp pyproject.toml .github/linters
4442
43+
- name: Register yamllint problem matcher
44+
run: |
45+
echo "::add-matcher::.github/workflows/matchers/yamllint.json"
46+
4547
- name: Lint everything else
4648
uses: super-linter/super-linter/slim@v4.9.2
4749
if: always()
@@ -55,7 +57,6 @@ jobs:
5557
VALIDATE_PYTHON_PYLINT: false
5658
VALIDATE_PYTHON_BLACK: false
5759
VALIDATE_PYTHON_ISORT: false
58-
# Always false
5960
VALIDATE_JSON: false
6061
VALIDATE_JAVASCRIPT_STANDARD: false
6162
VALIDATE_PYTHON_FLAKE8: false
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"problemMatcher": [
3+
{
4+
"owner": "pylint-error",
5+
"severity": "error",
6+
"pattern": [
7+
{
8+
"regexp": "^(.+):(\\d+):(\\d+):\\s(([EF]\\d{4}):\\s.+)$",
9+
"file": 1,
10+
"line": 2,
11+
"column": 3,
12+
"message": 4,
13+
"code": 5
14+
}
15+
]
16+
},
17+
{
18+
"owner": "pylint-warning",
19+
"severity": "warning",
20+
"pattern": [
21+
{
22+
"regexp": "^(.+):(\\d+):(\\d+):\\s(([CRW]\\d{4}):\\s.+)$",
23+
"file": 1,
24+
"line": 2,
25+
"column": 3,
26+
"message": 4,
27+
"code": 5
28+
}
29+
]
30+
}
31+
]
32+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"problemMatcher": [
3+
{
4+
"owner": "yamllint",
5+
"pattern": [
6+
{
7+
"regexp": "^(.*\\.ya?ml)$",
8+
"file": 1
9+
},
10+
{
11+
"regexp": "^\\s{2}(\\d+):(\\d+)\\s+(error|warning)\\s+(.*?)\\s+\\((.*)\\)$",
12+
"line": 1,
13+
"column": 2,
14+
"severity": 3,
15+
"message": 4,
16+
"code": 5,
17+
"loop": true
18+
}
19+
]
20+
}
21+
]
22+
}

.github/workflows/pip-audit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818

1919
steps:
2020
- name: Checkout repository
21-
uses: actions/checkout@v3
21+
uses: actions/checkout@v4
2222

2323
- name: Install Python
2424
uses: actions/setup-python@v4

.github/workflows/publish.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111

1212
steps:
13-
- uses: actions/checkout@v3
13+
- uses: actions/checkout@v4
1414

1515
- name: Set up Python
1616
uses: actions/setup-python@v4
@@ -44,11 +44,10 @@ jobs:
4444
path: dist/
4545

4646
- name: publish
47-
uses: pypa/gh-action-pypi-publish@v1.8.7
47+
uses: pypa/gh-action-pypi-publish@v1.8.10
4848

4949
- name: sign
50-
uses: sigstore/gh-action-sigstore-python@v1.2.3
50+
uses: sigstore/gh-action-sigstore-python@v2.1.0
5151
with:
5252
inputs: ./dist/*.tar.gz ./dist/*.whl
5353
release-signing-artifacts: true
54-
bundle-only: true

.github/workflows/pylint.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ defaults:
99
on:
1010
pull_request:
1111
branches: [master, dev]
12+
paths:
13+
- "**/*.py"
1214

1315
concurrency:
1416
group: ${{ github.workflow }}-${{ github.ref }}
@@ -21,7 +23,7 @@ jobs:
2123

2224
steps:
2325
- name: Checkout Code
24-
uses: actions/checkout@v3
26+
uses: actions/checkout@v4
2527
with:
2628
# Full git history is needed to get a proper list of changed files within `super-linter`
2729
fetch-depth: 0
@@ -36,6 +38,10 @@ jobs:
3638
mkdir -p .github/linters
3739
cp pyproject.toml .github/linters
3840
41+
- name: Register pylint problem matcher
42+
run: |
43+
echo "::add-matcher::.github/workflows/matchers/pylint.json"
44+
3945
- name: Pylint
4046
uses: super-linter/super-linter/slim@v4.9.2
4147
if: always()

.github/workflows/test.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
type: ["unit", "integration", "tool"]
2828
python: ${{ (github.event_name == 'pull_request' && fromJSON('["3.8", "3.11"]')) || fromJSON('["3.8", "3.9", "3.10", "3.11"]') }}
2929
steps:
30-
- uses: actions/checkout@v3
30+
- uses: actions/checkout@v4
3131
- name: Set up Python ${{ matrix.python }}
3232
uses: actions/setup-python@v4
3333
with:
@@ -57,7 +57,23 @@ jobs:
5757
npm install hardhat
5858
popd || exit
5959
fi
60-
60+
- name: Install Vyper
61+
run: |
62+
INSTALLDIR="$RUNNER_TEMP/vyper-install"
63+
if [[ "$RUNNER_OS" = "Windows" ]]; then
64+
URL="https://github.com/vyperlang/vyper/releases/download/v0.3.7/vyper.0.3.7+commit.6020b8bb.windows.exe"
65+
FILENAME="vyper.exe"
66+
elif [[ "$RUNNER_OS" = "Linux" ]]; then
67+
URL="https://github.com/vyperlang/vyper/releases/download/v0.3.7/vyper.0.3.7+commit.6020b8bb.linux"
68+
FILENAME="vyper"
69+
else
70+
echo "Unknown OS"
71+
exit 1
72+
fi
73+
mkdir -p "$INSTALLDIR"
74+
curl "$URL" -o "$INSTALLDIR/$FILENAME" -L
75+
chmod 755 "$INSTALLDIR/$FILENAME"
76+
echo "$INSTALLDIR" >> "$GITHUB_PATH"
6177
- name: Run ${{ matrix.type }} tests
6278
env:
6379
TEST_TYPE: ${{ matrix.type }}
@@ -84,7 +100,7 @@ jobs:
84100
runs-on: ubuntu-latest
85101

86102
steps:
87-
- uses: actions/checkout@v3
103+
- uses: actions/checkout@v4
88104
- name: Set up Python 3.8
89105
uses: actions/setup-python@v4
90106
with:

CITATION.cff

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
cff-version: 1.2.0
2+
title: Slither Analyzer
3+
message: >-
4+
If you use this software, please cite it using the
5+
metadata from this file.
6+
type: software
7+
authors:
8+
- given-names: Josselin
9+
family-names: Feist
10+
- given-names: Gustavo
11+
family-names: Grieco
12+
- given-names: Alex
13+
family-names: Groce
14+
identifiers:
15+
- type: doi
16+
value: 10.48550/arXiv.1908.09878
17+
description: arXiv.1908.09878
18+
- type: url
19+
value: 'https://arxiv.org/abs/1908.09878'
20+
description: arxiv
21+
- type: doi
22+
value: 10.1109/wetseb.2019.00008
23+
repository-code: 'https://github.com/crytic/slither'
24+
url: 'https://www.trailofbits.com/'
25+
repository-artifact: 'https://github.com/crytic/slither/releases'
26+
abstract: >-
27+
Slither is a static analysis framework designed to provide
28+
rich information about Ethereum smart contracts.
29+
30+
It works by converting Solidity smart contracts into an
31+
intermediate representation called SlithIR.
32+
33+
SlithIR uses Static Single Assignment (SSA) form and a
34+
reduced instruction set to ease implementation of analyses
35+
while preserving semantic information that would be lost
36+
in transforming Solidity to bytecode.
37+
38+
Slither allows for the application of commonly used
39+
program analysis techniques like dataflow and taint
40+
tracking.
41+
42+
43+
Our framework has four main use cases:
44+
45+
(1) automated detection of vulnerabilities,
46+
47+
(2) automated detection of code optimization
48+
opportunities,
49+
50+
(3) improvement of the user's understanding of the
51+
contracts, and
52+
53+
(4) assistance with code review.
54+
keywords:
55+
- Ethereum
56+
- Static Analysis
57+
- Smart contracts
58+
- EVM
59+
- bug detection
60+
- Software Engineering
61+
license: AGPL-3.0-only
62+
commit: 3d4f934d3228f072b7df2c5e7252c64df4601bc8
63+
version: 0.9.5
64+
date-released: '2023-06-28'

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ For each new detector, at least one regression tests must be present.
9696
#### Adding parsing tests
9797

9898
1. Create a test in `tests/e2e/solc_parsing/`
99-
2. Run `python tests/e2e/solc_parsing/test_ast_parsing.py --compile`. This will compile the artifact in `tests/e2e/solc_parsing/compile`. Add the compiled artifact to git.
100-
3. Update `ALL_TESTS` in `tests/e2e/solc_parsing/test_ast_parsing.py`.
99+
2. Update `ALL_TESTS` in `tests/e2e/solc_parsing/test_ast_parsing.py`.
100+
3. Run `python tests/e2e/solc_parsing/test_ast_parsing.py --compile`. This will compile the artifact in `tests/e2e/solc_parsing/compile`. Add the compiled artifact to git.
101101
4. Run `python tests/e2e/solc_parsing/test_ast_parsing.py --generate`. This will generate the json artifacts in `tests/e2e/solc_parsing/expected_json`. Add the generated files to git.
102102
5. Run `pytest tests/e2e/solc_parsing/test_ast_parsing.py` and check that everything worked.
103103

0 commit comments

Comments
 (0)