@snapper-org/snapper
v1.6.10
Published
Snapper aims to improve the overall security and reliability of Metamask Snaps by identifying vulnerabilities, potential issues, and ensuring best coding practices
Downloads
1,529
Readme
Snapper 🐠
Snapper aims to improve the overall security and reliability of Metamask Snaps by identifying vulnerabilities, potential issues, and ensuring best coding practices.
Getting Started
To set up the environment, follow these steps:
- Install project dependencies:
To install the required project dependencies, run:
npm install
Setting Up an Example Test
To prepare an example test, follow these steps:
- Clone the repository:
Clone the example repository for a sample Metamask Snap:
git clone https://github.com/Consensys/starknet-snap
- Navigate to the project directory:
cd starknet-snap
- Reset the repository to a vulnerable commit:
For consistent results, reset to a vulnerable commit:
git reset --hard d9beafe
Running the Test Case
- Build the environment
Set up the test environment by running:
/bin/bash buildenv.sh
- Verify the application runs
Get the usage of the Snapper application with:
npm run start --help
> [email protected] start
> npx ts-node main.ts
Options:
--version Show version number [boolean]
-p, --path Project path [string] [required]
-d, --detectors Specify which detector to run, specify multiple detectors
with a comma [string]
-v, --verbose Enable verbose logging [boolean] [default: false]
-o, --output Specify output file [string]
-l, --logFile Specify log file [string]
-h, --htmlReport Generate HTML report [boolean] [default: false]
--help Show help [boolean]
- Run test cases
Run Snapper against test cases in the specified directory:
npm run start -- --path ./starknet-snap