alertFilter documentation could use some clarification
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 30/100
- Tipo de issue
- Documentación
- Claridad
- Necesita aclaración
- Estado de actividad
- Estancado
- Stack tecnológico
- docker, gitlab
- Área
- api, devops, documentation
Línea de trabajo
Comienza con el endpoint alertFilter addGlobalAlertFilter y compara el comportamiento de stable y weekly descrito en el issue; no se nombra ningún archivo del repositorio ni ninguna prueba. Aclara los parámetros requeridos, el escape, los niveles de alerta, el manejo de la URL y de los parámetros, y el efecto esperado en los informes, con ejemplos para las versiones documentadas de ZAP.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug
The ZAP daemon analyzes traffic from contract tests in the pipeline and produces a report. We are getting some "false positives" or defects that are already in WIP and would like to declassify them to informational threats.
The alert filter gives a "request: ok" but the filter is not afting the report in any way, ergo, it is not working.
To Reproduce
Steps to reproduce the behavior:
- Have in a repository a gitlab-ci file with a stage for ZAP, and ZAP running as a GitLab service
- Set up an infrastructure where you run contract tests or e2e tests, and use a proxy variable to divert traffic to ZAP Daemon
- After everything is set up, add a script file, before the tests, to configure the filter
- Add a script with CURL request to save the report
- Check the report to see that there is no change or affection due to filter alerting
Expected behavior
The alert filter should impact the results of the report and reclassify a threat. In my case, I wanted to classify this threat as False Positive.
The request (with fake URL):
curl -X -4 --retry 2 --retry-connrefused --retry-delay 3 http://zap:8090/JSON/alertFilter/action/addGlobalAlertFilter/?ruleId=10098\&newLevel=-1\&url=https%3A%2F%2Famazonaws.com%2Fapi%2Fv1%2Fpings\¶meter=Cache-Control\&enabled=true\&evidence=
Screenshots


Software versions
- ZAP: Docker stable:latest and/or weekly:latest images (same problem for both)
- Add-on: standard
- GitLab - Pipeline
- Usage: Docker as Gitlab service (reference)
Errors from zap.log file
The zap.log file is not accessible. Reason. I don't have a personal Docker coitaniner running, but I'm pulling a new image every time (since I'm using it a service).
For debugging I am using config "api.incerrordetails=true".
Additional context
My findings:
- with the error reporting option I only got: missing parameter "newLevel". After hours of troubleshooting I found that actually the problem was escaping (the parameters were concatenated with &, I just added "\ &")
- I first passed the affected url with the escape, no result. I passed it in "clear" text, no result. So it seems to accept both (or not correctly interpret both)
- In the local daemon, with my pc, i can choose between get and post methods. So I tried sending a CURL POST request, as a url and as a JSON. Both returned an error ({"code": "content_type_not_supported", "message":"!api.error.content_type_not_supported!"}
- I'm working with the global filter. I also tried context-based but it requires a real context id which I don't know.
- From the code of ZAP, it seems that only 2 parameters are actually required: ruleID and newLevel
- With the Weekly-Relase the report looks different. There is a new field called "parameters" and a new section for false positives. Due to the loss of documentation, I can't figure out if the alert filter is based on the stable image or the weekly image and how to properly set the new parameters.
**Would you like to help solve this problem?
This seems to be a really strange behavior and it would be very important for me to get it working, so yes, I would also like to help if I can.
- Lenguaje dominante
- JavaScript
- Estrellas
- 40
- Forks
- 32
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de zaproxy/zap-api-docs
-
Broken mobile layout and hidden nav make page difficult to usePosiblemente ocupada @ritorhymes la tomó hace 313 días. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 30/100
zaproxy/zap-api-docs#240 · 1 comentario ·
-
Sync Slate source code with the new versionQuizá libre de nuevo @sshniro la tomó hace 2210 días y no hay ningún pull request abierto. Abierto
zaproxy/zap-api-docs#49 · 1 comentario · 1 asignado ·
-
documentation enhancement
Dificultad 3/5 1-2 días Aptitud para principiantes 30/100
zaproxy/zap-api-docs#42 · 2 comentarios · 1 reacción ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
zaproxy/zap-api-docs#21 · 2 comentarios ·
Todos los issues de zaproxy/zap-api-docs
Issues similares
-
needs-area-label
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 2 días
-
serienstream.toAbiertoN: AdGuard for Windows P2: High T: Annoyance
Dificultad 2/5 1-3 horas Aptitud para principiantes 61/100
AdguardTeam/AdguardFilters#246310 ·
Los mantenedores suelen responder en 1 día
-
Website: the hero tip's video play() has no catch, so a refused play is an unhandled rejectionAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
liberation-data/drivine#615 ·
Los mantenedores suelen responder en 1 día
-
bug dependencies known-issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
-
unreleased dependencies
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
cloudfour/eslint-config#760 ·
Los mantenedores suelen responder en 1 día