solflow 0.11.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- solflow-0.11.2.dist-info/METADATA +115 -0
- solflow-0.11.2.dist-info/RECORD +33 -0
- solflow-0.11.2.dist-info/WHEEL +5 -0
- solflow-0.11.2.dist-info/entry_points.txt +2 -0
- solflow-0.11.2.dist-info/licenses/LICENSE +661 -0
- solflow-0.11.2.dist-info/top_level.txt +1 -0
- solidity_flow_navigator/__init__.py +1 -0
- solidity_flow_navigator/__main__.py +8 -0
- solidity_flow_navigator/analysis/__init__.py +1 -0
- solidity_flow_navigator/analysis/compile.py +43 -0
- solidity_flow_navigator/analysis/slither_facts.py +410 -0
- solidity_flow_navigator/analysis/types.py +170 -0
- solidity_flow_navigator/cli.py +435 -0
- solidity_flow_navigator/flow/__init__.py +1 -0
- solidity_flow_navigator/flow/builder.py +949 -0
- solidity_flow_navigator/flow/config.py +187 -0
- solidity_flow_navigator/flow/modifiers.py +53 -0
- solidity_flow_navigator/flow/scope.py +148 -0
- solidity_flow_navigator/flow/types.py +174 -0
- solidity_flow_navigator/flow/virtual_dispatch.py +70 -0
- solidity_flow_navigator/serve/__init__.py +1 -0
- solidity_flow_navigator/serve/app.py +390 -0
- solidity_flow_navigator/serve/highlight.py +98 -0
- solidity_flow_navigator/serve/serializer.py +80 -0
- solidity_flow_navigator/serve/static/css/main.css +879 -0
- solidity_flow_navigator/serve/static/js/flow-progressive.js +1644 -0
- solidity_flow_navigator/serve/static/vendor/LICENSES.md +20 -0
- solidity_flow_navigator/serve/static/vendor/d3.min.js +2 -0
- solidity_flow_navigator/serve/static/vendor/dagre.min.js +801 -0
- solidity_flow_navigator/serve/templates/base.html +24 -0
- solidity_flow_navigator/serve/templates/flow.html +62 -0
- solidity_flow_navigator/serve/templates/index.html +119 -0
- solidity_flow_navigator/serve/templates/not_found.html +15 -0
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: solflow
|
|
3
|
+
Version: 0.11.2
|
|
4
|
+
Summary: Per-entry-point navigable call-graph visualizations of Solidity repositories, for Web3 security auditors.
|
|
5
|
+
Author: Norah
|
|
6
|
+
License-Expression: AGPL-3.0-only
|
|
7
|
+
Project-URL: Repository, https://github.com/norah1499/solidity-flow-navigator
|
|
8
|
+
Project-URL: Issues, https://github.com/norah1499/solidity-flow-navigator/issues
|
|
9
|
+
Keywords: solidity,security,audit,static-analysis,slither
|
|
10
|
+
Classifier: Development Status :: 3 - Alpha
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
17
|
+
Classifier: Topic :: Security
|
|
18
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
19
|
+
Requires-Python: >=3.11
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
License-File: LICENSE
|
|
22
|
+
Requires-Dist: slither-analyzer<0.12,>=0.11.5
|
|
23
|
+
Requires-Dist: Flask<4.0,>=3.0
|
|
24
|
+
Requires-Dist: Pygments<3.0,>=2.17
|
|
25
|
+
Requires-Dist: pathspec<2,>=1.1.1
|
|
26
|
+
Provides-Extra: dev
|
|
27
|
+
Requires-Dist: pytest<9.0,>=8.0; extra == "dev"
|
|
28
|
+
Requires-Dist: black<27,>=26; extra == "dev"
|
|
29
|
+
Requires-Dist: ruff>=0.5; extra == "dev"
|
|
30
|
+
Dynamic: license-file
|
|
31
|
+
|
|
32
|
+
# SolFlow (Solidity Flow Navigator)
|
|
33
|
+
|
|
34
|
+
[](https://github.com/norah1499/solidity-flow-navigator/actions/workflows/ci.yml)
|
|
35
|
+
|
|
36
|
+
**Read a contract the way it executes, not the way its files are organized.**
|
|
37
|
+
|
|
38
|
+
SolFlow compiles a Solidity repository, extracts call-graph facts with [Slither](https://github.com/crytic/slither), and serves one interactive call-flow visualization per external entry point. Every panel shows the function's real source. Built for smart contract auditing.
|
|
39
|
+
|
|
40
|
+

|
|
41
|
+
|
|
42
|
+
*SolFlow on [Morpho Blue](https://github.com/morpho-org/morpho-blue): the entry-point index, the fully expanded `liquidate` flow, and the same flow zoomed to source level. Pausable stills are under [Screenshots](#screenshots).*
|
|
43
|
+
|
|
44
|
+
## Why
|
|
45
|
+
|
|
46
|
+
The first job in any audit is reconstructing what actually happens when someone calls an entry point. The answer is scattered across base contracts, libraries, and modifiers in a dozen files. SolFlow lays it out as a graph you can read:
|
|
47
|
+
|
|
48
|
+
- **One Flow per entry point.** The index lists every externally callable function, grouped by contract and split into mutating vs read-only, with modifier badges, call-tree depth, and unresolved-target counts per entry: the whole audit surface on one page.
|
|
49
|
+
- **Real source, not boxes.** Every node renders the target function's actual code, syntax-highlighted and line-numbered. Click a call site and the callee expands beside it, the edge anchored to the exact line that makes the call.
|
|
50
|
+
- **It never silently lies.** When a call target can't be resolved statically (an interface with no bound implementation, `addr.call(...)`, computed-target Yul), the node is explicitly marked unresolved, with the reason. No guessing, no silent omissions.
|
|
51
|
+
- **Local and private.** Analysis runs entirely on your machine and the server binds only to `127.0.0.1`. Audit code is never uploaded anywhere.
|
|
52
|
+
|
|
53
|
+
SolFlow is **not a vulnerability scanner**. It emits no findings and makes no security claims. It shows you the code's shape so you can find the problems faster.
|
|
54
|
+
|
|
55
|
+
## Install
|
|
56
|
+
|
|
57
|
+
Requires Python 3.11+ and a `solc` matching your target, via [solc-select](https://github.com/crytic/solc-select) (Slither needs it to compile):
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
pipx install solflow
|
|
61
|
+
pipx install solc-select
|
|
62
|
+
solc-select install <version> && solc-select use <version>
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
For the latest development version instead: `pipx install git+https://github.com/norah1499/solidity-flow-navigator`.
|
|
66
|
+
|
|
67
|
+
## Use
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
solflow path/to/your/solidity/project
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Point it at the repository root, where Slither can resolve dependencies. SolFlow compiles the project, binds `127.0.0.1:8080` (or the next free port), and prints the URL.
|
|
74
|
+
|
|
75
|
+
Compilation goes through [crytic-compile](https://github.com/crytic/crytic-compile), so any build system it detects should work (Foundry, Hardhat, Truffle, Brownie, plain solc); Foundry projects are what SolFlow is tested against. If compilation fails, SolFlow prints the compiler error verbatim and exits without producing anything. No partial Flows, by design: a half-compiled picture would silently mislead. The usual fix is matching the project's pragma with `solc-select use <version>`.
|
|
76
|
+
|
|
77
|
+
Useful flags (run `solflow --help` for the full reference, grouped into **Scope**, **Resolution**, **Rendering**, and **Server**):
|
|
78
|
+
|
|
79
|
+
| Flag | What it does |
|
|
80
|
+
|------|--------------|
|
|
81
|
+
| `--expand-all` | Open every Flow fully expanded, for a bird's-eye view |
|
|
82
|
+
| `--exclude-path GLOB`, `--exclude-contract PATTERN` | Narrow which contracts produce Flows |
|
|
83
|
+
| `--inline-library NAME` | Recurse into a `lib/<NAME>/` dependency instead of stubbing it |
|
|
84
|
+
| `--port N` | Bind a specific port |
|
|
85
|
+
|
|
86
|
+
## Screenshots
|
|
87
|
+
|
|
88
|
+
<details>
|
|
89
|
+
<summary>Stills from the demo above (Morpho Blue)</summary>
|
|
90
|
+
|
|
91
|
+
The index lists every external entry point of the analyzed repository:
|
|
92
|
+
|
|
93
|
+

|
|
94
|
+
|
|
95
|
+
Opening an entry point renders its full call flow; every callee panel shows the real source:
|
|
96
|
+
|
|
97
|
+

|
|
98
|
+
|
|
99
|
+

|
|
100
|
+
|
|
101
|
+
</details>
|
|
102
|
+
|
|
103
|
+
## Contributing
|
|
104
|
+
|
|
105
|
+
Issues and pull requests are welcome. Before opening a PR, make sure these pass:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
pytest
|
|
109
|
+
black --check .
|
|
110
|
+
ruff check
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## License
|
|
114
|
+
|
|
115
|
+
AGPL-3.0, and not a free choice: SolFlow builds on Slither and crytic-compile, both AGPL-3.0. If you host an instance for others, the license requires offering them the source; the index footer links back here.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
solflow-0.11.2.dist-info/licenses/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
|
|
2
|
+
solidity_flow_navigator/__init__.py,sha256=7cwnSFUWrLiAQr6_ho7CHtrKP0TFZfGwlJpmzci3Vx8,99
|
|
3
|
+
solidity_flow_navigator/__main__.py,sha256=lM0tiA92uu63BRwTttlcH6oMDucZWrkjrfLdc2NoSiA,167
|
|
4
|
+
solidity_flow_navigator/cli.py,sha256=B7VFP_rhbF6DbIfArFuyEyhIudsc0CFfWQj4YEegDIw,17149
|
|
5
|
+
solidity_flow_navigator/analysis/__init__.py,sha256=t_Zgnan_dbriztTbKVOzxmZMfEWnwyELQnpAYT5M-YU,89
|
|
6
|
+
solidity_flow_navigator/analysis/compile.py,sha256=5wUjrNjZrIGlYkPFIO00RcUcKjgVgGnLd_ToM-lZ3FQ,1497
|
|
7
|
+
solidity_flow_navigator/analysis/slither_facts.py,sha256=sFi-uKe60qSqzf8jkeN9Y60C37WNXOfnFbN4EImNttI,15543
|
|
8
|
+
solidity_flow_navigator/analysis/types.py,sha256=vb19H3STWaT98vCYTRA_4iMPP3EdkhtM_BPnuFFdJpU,7523
|
|
9
|
+
solidity_flow_navigator/flow/__init__.py,sha256=Efxs3wlaKyl9NDLF-NCJrZbAJTaMQuPPJrLfsCIqgJ4,130
|
|
10
|
+
solidity_flow_navigator/flow/builder.py,sha256=cnsqSlae3mWUEBHGgFqtZA5czxpwWSoaPXgu_1tM44g,42444
|
|
11
|
+
solidity_flow_navigator/flow/config.py,sha256=r0S2HQNfL_DQQuZtr9Loq_7kOQuimT4VSmrvCODiMvk,7157
|
|
12
|
+
solidity_flow_navigator/flow/modifiers.py,sha256=yUL9G5EjukqMI6FgdzhpKbwDiF3fQmy6Umgy6ZpePNM,2011
|
|
13
|
+
solidity_flow_navigator/flow/scope.py,sha256=WeMZgJpceehImto5r2AABf22MyOegT7WtRk9DGyGAX8,6142
|
|
14
|
+
solidity_flow_navigator/flow/types.py,sha256=b-PUH9aAIXD8K_qEDFcy45VykO8wwynMP234l_guDSc,7542
|
|
15
|
+
solidity_flow_navigator/flow/virtual_dispatch.py,sha256=w36I_8rsQZW6yQ9otO3fXsrh2Z-qaujYrTlVRPVwFt8,2988
|
|
16
|
+
solidity_flow_navigator/serve/__init__.py,sha256=nJWwi_cYToGl6ErHp6K-1ymKJUpB1TGS14mh1o5PeQ4,127
|
|
17
|
+
solidity_flow_navigator/serve/app.py,sha256=uBqCAGPx96QP-m6JmW1z0LmFQQctNqBSAUo985VAglE,16198
|
|
18
|
+
solidity_flow_navigator/serve/highlight.py,sha256=itRhQMVU15DKgIQ1rkFR71ZnlUldbi7T9DM2Y0TlUr4,4290
|
|
19
|
+
solidity_flow_navigator/serve/serializer.py,sha256=SBa5XMMFX8t4eS17NPBkcztoXq00jYKeOxFZGopeL-8,3576
|
|
20
|
+
solidity_flow_navigator/serve/static/css/main.css,sha256=IKyiPnMkO1XLZWK9BMeFzR3jy3AGJyY4hHB6kIPJh2w,23930
|
|
21
|
+
solidity_flow_navigator/serve/static/js/flow-progressive.js,sha256=0s1_vI1D-QVveN_Jo_8FeRP33BBCL9_r-ruInnG4ark,70357
|
|
22
|
+
solidity_flow_navigator/serve/static/vendor/LICENSES.md,sha256=AOHxz1uMWqErCDjhss7Px2YuSlMkriaGpjr7zBH69mQ,947
|
|
23
|
+
solidity_flow_navigator/serve/static/vendor/d3.min.js,sha256=8glLv2FBs1lyLE_kVOtsSw8OQswQzHr5IfwVj864ZTk,279706
|
|
24
|
+
solidity_flow_navigator/serve/static/vendor/dagre.min.js,sha256=LN6CuvC5IywAqhOTKUX_kqF_sIxohaY1WSMwpMLFZ8U,96038
|
|
25
|
+
solidity_flow_navigator/serve/templates/base.html,sha256=iTRYVa58yavpjMf73QLytb_hLB_Sxe4L94yfmM-Qt4Q,966
|
|
26
|
+
solidity_flow_navigator/serve/templates/flow.html,sha256=boTNBxNuiB5R_st6McBt7P-vO7mD3-yLCI1BOHm30-8,2783
|
|
27
|
+
solidity_flow_navigator/serve/templates/index.html,sha256=vmL2jGazT2w3Jkmfli_gSynlFzbSLTrj70_GwzMp8Go,5474
|
|
28
|
+
solidity_flow_navigator/serve/templates/not_found.html,sha256=NATZl_urCbpmfvNa88dQLBw0E0285ZsSwGweYp1Ln3o,640
|
|
29
|
+
solflow-0.11.2.dist-info/METADATA,sha256=YyUIZcXpfPIbEiTP5n9He9xh7qIC5t-3fQ7Yz6dT16k,6019
|
|
30
|
+
solflow-0.11.2.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
31
|
+
solflow-0.11.2.dist-info/entry_points.txt,sha256=xow75PTWBIvwWKuh_ZuI6TrZQEZupf8mljRDQ9rj2R0,61
|
|
32
|
+
solflow-0.11.2.dist-info/top_level.txt,sha256=N6o92BfUtKxiFmhJmf3zfTOTIuampfulrYp9wv1MeyU,24
|
|
33
|
+
solflow-0.11.2.dist-info/RECORD,,
|