#snyk_webhook_tester
Python 3.8
- clone this project to a directory
- from the project root
cd scripts_sh
- Run
bash env_gen.sh && bash startup.sh
- this will set up a python virtual environment, install dependencies, and start the uvicorn app - Import
pm_webhook_emulate.json
collection into your Postman environment - Do a post!
Signature verification should work out of the box. I'm using secret_token_12345
to sign the request body of what's in pm_webhook_emulate.json
.
You can use a different token/signature by:
- going to the postman request -> Pre-request Script tab -> Change
secret_token
to something of your choice. - doing a post
in your project, update the .env
file to match the secret you chose
NOTE! Make sure your JSON payload isn't formatted. It should be one string with no spaces.
This app uses FastAPI and the Pydantic data model. Requests are received as raw json, the signature verified, and then marshalled into a Pydantic model for easier use.