Hi,
the cmd example working on my side with certificate (P12) is like that. I put the certificate P12 to /DAST/ and you need change the {password} with a good password.
btw, it doesn't support only the cert. you must provide the p12. you can create your p12 from the key and certificate using openssl.
openssl pkcs12 -export -out keyStore.p12 -inkey myKey.pem -in certs.pem
Hope it is helpful.
Best regards,
Yi S.
docker run --network="host" \
-v ~/DAST/:/zap/wrk/:rw \
-t owasp/zap2docker-stable zap-api-scan.py \
-t api.json \
-f openapi \
-z "-config certificate.use=true -config certificate.pkcs12.password={password} -config certificate.pkcs12.index=0 -config certificate.pkcs12.path=/zap/wrk/keyStore.p12" \
-r zapReport.html \
-d