Permissions audit package
This project defines a simple library for obtaining smart contract permissions and building a graph.
It's aimed at contracts using Openzeppelin's AccessControl module.
There's a frontend for this at https://ensuro.co/ens-permissions-frontend/
Development
There's an app developed for Google Cloud Functions.
To run the function locally you will need a virtualenv with functions-framework and the app requirements:
python3 -m venv venv
. venv/bin/activate
pip install -r requirements.txt -r requirements.dev.txt
pip install -e .
Running the function locally
Requires a few environment variables. See .env.sample.
cp .env.sample .env
# Review .env vars
$EDITOR .env
# Run the function
functions_framework --debug --target=permissions_graph
Then test it with:
curl -o test.gv http://127.0.0.1:8080/?address=0x47E2aFB074487682Db5Db6c7e41B43f913026544
dot -Tsvg test.gv > test.svg
Deployment
Edit config/environment.yml with your config and then deploy with gcloud:
gcloud functions deploy permissions_graph \
--env-vars-file config/environment.yml \
--runtime python39 --trigger-http --allow-unauthenticated
TODO
- Deploy app from github actions
- Split
ens_permissionsinto its own pypi library - Add support for
Ownablecontracts - Address book
- Add multisig intelligence (detect when a role member is a multisig and obtain its members)
- Timelock detection
Metadata
Release files for ens-permissions 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ens-permissions-0.2.1.tar.gz | 14.0 kB | Without provenance | Details for ens-permissions-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ens_permissions-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for ens_permissions-0.2.1-py3-none-any.whl |
Total release size: 21.2 kB
Release files / ens-permissions-0.2.1.tar.gz
| Download URL | ens-permissions-0.2.1.tar.gz |
|---|---|
| Size | 14.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
99e0cf6a1d2e98133cf28bd05a8b136686d5e1d38d1ad0dec7a0e84285687f52
|
|
BLAKE2b-256 checksum How to use checksums |
92b281a12f9db79e0357a5861ef684354ea1e33311e7e3b9b8193581393b3b63
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.15
|
Release files / ens_permissions-0.2.1-py3-none-any.whl
| Download URL | ens_permissions-0.2.1-py3-none-any.whl |
|---|---|
| Size | 7.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1916c97125b68bc4182d9a085880dfd232d2c254cfb35cb99b4caea9e129dd95
|
|
BLAKE2b-256 checksum How to use checksums |
7090c9e1cce6d3b7757ef639e1fe9e93f2026d7bb31f0044e5e977aac928fa45
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.15
|
Security for ens-permissions 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.