mirror of https://github.com/crytic/slither
commit
ef2b707675
@ -0,0 +1,46 @@ |
|||||||
|
name: docs |
||||||
|
|
||||||
|
on: |
||||||
|
# Runs on pushes targeting the default branch |
||||||
|
push: |
||||||
|
branches: ["master"] |
||||||
|
|
||||||
|
# Allows you to run this workflow manually from the Actions tab |
||||||
|
workflow_dispatch: |
||||||
|
|
||||||
|
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages |
||||||
|
permissions: |
||||||
|
contents: read |
||||||
|
pages: write |
||||||
|
id-token: write |
||||||
|
|
||||||
|
# Allow one concurrent deployment |
||||||
|
concurrency: |
||||||
|
group: "pages" |
||||||
|
cancel-in-progress: true |
||||||
|
|
||||||
|
jobs: |
||||||
|
# Single deploy job since we're just deploying |
||||||
|
build: |
||||||
|
environment: |
||||||
|
name: github-pages |
||||||
|
url: ${{ steps.deployment.outputs.page_url }} |
||||||
|
runs-on: ubuntu-latest |
||||||
|
steps: |
||||||
|
- name: Checkout |
||||||
|
uses: actions/checkout@v3 |
||||||
|
- name: Setup Pages |
||||||
|
uses: actions/configure-pages@v3 |
||||||
|
- uses: actions/setup-python@v4 |
||||||
|
with: |
||||||
|
python-version: '3.8' |
||||||
|
- run: pip install -e ".[dev]" |
||||||
|
- run: pdoc -o docs/ slither '!slither.tools' #TODO fix import errors on pdoc run |
||||||
|
- name: Upload artifact |
||||||
|
uses: actions/upload-pages-artifact@v1 |
||||||
|
with: |
||||||
|
# Upload the doc |
||||||
|
path: 'docs/' |
||||||
|
- name: Deploy to GitHub Pages |
||||||
|
id: deployment |
||||||
|
uses: actions/deploy-pages@v1 |
@ -0,0 +1,17 @@ |
|||||||
|
contract Uninitialized{ |
||||||
|
|
||||||
|
struct St{ |
||||||
|
uint a; |
||||||
|
} |
||||||
|
|
||||||
|
function bad() internal returns (St storage ret){ |
||||||
|
ret = ret; |
||||||
|
ret.a += 1; |
||||||
|
} |
||||||
|
|
||||||
|
function ok(St storage ret) internal { |
||||||
|
ret = ret; |
||||||
|
ret.a += 1; |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,90 @@ |
|||||||
|
[ |
||||||
|
[ |
||||||
|
{ |
||||||
|
"elements": [ |
||||||
|
{ |
||||||
|
"type": "variable", |
||||||
|
"name": "ret", |
||||||
|
"source_mapping": { |
||||||
|
"start": 100, |
||||||
|
"length": 14, |
||||||
|
"filename_relative": "tests/detectors/uninitialized-storage/0.8.19/uninitialized_storage_pointer.sol", |
||||||
|
"filename_absolute": "/GENERIC_PATH", |
||||||
|
"filename_short": "tests/detectors/uninitialized-storage/0.8.19/uninitialized_storage_pointer.sol", |
||||||
|
"is_dependency": false, |
||||||
|
"lines": [ |
||||||
|
7 |
||||||
|
], |
||||||
|
"starting_column": 38, |
||||||
|
"ending_column": 52 |
||||||
|
}, |
||||||
|
"type_specific_fields": { |
||||||
|
"parent": { |
||||||
|
"type": "function", |
||||||
|
"name": "bad", |
||||||
|
"source_mapping": { |
||||||
|
"start": 67, |
||||||
|
"length": 95, |
||||||
|
"filename_relative": "tests/detectors/uninitialized-storage/0.8.19/uninitialized_storage_pointer.sol", |
||||||
|
"filename_absolute": "/GENERIC_PATH", |
||||||
|
"filename_short": "tests/detectors/uninitialized-storage/0.8.19/uninitialized_storage_pointer.sol", |
||||||
|
"is_dependency": false, |
||||||
|
"lines": [ |
||||||
|
7, |
||||||
|
8, |
||||||
|
9, |
||||||
|
10 |
||||||
|
], |
||||||
|
"starting_column": 5, |
||||||
|
"ending_column": 6 |
||||||
|
}, |
||||||
|
"type_specific_fields": { |
||||||
|
"parent": { |
||||||
|
"type": "contract", |
||||||
|
"name": "Uninitialized", |
||||||
|
"source_mapping": { |
||||||
|
"start": 0, |
||||||
|
"length": 262, |
||||||
|
"filename_relative": "tests/detectors/uninitialized-storage/0.8.19/uninitialized_storage_pointer.sol", |
||||||
|
"filename_absolute": "/GENERIC_PATH", |
||||||
|
"filename_short": "tests/detectors/uninitialized-storage/0.8.19/uninitialized_storage_pointer.sol", |
||||||
|
"is_dependency": false, |
||||||
|
"lines": [ |
||||||
|
1, |
||||||
|
2, |
||||||
|
3, |
||||||
|
4, |
||||||
|
5, |
||||||
|
6, |
||||||
|
7, |
||||||
|
8, |
||||||
|
9, |
||||||
|
10, |
||||||
|
11, |
||||||
|
12, |
||||||
|
13, |
||||||
|
14, |
||||||
|
15, |
||||||
|
16, |
||||||
|
17 |
||||||
|
], |
||||||
|
"starting_column": 1, |
||||||
|
"ending_column": 2 |
||||||
|
} |
||||||
|
}, |
||||||
|
"signature": "bad()" |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
], |
||||||
|
"description": "Uninitialized.bad().ret (tests/detectors/uninitialized-storage/0.8.19/uninitialized_storage_pointer.sol#7) is a storage variable never initialized\n", |
||||||
|
"markdown": "[Uninitialized.bad().ret](tests/detectors/uninitialized-storage/0.8.19/uninitialized_storage_pointer.sol#L7) is a storage variable never initialized\n", |
||||||
|
"first_markdown_element": "tests/detectors/uninitialized-storage/0.8.19/uninitialized_storage_pointer.sol#L7", |
||||||
|
"id": "979d28e501693ed7ece0d429e7c30266f8e9d6a2e2eedc87006c4bad63e78706", |
||||||
|
"check": "uninitialized-storage", |
||||||
|
"impact": "High", |
||||||
|
"confidence": "High" |
||||||
|
} |
||||||
|
] |
||||||
|
] |
Loading…
Reference in new issue