MCPcopy Index your code
hub / github.com/OWASP/crAPI

github.com/OWASP/crAPI @v1.1.6

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.1.6 ↗ · + Follow
1,178 symbols 3,920 edges 270 files 259 documented · 22%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

crAPI

completely ridiculous API (crAPI) will help you to understand the ten most critical API security risks. crAPI is vulnerable by design, but you'll be able to safely run it to educate/train yourself.

crAPI is modern, built on top of a microservices architecture. When time has come to buy your first car, sign up for an account and start your journey. To know more about crAPI, please check crAPI's overview.

QuickStart Guide

Docker and docker compose

You'll need to have Docker and docker compose installed and running on your host system. Also, the version of docker compose should be 1.27.0 or above. Check your docker compose version using:

docker compose version

Upgrade your docker compose version if you get errors like

ERROR: Invalid interpolation format for ...

Using prebuilt images

You can use prebuilt images generated by our CI workflow by downloading the docker compose and .env files.

  • To use the latest stable version.

    • Linux Machine

    ``` curl -o /tmp/crapi.zip https://github.com/OWASP/crAPI/archive/refs/heads/main.zip

    unzip /tmp/crapi.zip

    cd crAPI-main/deploy/docker

    docker compose pull

    docker compose -f docker-compose.yml --compatibility up -d ```

    To override server configurations, change the values of the variables present in the .env file or add the respective variables to the start of the docker compose command.

    For example to expose the system to all network interfaces.

    LISTEN_IP="0.0.0.0" docker compose -f docker-compose.yml --compatibility up -d

    • Windows Machine

    ``` curl.exe -o crapi.zip https://github.com/OWASP/crAPI/archive/refs/heads/main.zip

    tar -xf .\crapi.zip

    cd crAPI-main/deploy/docker

    docker compose pull

    docker compose -f docker-compose.yml --compatibility up -d ```

    To override server configurations, change the values of the variables present in the .env file or add the respective variables to the start of the docker compose command.

    For example to expose the system to all network interfaces.

    LISTEN_IP="0.0.0.0" docker compose -f docker-compose.yml --compatibility up -d

  • To use the latest development version

    • Linux Machine

    ``` curl -o /tmp/crapi.zip https://github.com/OWASP/crAPI/archive/refs/heads/develop.zip

    unzip /tmp/crapi.zip

    cd crAPI-develop/deploy/docker

    docker compose pull

    docker compose -f docker-compose.yml --compatibility up -d ```

    To override server configurations, change the values of the variables present in the .env file or add the respective variables to the start of the docker compose command.

    For example to expose the system to all network interfaces.

    LISTEN_IP="0.0.0.0" docker compose -f docker-compose.yml --compatibility up -d

    • Windows Machine

    ``` curl.exe -o crapi.zip https://github.com/OWASP/crAPI/archive/refs/heads/develop.zip

    tar -xf .\crapi.zip

    cd crAPI-develop/deploy/docker

    docker compose pull

    docker compose -f docker-compose.yml --compatibility up -d ```

    To override server configurations, change the values of the variables present in the .env file or add the respective variables to the start of the docker compose command.

    For example to expose the system to all network interfaces.

    LISTEN_IP="0.0.0.0" docker compose -f docker-compose.yml --compatibility up -d

Visit http://localhost:8888

Note: All emails are sent to mailhog service by default and can be checked on http://localhost:8025 You can change the smtp configuration if required however all emails with domain example.com will still go to mailhog.

Vagrant

This option allows you to run crAPI within a virtual machine, thus isolated from your system. You'll need to have Vagrant and, for example VirtualBox installed.

  1. Clone crAPI repository $ git clone [REPOSITORY-URL]
  2. Start crAPI Virtual Machine $ cd deploy/vagrant && vagrant up
  3. Visit http://192.168.33.20

Note: All emails are sent to mailhog service and can be checked on http://192.168.33.20:8025

Once you're done playing with crAPI, you can remove it completely from your system running the following command from the repository root directory

$ cd deploy/vagrant && vagrant destroy

For more deployment options visit the setup instructions for more details.

To know more about challenges in crAPI. Visit challenges

Troubleshooting guide for general issues while installing and running crAPI

If you need any help with installing and running crAPI you can check out this guide: Troubleshooting guide crAPI. If this doesn't solve your problem, please create an issue in Github Issues.

Extension points exported contracts — how you extend this code

UserRegistrationService (Interface)
(no doc) [2 implementers]
services/identity/src/main/java/com/crapi/service/UserRegistrationService.java
LoginProps (Interface)
* Login component for users
services/web/src/components/login/login.tsx
UserService (Interface)
(no doc) [2 implementers]
services/identity/src/main/java/com/crapi/service/UserService.java
ActionPayload (Interface)
(no doc)
services/web/src/actions/userActions.ts
VehicleOwnershipService (Interface)
(no doc) [2 implementers]
services/identity/src/main/java/com/crapi/service/VehicleOwnershipService.java
LoginPayload (Interface)
(no doc)
services/web/src/actions/userActions.ts
OtpService (Interface)
(no doc) [2 implementers]
services/identity/src/main/java/com/crapi/service/OtpService.java
UnlockPayload (Interface)
(no doc)
services/web/src/actions/userActions.ts

Core symbols most depended-on inside this repo

callback
called by 112
services/web/src/containers/shop/shop.js
getStatus
called by 70
services/identity/src/main/java/com/crapi/entity/UserDetails.java
get
called by 69
services/workshop/crapi/shop/views.py
getUserFromToken
called by 47
services/identity/src/main/java/com/crapi/service/UserService.java
findByEmail
called by 39
services/identity/src/main/java/com/crapi/repository/UserRepository.java
findByUser_id
called by 29
services/identity/src/main/java/com/crapi/repository/UserDetailsRepository.java
findByUser
called by 23
services/identity/src/main/java/com/crapi/repository/OtpRepository.java
getId
called by 22
services/identity/src/main/java/com/crapi/entity/UserDetails.java

Shape

Method 477
Function 373
Class 163
Interface 138
Struct 13
Route 8
Enum 4
TypeAlias 2

Languages

Java41%
TypeScript34%
Python19%
Go5%

Modules by API surface

services/identity/src/test/java/com/crapi/service/Impl/UserServiceImplTest.java52 symbols
services/identity/src/test/java/com/crapi/service/Impl/ProfileServiceImplTest.java29 symbols
services/web/src/actions/userActions.ts27 symbols
services/identity/src/test/java/com/crapi/service/Impl/VehicleServiceImplTest.java25 symbols
services/workshop/crapi/mechanic/views.py22 symbols
services/identity/src/test/java/com/crapi/service/Impl/OtpServiceImplTest.java20 symbols
services/identity/src/main/java/com/crapi/service/Impl/UserServiceImpl.java20 symbols
services/identity/src/main/java/com/crapi/service/UserService.java18 symbols
services/web/src/components/profile/profile.tsx16 symbols
services/workshop/crapi/user/models.py15 symbols
services/workshop/crapi/shop/views.py15 symbols
services/identity/src/main/java/com/crapi/entity/UserDetails.java14 symbols

Datastores touched

postCollection · 1 repos
couponsCollection · 1 repos
(mongodb)Database · 1 repos
crapiDatabase · 1 repos

For agents

$ claude mcp add crAPI \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact