Add your description here
Project description
![NOTE] This repo is a wooorrkkkkk in progress.
cyaudit
A tool to help you setup a repo for audit.
usage: CyAudit CLI [-h] [-d] [-q] {setup,source,report,add-team,clone,init} ...
Setup, manage, and generate reports for smart contract audits.
positional arguments:
{setup,source,report,add-team,clone,init}
setup Setup a new audit project
source Edit the source folder for report generation
report Generate the report.
add-team Add a team.
clone Clones an audit repo already setup.
init Create a cyaudit.toml config file.
options:
-h, --help show this help message and exit
-d, --debug Run in debug mode
-q, --quiet Suppress all output except errors
Quickstart - tutorial
- Install uv
- Install
cyaudit
uv tool install cyaudit
- Create a new audit project
mkdir my-audit
cd my-audit
cyaudit init
This will create a cyaudit.toml file in your current directory. Fill out the form, (if you don't the CLI will prompt you in the next step). Here is an example cyaudit.toml file:
[cyaudit]
template_project_id = "5" # The template project id
source_url = "https://github.com/Cyfrin/4-puppy-raffle-audit"
target_repo_name = "audit-puppy-raffle"
target_organization = "cyfrin"
auditors = [
"patrick",
]
commit_hash = "15c50ec22382bb1f3106aba660e7c590df18dcac"
project_title = "puppy raffle"
give_users_access = "" # This is the list of users that will be given access to the repo
give_teams_access = [
"Auditors",
] # This is the list of teams that will be given access to the repo
- Setup your github access tokens
Ideally, you use two fine grained tokens. Set the CYAUDIT_PERSONAL_GITHUB_TOKEN and CYAUDIT_ORG_GITHUB_TOKEN environment variables. You may also wait for the CLI to prompt you in the next step.
- Run the setup command
This will:
- Create a new repo at the
target_organizationwith thetarget_repo_name - Add the issue template
- Replace labels
- Create branches for auditors
- Create the report branch
- Add report branch data
- Setup CI
- Add teams
cyaudit setup
- Clone the repo
cyaudit clone
This will keep your cyaudit.toml in tact.
- Do your audit
Go to the github, and make an issue!
- Generate the source files
cyaudit source
- Edit
summary_information.toml
[summary]
project_name = "my project"
report_version = 1.0
team_name = "my_team"
team_website = "hi.com"
client_name = "asdfsa"
client_website = "asdfas"
private_github = "https://github.com/cyfrin/my-goose.git"
project_github = "https://github.com/Cyfrin/4-puppy-raffle-audit"
commit_hash = "15c50ec22382bb1f3106aba660e7c590df18dcac"
fix_commit_hash = ""
project_github_2 = ""
commit_hash_2 = ""
fix_commit_hash_2 = ""
project_github_3 = ""
commit_hash_3 = ""
fix_commit_hash_3 = ""
review_timeline = "01-01-2021 - 01-02-2021"
review_methods = ""
- Generate the report
cyaudit report
Global config
You can setup a file at:
~/.cyaudit/global_cyaudit.toml
And when you run cyaudit init it will use the global config as a default.
GitHub Token Permissions
Ideally, you use 2 fine grained tokens, one for your personal and one for the org.
Use CYAUDIT_PERSONAL_GITHUB_TOKEN and CYAUDIT_ORG_GITHUB_TOKEN environment variables to set your tokens. If you use a classic token, you can just use CYAUDIT_PERSONAL_GITHUB_TOKEN.
Personal Access Token
(I'm not 100% sure)
Permissions:
- Actions
- Administration
- Commit statuses
- Contents
- Workflows
Org token
(I'm not 100% sure)
Permissions:
- Actions
- Administration
- Contents
- Workflows
- Issue Types
- Projects
- Members
Classic Tokens
Classic tokens give too much power, so it's better to use the fine grained tokens.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cyaudit-0.1.0.tar.gz.
File metadata
- Download URL: cyaudit-0.1.0.tar.gz
- Upload date:
- Size: 304.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
418270bf30eb708be1db64d3ee4d546feb0c2fd11c510f661b8f11c531b00878
|
|
| MD5 |
bf45091a6b33463f0a14dd8e724bb812
|
|
| BLAKE2b-256 |
a4cc37bbe4c352760ce34af9ab3887ff78c29cbd805cb89b00b370851266e728
|
Provenance
The following attestation bundles were made for cyaudit-0.1.0.tar.gz:
Publisher:
pypi-release.yml on Cyfrin/cyaudit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cyaudit-0.1.0.tar.gz -
Subject digest:
418270bf30eb708be1db64d3ee4d546feb0c2fd11c510f661b8f11c531b00878 - Sigstore transparency entry: 165082968
- Sigstore integration time:
-
Permalink:
Cyfrin/cyaudit@04efa390147245a1ded7a469c895a92920125643 -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/Cyfrin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-release.yml@04efa390147245a1ded7a469c895a92920125643 -
Trigger Event:
release
-
Statement type:
File details
Details for the file cyaudit-0.1.0-py3-none-any.whl.
File metadata
- Download URL: cyaudit-0.1.0-py3-none-any.whl
- Upload date:
- Size: 252.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ef8b176535acd198650c6364ae4becdb10e6974a2cd512b1f1072b2bcbe50aa
|
|
| MD5 |
7ae2581cf6b1761605fd0c625af96ce5
|
|
| BLAKE2b-256 |
9f2a350187519187727a5f6f84853b5568b2373da4b168f62e67f1e19b0f55cf
|
Provenance
The following attestation bundles were made for cyaudit-0.1.0-py3-none-any.whl:
Publisher:
pypi-release.yml on Cyfrin/cyaudit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cyaudit-0.1.0-py3-none-any.whl -
Subject digest:
9ef8b176535acd198650c6364ae4becdb10e6974a2cd512b1f1072b2bcbe50aa - Sigstore transparency entry: 165082969
- Sigstore integration time:
-
Permalink:
Cyfrin/cyaudit@04efa390147245a1ded7a469c895a92920125643 -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/Cyfrin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-release.yml@04efa390147245a1ded7a469c895a92920125643 -
Trigger Event:
release
-
Statement type: