|
| 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" |
0 commit comments