Skip to content

Commit 5a6c27b

Browse files
committed
CrAPI Quick Start section
Signed-off-by: Simon Bennetts <psiinon@gmail.com>
1 parent b448236 commit 5a6c27b

File tree

2 files changed

+47
-2
lines changed

2 files changed

+47
-2
lines changed

site/content/docs/testapps/crapi.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,45 @@ It is open source, and maintained by OWASP and the community. It’s fairly well
1515
* Repo - https://github.com/OWASP/crAPI
1616
* Docker - https://hub.docker.com/u/crapi
1717

18+
### Quick Start
19+
20+
New to ZAP and just want to quickly run ZAP against crAPI?
21+
22+
Just run these commands:
23+
24+
```bash
25+
# Creating and using a directory called "crapi" is important, dont skip this step!
26+
mkdir crapi
27+
cd crapi
28+
curl -o docker-compose.yml https://raw.githubusercontent.com/OWASP/crAPI/refs/heads/main/deploy/docker/docker-compose.yml
29+
30+
# Start crapi
31+
docker-compose up
32+
33+
# Download the recommended plan using curl, or use any other suitable tool
34+
curl -O https://raw.githubusercontent.com/zaproxy/community-scripts/refs/heads/main/other/af-plans/FullScanCrApiAuth.yaml
35+
36+
# Run ZAP using the stable Docker image, the crapi docker network,
37+
# mapping the CWD so that Docker can access the file system and export the report.
38+
# The network name is based on the cwd name, which is why creating and using "crapi" is important
39+
docker run --network crapi_default -v $(pwd):/zap/wrk/:rw -t zaproxy/zap-stable zap.sh -cmd -autorun wrk/FullScanCrApiAuth.yaml
40+
```
41+
42+
Note that the yaml file includes the requests needed to register the user used for authentication.
43+
44+
To run this command on Windows see the [relevant documentation](/docs/docker/about/#mounting-the-current-directory).
45+
46+
You will need to have Docker installed. If you do not want to use Docker then you can of course install both crAPI and ZAP locally.
47+
48+
This command only take a few minutes to run and should find the following Medium risk alerts:
49+
50+
* 🟠 [.env Information Leak](/docs/alerts/40034/)
51+
* 🟠 [Content Security Policy (CSP) Header Not Set](/docs/alerts/10038/)
52+
* 🟠 [Cross-Domain Misconfiguration](/docs/alerts/10098/)
53+
* 🟠 [Missing Anti-clickjacking Header](/docs/alerts/10020/)
54+
55+
It will create an HTML report in your CWD containing full details of all of the issues found.
56+
1857
### Potential Pitfalls
1958

2059
While we are aware of at least one Third Party online instance you can never be sure how up-to-date or stable it is and will be in the future. The project makes Docker images available as well as a docker-compose for easy local usage.
@@ -125,6 +164,12 @@ It may also make sense to exclude the Forgot Password functionality (in the envi
125164

126165
Although crAPI has a number of vulnerabilities, many of them can be very challenging for a DAST tool to identify.
127166

167+
We have a simple example Automation Framework Plan for performing an authenticated scan:
168+
[FullScanCrApiAuth.yaml](https://github.com/zaproxy/community-scripts/blob/main/other/af-plans/FullScanCrApiAuth.yaml)
169+
170+
Note that the yaml file includes the requests needed to register the user used for authentication.
171+
172+
128173
The only significant vulnerabilities that we are aware of which ZAP should be able to identify but cannot (currently) are:
129174
- The NoSQL Injection in the coupon validation functionality.
130175
- The SSRF in the contact mechanic functionality.

site/content/docs/testapps/ginnjuiceshop.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Just run these commands:
2828
# Download the recommended plan using curl, or use any other suitable tool
2929
curl -O https://raw.githubusercontent.com/zaproxy/community-scripts/refs/heads/main/other/af-plans/FullScanGinNJuiceAuth.yaml
3030

31-
# Run ZAP using the stable Docker image, mapping the CWD so that Docker can access the file and export the report
31+
# Run ZAP using the stable Docker image, mapping the CWD so that Docker can access the file system and export the report
3232
docker run -v $(pwd):/zap/wrk/:rw -t zaproxy/zap-stable zap.sh -cmd -autorun wrk/FullScanGinNJuiceAuth.yaml
3333
```
3434

@@ -46,7 +46,7 @@ This command should take around 25 minutes (once the Docker image has been downl
4646
* 🟠 [CRLF Injection](/docs/alerts/40003/)
4747
* 🟠 [Content Security Policy (CSP) Header Not Set](/docs/alerts/10038/)
4848

49-
It will create an HTML file in your CWD containing full details of all of the issues found.
49+
It will create an HTML report in your CWD containing full details of all of the issues found.
5050

5151
### Potential Pitfalls
5252

0 commit comments

Comments
 (0)