Skip to content

Commit a2cad3b

Browse files
authored
Merge pull request #495 from psiinon/main
Added crAPI plan and changed to use pollUnits: seconds
2 parents 9f508dc + c2b9127 commit a2cad3b

File tree

5 files changed

+109
-3
lines changed

5 files changed

+109
-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: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
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-headless
21+
stepDelay: 1
22+
steps: []
23+
verification:
24+
method: poll
25+
loggedInRegex: \Q 200\E
26+
loggedOutRegex: \Q 404\E
27+
pollFrequency: 60
28+
pollUnits: seconds
29+
pollUrl: http://crapi-web/identity/api/v2/user/dashboard
30+
pollPostData: ""
31+
pollAdditionalHeaders:
32+
- header: content-type
33+
value: application/json
34+
- header: referer
35+
value: http://crapi-web/login
36+
sessionManagement:
37+
method: headers
38+
parameters:
39+
Authorization: "Bearer {%json:token%}"
40+
technology: {}
41+
structure: {}
42+
users:
43+
44+
credentials:
45+
password: Password123!
46+
47+
parameters: {}
48+
jobs:
49+
- type: passiveScan-config
50+
parameters: {}
51+
- type: requestor
52+
parameters:
53+
user: ""
54+
requests:
55+
- url: http://crapi-web/identity/api/auth/signup
56+
method: POST
57+
headers:
58+
- Content-Type:application/json
59+
data: "{\"name\":\"test\",\"email\":\"[email protected]\",\"number\":\"1234567890\"\
60+
,\"password\":\"Password123!\"}"
61+
responseCode: 200
62+
- type: spider
63+
parameters:
64+
context: crAPI
65+
66+
logoutAvoidance: true
67+
tests:
68+
- name: At least 100 URLs found
69+
type: stats
70+
onFail: INFO
71+
statistic: automation.spider.urls.added
72+
operator: '>='
73+
value: 100
74+
- type: spiderAjax
75+
parameters:
76+
context: crAPI
77+
78+
browserId: firefox-headless
79+
scopeCheck: Flexible
80+
logoutAvoidance: true
81+
tests:
82+
- name: At least 100 URLs found
83+
type: stats
84+
onFail: INFO
85+
statistic: spiderAjax.urls.added
86+
operator: '>='
87+
value: 100
88+
- type: passiveScan-wait
89+
parameters: {}
90+
- type: activeScan
91+
parameters:
92+
context: crAPI
93+
94+
policyDefinition:
95+
defaultStrength: medium
96+
defaultThreshold: medium
97+
- parameters:
98+
template: "modern"
99+
reportTitle: "ZAP Scanning Report"
100+
reportDescription: ""
101+
name: "report"
102+
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)