Skip to content

akto-api-security/vulnerable-apis

Repository files navigation

Library of sample vulnerable APIs

Run locally

  1. Start Postgres db: docker run --name postgres-container --restart always -v ./data/db:/var/lib/postgresql/data/ -e POSTGRES_HOST_AUTH_METHOD=trust -p 5432:5432 postgres:latest
  2. Install dependencies pip3 install -r requirements.txt
  3. Go to settings.py file and change value of HOST from db to localhost
  4. Run migrate python3 manage.py migrate
  5. Start API server python3 manage.py runserver 0.0.0.0:80
  6. Insert data in db. You have to run this command each time you change sampleapidata.json curl --location --request POST 'http://127.0.0.1:80/api/insert_data/'
  7. Verify by going to http://localhost/api/college/network-info

Run using Docker

docker-compose up -d
docker-compose exec vulservice python manage.py migrate
curl --location --request POST 'http://127.0.0.1:8000/api/insert_data/'

About

contains sample vulnerable apis

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •