command:
zap-api-scan.py -d
-z "-configfile zap.config"
-S -f openapi -t api.json
-g api-scan.conf
-r report.html
2019-04-23 16:45:19,456 Target: api.json
2019-04-23 16:45:19,459 Starting ZAP
2019-04-23 16:45:19,459 Params: ['zap-x.sh', '-daemon', '-port', '36334', '-host', '0.0.0.0', '-config', 'api.disablekey=true', '-config', 'api.addrs.addr.name=.*', '-config', 'api.addrs.addr.regex=true', '-addonupdate', '-addoninstall', 'pscanrulesBeta', '-configfile', 'zap.config']
2019-04-23 16:45:19,465 Starting new HTTP connection (1): localhost:36334
_XSERVTransmkdir: ERROR: euid != 0,directory /tmp/.X11-unix will not be created.
2019-04-23 16:45:20,468 Starting new HTTP connection (1): localhost:36334
2019-04-23 16:45:21,471 Starting new HTTP connection (1): localhost:36334
2019-04-23 16:45:22,473 Starting new HTTP connection (1): localhost:36334
2019-04-23 16:45:23,476 Starting new HTTP connection (1): localhost:36334
2019-04-23 16:45:24,479 Starting new HTTP connection (1): localhost:36334
2019-04-23 16:45:25,481 Starting new HTTP connection (1): localhost:36334
2019-04-23 16:45:26,485 Starting new HTTP connection (1): localhost:36334
2019-04-23 16:45:27,489 Starting new HTTP connection (1): localhost:36334
2019-04-23 16:45:28,495 Starting new HTTP connection (1): localhost:36334
2019-04-23 16:45:29,498 Starting new HTTP connection (1): localhost:36334
2019-04-23 16:45:30,502 Starting new HTTP connection (1): localhost:36334
zap:
image: owasp/zap2docker-weekly
container_name: zap
command:
zap-api-scan.py
-z "-configfile /zap/wrk/zap.config"
-S -f openapi -t api.yml
-r report.html
volumes:
- .:/zap/wrk
7956 [ZAP-Import-OpenAPI-1] ERROR io.swagger.parser.SwaggerCompatConverter - failed to read resource listing
com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'openapi': was expecting ('true', 'false' or 'null')
at [Source: /tmp/openapi8739339247369534937.defn; line: 1, column: 9]
6900 [ZAP-daemon] INFO org.zaproxy.zap.DaemonBootstrap - ZAP is now listening on 0.0.0.0:41724
7170 [ZAP-ProxyThread-2] WARN org.zaproxy.zap.extension.api.API - Bad request to API endpoint [/JSON/script/action/load/] from [127.0.0.1]:
Does Not Exist (does_not_exist) : /home/zap/.ZAP_D/scripts/scripts/httpsender/Alert_on_HTTP_Response_Code_Errors.js
at org.zaproxy.zap.extension.script.ScriptAPI.handleApiAction(ScriptAPI.java:238)
at org.zaproxy.zap.extension.api.API.handleApiRequest(API.java:449)
at org.parosproxy.paros.core.proxy.ProxyThread.processHttp(ProxyThread.java:463)
at org.parosproxy.paros.core.proxy.ProxyThread.run(ProxyThread.java:320)
at java.lang.Thread.run(Thread.java:748)
7182 [ZAP-ProxyThread-3] WARN org.zaproxy.zap.extension.api.API - Bad request to API endpoint [/JSON/script/action/enable/] from [127.0.0.1]:
Does Not Exist (does_not_exist) : scriptName
at org.zaproxy.zap.extension.script.ScriptAPI.handleApiAction(ScriptAPI.java:206)
at org.zaproxy.zap.extension.api.API.handleApiRequest(API.java:449)
at org.parosproxy.paros.core.proxy.ProxyThread.processHttp(ProxyThread.java:463)
at org.parosproxy.paros.core.proxy.ProxyThread.run(ProxyThread.java:320)
at java.lang.Thread.run(Thread.java:748)
7187 [ZAP-ProxyThread-4] WARN org.zaproxy.zap.extension.api.API - Bad request to API endpoint [/JSON/script/action/load/] from [127.0.0.1]:
Does Not Exist (does_not_exist) : /home/zap/.ZAP_D/scripts/scripts/httpsender/Alert_on_Unexpected_Content_Types.js
at org.zaproxy.zap.extension.script.ScriptAPI.handleApiAction(ScriptAPI.java:238)
at org.zaproxy.zap.extension.api.API.handleApiRequest(API.java:449)
at org.parosproxy.paros.core.proxy.ProxyThread.processHttp(ProxyThread.java:463)
at org.parosproxy.paros.core.proxy.ProxyThread.run(ProxyThread.java:320)
at java.lang.Thread.run(Thread.java:748)
7192 [ZAP-ProxyThread-5] WARN org.zaproxy.zap.extension.api.API - Bad request to API endpoint [/JSON/script/action/enable/] from [127.0.0.1]:
Does Not Exist (does_not_exist) : scriptName
at org.zaproxy.zap.extension.script.ScriptAPI.handleApiAction(ScriptAPI.java:206)
at org.zaproxy.zap.extension.api.API.handleApiRequest(API.java:449)
at org.parosproxy.paros.core.proxy.ProxyThread.processHttp(ProxyThread.java:463)
at org.parosproxy.paros.core.proxy.ProxyThread.run(ProxyThread.java:320)
at java.lang.Thread.run(Thread.java:748)
7593 [ZAP-Import-OpenAPI-1] WARN org.zaproxy.zap.extension.openapi.ExtensionOpenApi - Failed to parse swagger defn {"openapi":"3.0.0","info":{"description":"VIMANA's API","version":"2.0","title":"VIMANA API"},"servers":[{"url":"https://api.staging.vimana.us/api","description":"Staging environment"}],"security":[{"BearerAuth":[]}],"paths":{"/v3/calendar/timezone":{"get":{"tags":["Calendar"],"summary":"Get timezone for a plant","parameters":[{"$ref":"#/components/parameters/xTenantHeader"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/timezone"}}}},
...
7593 [ZAP-Import-OpenAPI-1] WARN org.zaproxy.zap.extension.openapi.ExtensionOpenApi - Failed to parse swagger defn {"openapi":"3.0.0","info":{"description":"VIMANA's API","version":"2.0","title":"VIMANA API"},"servers":[{"url":"https://api.staging.vimana.us/api","description":"Staging environment"}],"security":[{"BearerAuth":[]}],"paths":{"/v3/calendar/timezone":{"get":{"tags":["Calendar"],"summary":"Get timezone for a plant","parameters":[{"$ref":"#/components/parameters/xTenantHeader"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/timezone"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/InsufficientPerms"},
8771 [ZAP-Import-OpenAPI-1] WARN io.swagger.util.PropertyDeserializer - no property from null, null, {ENUM=null, TITLE=null, DESCRIPTION=null, DEFAULT=null, PATTERN=null, DESCRIMINATOR=null, MIN_ITEMS=null, MAX_ITEMS=null, MIN_PROPERTIES=null, MAX_PROPERTIES=null, MIN_LENGTH=null, MAX_LENGTH=null, MINIMUM=null, MAXIMUM=null, EXCLUSIVE_MINIMUM=null, EXCLUSIVE_MAXIMUM=null, UNIQUE_ITEMS=null, EXAMPLE=null, TYPE=null, FORMAT=null, READ_ONLY=null, VENDOR_EXTENSIONS={}, MULTIPLE_OF=null}
8774 [ZAP-Import-OpenAPI-1] WARN io.swagger.util.PropertyDeserializer - no property from null, null, {ENUM=null, TITLE=null, DESCRIPTION=null, DEFAULT=null, PATTERN=null, DESCRIMINATOR=null, MIN_ITEMS=null, MAX_ITEMS=null, MIN_PROPERTIES=null, MAX_PROPERTIES=null, MIN_LENGTH=null, MAX_LENGTH=null, MINIMUM=null, MAXIMUM=null, EXCLUSIVE_MINIMUM=null, EXCLUSIVE_MAXIMUM=null, UNIQUE_ITEMS=null, EXAMPLE=null, TYPE=null, FORMAT=null, READ_ONLY=null, VENDOR_EXTENSIONS={}, MULTIPLE_OF=null}
8775 [ZAP-Import-OpenAPI-1] WARN io.swagger.util.PropertyDeserializer - no property from null, null, {ENUM=null, TITLE=null, DESCRIPTION=null, DEFAULT=null, PATTERN=null, DESCRIMINATOR=null, MIN_ITEMS=null, MAX_ITEMS=null, MIN_PROPERTIES=null, MAX_PROPERTIES=null, MIN_LENGTH=null, MAX_LENGTH=null, MINIMUM=null, MAXIMUM=null, EXCLUSIVE_MINIMUM=null, EXCLUSIVE_MAXIMUM=null, UNIQUE_ITEMS=null, EXAMPLE=null, TYPE=null, FORMAT=null, READ_ONLY=null, VENDOR_EXTENSIONS={}, MULTIPLE_OF=null}
8923 [ZAP-Import-OpenAPI-1] WARN io.swagger.util.PropertyDeserializer - no property from null, null, {ENUM=null, TITLE=null, DESCRIPTION=null, DEFAULT=null, PATTERN=null, DESCRIMINATOR=null, MIN_ITEMS=null, MAX_ITEMS=null, MIN_PROPERTIES=null, MAX_PROPERTIES=null, MIN_LENGTH=null, MAX_LENGTH=null, MINIMUM=null, MAXIMUM=null, EXCLUSIVE_MINIMUM=null, EXCLUSIVE_MAXIMUM=null, UNIQUE_ITEMS=null, EXAMPLE=null, TYPE=null, FORMAT=null, READ_ONLY=null, VENDOR_EXTENSIONS={}, MULTIPLE_OF=null}
8965 [ZAP-Import-OpenAPI-1] WARN org.zaproxy.zap.extension.openapi.ExtensionOpenApi -
java.lang.NullPointerException
at org.zaproxy.zap.extension.openapi.generators.ArrayGenerator.generate(ArrayGenerator.java:53)
at org.zaproxy.zap.extension.openapi.generators.DataGenerator.generateBodyValue(DataGenerator.java:107)
at org.zaproxy.zap.extension.openapi.generators.BodyGenerator.generate(BodyGenerator.java:90)
at org.zaproxy.zap.extension.openapi.converter.swagger.RequestModelConverter.generateBody(RequestModelConverter.java:76)
at org.zaproxy.zap.extension.openapi.converter.swagger.RequestModelConverter.convert(RequestModelConverter.java:49)
at org.zaproxy.zap.extension.openapi.converter.swagger.SwaggerConverter.convertToRequest(SwaggerConverter.java:83)
at org.zaproxy.zap.extension.openapi.converter.swagger.SwaggerConverter.getRequestModels(SwaggerConverter.java:77)
at org.zaproxy.zap.extension.openapi.ExtensionOpenApi$3.run(ExtensionOpenApi.java:218)
2019-04-23 23:00:37,352 Trigger hook: pre_exit, args: 3
2019-04-24 01:23:43,238 Target: swagger2.json
2019-04-24 01:23:43,238 Could not find custom hooks file at /home/zap/.zap_hooks.py
2019-04-24 01:23:43,239 Trigger hook: cli_opts, args: 1
2019-04-24 01:23:43,243 Using port: 53696
2019-04-24 01:23:43,243 Trigger hook: start_zap, args: 2
2019-04-24 01:23:43,243 Starting ZAP
2019-04-24 01:23:43,243 Params: ['zap-x.sh', '-daemon', '-port', '53696', '-host', '0.0.0.0', '-config', 'api.disablekey=true', '-config', 'api.addrs.addr.name=.*', '-config', 'api.addrs.addr.regex=true', '-addonupdate', '-addoninstall', 'pscanrulesBeta', '-configfile', '/zap/wrk/zap.config']
2019-04-24 01:23:43,252 Starting new HTTP connection (1): localhost:53696
2019-04-24 01:23:44,260 Starting new HTTP connection (1): localhost:53696
2019-04-24 01:23:45,264 Starting new HTTP connection (1): localhost:53696
2019-04-24 01:23:46,269 Starting new HTTP connection (1): localhost:53696
2019-04-24 01:23:47,274 Starting new HTTP connection (1): localhost:53696
/zap/zap-x.sh: 10: kill: No such process
2019-04-24 01:23:48,279 Starting new HTTP connection (1): localhost:53696
2019-04-24 01:23:49,289 Starting new HTTP connection (1): localhost:53696
2019-04-24 01:23:50,296 Starting new HTTP connection (1): localhost:53696
2019-04-24 01:23:51,302 Starting new HTTP connection (1): localhost:53696
2019-04-24 01:23:52,310 Starting new HTTP connection (1): localhost:53696
2019-04-24 01:23:53,313 Starting new HTTP connection (1): localhost:53696
2019-04-24 01:23:54,320 Starting new HTTP connection (1): localhost:53696
2019-04-24 01:23:55,324 Starting new HTTP connection (1): localhost:53696
...