Skip to content

Commit 65ec70f

Browse files
committed
Added crAPI plan and changed to use pollUnits: seconds
Signed-off-by: Simon Bennetts <[email protected]>
1 parent 9f508dc commit 65ec70f

File tree

5 files changed

+110
-3
lines changed

5 files changed

+110
-3
lines changed

other/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ All notable changes to the 'other' section of this repository will be documented
33

44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
55

6+
### 2025-10-03
7+
- Added af-plans/FullScanCrApiAuth.yaml
8+
- Changed auth AF plans to use seconds instead of requests for pollUnits.
9+
610
### 2025-09-30
711
- Added af-plans/FullScanGinNJuiceAuth.yaml
812

other/af-plans/AuthCheckBodgeit.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ env:
2222
loggedInRegex: "\\QUser: <a href=\"password.jsp\">\\E"
2323
loggedOutRegex: "\\QGuest user\\E"
2424
pollFrequency: 60
25-
pollUnits: "requests"
25+
pollUnits: "seconds"
2626
pollUrl: ""
2727
pollPostData: ""
2828
sessionManagement:
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
---
2+
# A simple plan for performing an authenticated scan against OWASP crAPI.
3+
# The plan includes the request needed to register the user used for authentication.
4+
# The plan is intended to be run with ZAP in a Docker container connected to the correct network,
5+
# as per https://www.zaproxy.org/docs/testapps/crapi/
6+
# If you are running this plan in the ZAP Desktop then change all instances of "crapi-web" to "localhost:8888"
7+
# (or whatever host:port that crAPI is accessible on)
8+
env:
9+
contexts:
10+
- name: crAPI
11+
urls:
12+
- http://crapi-web
13+
includePaths:
14+
- http://crapi-web.*
15+
authentication:
16+
method: browser
17+
parameters:
18+
loginPageUrl: http://crapi-web/login
19+
loginPageWait: 5
20+
browserId: firefox
21+
stepDelay: 1
22+
diagnostics: true
23+
steps: []
24+
verification:
25+
method: poll
26+
loggedInRegex: \Q 200\E
27+
loggedOutRegex: \Q 404\E
28+
pollFrequency: 60
29+
pollUnits: seconds
30+
pollUrl: http://crapi-web/identity/api/v2/user/dashboard
31+
pollPostData: ""
32+
pollAdditionalHeaders:
33+
- header: content-type
34+
value: application/json
35+
- header: referer
36+
value: http://crapi-web/login
37+
sessionManagement:
38+
method: headers
39+
parameters:
40+
Authorization: "Bearer {%json:token%}"
41+
technology: {}
42+
structure: {}
43+
users:
44+
45+
credentials:
46+
password: Password123!
47+
48+
parameters: {}
49+
jobs:
50+
- type: passiveScan-config
51+
parameters: {}
52+
- type: requestor
53+
parameters:
54+
user: ""
55+
requests:
56+
- url: http://crapi-web/identity/api/auth/signup
57+
method: POST
58+
headers:
59+
- Content-Type:application/json
60+
data: "{\"name\":\"test\",\"email\":\"[email protected]\",\"number\":\"1234567890\"\
61+
,\"password\":\"Password123!\"}"
62+
responseCode: 200
63+
- type: spider
64+
parameters:
65+
context: crAPI
66+
67+
logoutAvoidance: true
68+
tests:
69+
- name: At least 100 URLs found
70+
type: stats
71+
onFail: INFO
72+
statistic: automation.spider.urls.added
73+
operator: '>='
74+
value: 100
75+
- type: spiderAjax
76+
parameters:
77+
context: crAPI
78+
79+
browserId: firefox-headless
80+
scopeCheck: Flexible
81+
logoutAvoidance: true
82+
tests:
83+
- name: At least 100 URLs found
84+
type: stats
85+
onFail: INFO
86+
statistic: spiderAjax.urls.added
87+
operator: '>='
88+
value: 100
89+
- type: passiveScan-wait
90+
parameters: {}
91+
- type: activeScan
92+
parameters:
93+
context: crAPI
94+
95+
policyDefinition:
96+
defaultStrength: medium
97+
defaultThreshold: medium
98+
- parameters:
99+
template: "modern"
100+
reportTitle: "ZAP Scanning Report"
101+
reportDescription: ""
102+
name: "report"
103+
type: "report"

other/af-plans/FullScanDvwaAuth.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ env:
2727
method: "poll"
2828
loggedInRegex: "\\Qadmin\\E"
2929
pollFrequency: 60
30-
pollUnits: "requests"
30+
pollUnits: "seconds"
3131
pollUrl: "http://localhost:4280/instructions.php"
3232
pollPostData: ""
3333
sessionManagement:

other/af-plans/FullScanGinNJuiceAuth.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ env:
2222
loggedInRegex: \Q 200 OK\E
2323
loggedOutRegex: \Q 302 Found\E
2424
pollFrequency: 60
25-
pollUnits: requests
25+
pollUnits: seconds
2626
pollUrl: https://ginandjuice.shop/my-account
2727
pollPostData: ""
2828
sessionManagement:

0 commit comments

Comments
 (0)