|
| 1 | +# SPDX-FileCopyrightText: 2021 iteratec GmbH |
| 2 | +# |
| 3 | +# SPDX-License-Identifier: Apache-2.0 |
| 4 | + |
| 5 | +--- |
| 6 | +# Global ZAP Configurations |
| 7 | +global: |
| 8 | + # True to create another ZAP session (overwrite the former if the same name already exists), False to use an existing on |
| 9 | + isNewSession: true |
| 10 | + # Sets the ZAP Session name |
| 11 | + sessionName: SCB |
| 12 | + |
| 13 | +# List of 1 or more contexts, mandatory |
| 14 | +contexts: |
| 15 | + # Name to be used to refer to this context in other jobs, mandatory |
| 16 | + - name: scb-petstore-context |
| 17 | + # The top level url, mandatory, everything under this will be included. IMPORTANT: must be the hostname without any subpath! |
| 18 | + url: http://petstore:8080/ |
| 19 | + # An optional list of regexes to include |
| 20 | + includePaths: |
| 21 | + - "http://petstore:8080/v2.*" |
| 22 | + # An optional list of regexes to exclude |
| 23 | + excludePaths: |
| 24 | + - ".*\\.css" |
| 25 | + - ".*\\.png" |
| 26 | + - ".*\\.jpeg" |
| 27 | + alertFilters: |
| 28 | + # ignore a bunch of rules to reduce number of findings in tests |
| 29 | + - ruleId: 10020 |
| 30 | + newLevel: "False Positive" |
| 31 | + - ruleId: 10021 |
| 32 | + newLevel: "False Positive" |
| 33 | + - ruleId: 10024 |
| 34 | + newLevel: "False Positive" |
| 35 | + - ruleId: 10036 |
| 36 | + newLevel: "False Positive" |
| 37 | + - ruleId: 10038 |
| 38 | + newLevel: "False Positive" |
| 39 | + - ruleId: 10049 |
| 40 | + newLevel: "False Positive" |
| 41 | + - ruleId: 10063 |
| 42 | + newLevel: "False Positive" |
| 43 | + - ruleId: 10098 |
| 44 | + newLevel: "False Positive" |
| 45 | + - ruleId: 10109 |
| 46 | + newLevel: "False Positive" |
| 47 | + - ruleId: 40033 |
| 48 | + newLevel: "False Positive" |
| 49 | + - ruleId: 40039 |
| 50 | + newLevel: "False Positive" |
| 51 | + - ruleId: 40040 |
| 52 | + newLevel: "False Positive" |
| 53 | + - ruleId: 90003 |
| 54 | + newLevel: "False Positive" |
| 55 | + |
| 56 | +apis: |
| 57 | + # -- The name of the spider configuration |
| 58 | + - name: scb-petstore-api |
| 59 | + # -- The Name of the context (zapConfiguration.contexts[x].name) to spider, default: first context available. |
| 60 | + context: scb-petstore-context |
| 61 | + # -- format of the API ('openapi', 'grapql', 'soap') |
| 62 | + format: openapi |
| 63 | + # -- Url to start spidering from, default: first context URL |
| 64 | + url: http://petstore:8080/v2/swagger.json |
| 65 | + # -- Override host setting in swagger.json |
| 66 | + hostOverride: http://petstore:8080 |
| 67 | + |
| 68 | +spiders: |
| 69 | + - name: scb-petstore-spider |
| 70 | + # String: Name of the context to spider, default: first context |
| 71 | + context: scb-petstore-context |
| 72 | + # String: Url to start spidering from, default: first context URL |
| 73 | + url: http://petstore:8080/v2/ |
| 74 | + # Int: Fail if spider finds less than the specified number of URLs, default: 0 |
| 75 | + failIfFoundUrlsLessThan: 0 |
| 76 | + # Int: Warn if spider finds less than the specified number of URLs, default: 0 |
| 77 | + warnIfFoundUrlsLessThan: 0 |
| 78 | + # Int: The max time in minutes the spider will be allowed to run for, default: 0 unlimited |
| 79 | + maxDuration: 1 |
| 80 | + # Int: The maximum tree depth to explore, default 5 |
| 81 | + maxDepth: 5 |
| 82 | + # Int: The maximum number of children to add to each node in the tree |
| 83 | + maxChildren: 10 |
| 84 | + # # Int: The max size of a response that will be parsed, default: 2621440 - 2.5 Mb |
| 85 | + # maxParseSizeBytes: 2621440 |
| 86 | + # Bool: Whether the spider will accept cookies, default: true |
| 87 | + acceptCookies: true |
| 88 | + # Bool: Whether the spider will handle OData responses, default: false |
| 89 | + handleODataParametersVisited: false |
| 90 | + # Enum [ignore_completely, ignore_value, use_all]: How query string parameters are used when checking if a URI has already been visited, default: use_all |
| 91 | + handleParameters: use_all |
| 92 | + # Bool: Whether the spider will parse HTML comments in order to find URLs, default: true |
| 93 | + parseComments: true |
| 94 | + # Bool: Whether the spider will parse Git metadata in order to find URLs, default: false |
| 95 | + parseGit: false |
| 96 | + # Bool: Whether the spider will parse 'robots.txt' files in order to find URLs, default: true |
| 97 | + parseRobotsTxt: false |
| 98 | + # Bool: Whether the spider will parse 'sitemap.xml' files in order to find URLs, default: true |
| 99 | + parseSitemapXml: false |
| 100 | + # Bool: Whether the spider will parse SVN metadata in order to find URLs, default: false |
| 101 | + parseSVNEntries: false |
| 102 | + # Bool: Whether the spider will submit POST forms, default: true |
| 103 | + postForm: true |
| 104 | + # Bool: Whether the spider will process forms, default: true |
| 105 | + processForm: true |
| 106 | + # Int: The time between the requests sent to a server in milliseconds, default: 200 |
| 107 | + requestWaitTime: 200 |
| 108 | + # Bool: Whether the spider will send the referer header, default: true |
| 109 | + sendRefererHeader: true |
| 110 | + # Int: The number of spider threads, default: 2 |
| 111 | + threadCount: 5 |
| 112 | + # String: The user agent to use in requests, default: '' - use the default ZAP one |
| 113 | + userAgent: "secureCodeBox / ZAP Spider" |
| 114 | + |
| 115 | +scanners: |
| 116 | + - name: scb-petstore-scan |
| 117 | + # String: Name of the context to attack, default: first context |
| 118 | + context: scb-petstore-context |
| 119 | + # String: Url to start scaning from, default: first context URL |
| 120 | + url: http://petstore:8080/v2/ |
| 121 | + # String: Name of the scan policy to be used, default: Default Policy |
| 122 | + policy: "API-Minimal" |
| 123 | + # Int: The max time in minutes any individual rule will be allowed to run for, default: 0 unlimited |
| 124 | + maxRuleDurationInMins: 1 |
| 125 | + # Int: The max time in minutes the active scanner will be allowed to run for, default: 0 unlimited |
| 126 | + maxScanDurationInMins: 5 |
| 127 | + # Int: The max number of threads per host, default: 2 |
| 128 | + threadPerHost: 5 |
| 129 | + # Int: The delay in milliseconds between each request, use to reduce the strain on the target, default 0 |
| 130 | + delayInMs: 0 |
| 131 | + # Bool: If set will add an extra query parameter to requests that do not have one, default: false |
| 132 | + addQueryParam: false |
| 133 | + # Bool: If set then automatically handle anti CSRF tokens, default: false |
| 134 | + handleAntiCSRFTokens: false |
| 135 | + # Bool: If set then the relevant rule Id will be injected into the X-ZAP-Scan-ID header of each request, default: false |
| 136 | + injectPluginIdInHeader: false |
| 137 | + # Bool: If set then the headers of requests that do not include any parameters will be scanned, default: false |
| 138 | + scanHeadersAllRequests: false |
0 commit comments