Reproducir un error 500 en PHP con Nuclei y GitHub Actions
Group Activity 1 · Vulnerability Scanning Tools · Software Quality and Testing (SI-784) · Universidad Privada de Tacna Author: Milton H. Flores Chino · Team: Milton H. Flores Chino and Manuel Dongo Palza. Abrigando Corazones is a PHP application for a solidarity campaign in Tacna. In the Software Quality and Testing activity, we reviewed what happens when the router receives a value with a type different from the expected one. We used Nuclei to turn that case into a repeatable test and bring it into the project’s workflow.
Actividad Grupal 1 · Vulnerability Scanning Tools · Calidad y Pruebas de Software (SI-784) · Universidad Privada de Tacna Autor: Milton H. Flores Chino · Equipo: Milton H. Flores Chino y Manuel Dongo Palza. Abrigando Corazones es una aplicación PHP de una campaña solidaria en Tacna. En la actividad de Calidad y Pruebas de Software, revisamos qué ocurre cuando el enrutador recibe un valor con un tipo distinto del esperado. Usamos Nuclei para convertir ese caso en una prueba repetible y llevarla al workflow del proyecto.
Public repository: https://github.com/manuelandredp-gif/abrigando-corazones Public application: https://abrigandocorazones.site.je/impacto?i=1 Scanning and deployment workflow: deploy-infinityfree.yml Preparing the test environment. The last local check was done on November 14, 2026, with commit 4dffd5e, PHP 8.4.27, and Nuclei 3.11.1. The copy was executed on 127.0.0.1:8788, with email and metrics disabled. The public website was used as a project reference. Test requests were made to the local server.
Repositorio público: https://github.com/manuelandredp-gif/abrigando-corazones Aplicación pública: https://abrigandocorazones.site.je/impacto?i=1 Workflow de escaneo y despliegue: deploy-infinityfree.yml Preparar el entorno de prueba. La última comprobación local se hizo el 14 de noviembre de 2026 con el commit 4dffd5e, PHP 8.4.27 y Nuclei 3.11.1. La copia se ejecutó en 127.0.0.1:8788, con correo y métricas desactivados. La web pública se usó como referencia del proyecto. Las peticiones de prueba se hicieron al servidor local.
Running the scan. The Nuclei template compares two HTTP requests. First, it verifies that the normal route works. Then, it sends the url parameter as an array. The match requires both responses to meet the condition status_code_1 == 200 && status_code_2 == 500. Request on the local server Result: GET /contacto HTTP 200. The contact page loaded. GET /?url%5B%5D=contacto HTTP 500. The url parameter arrived as an array. Nuclei registered a match. A TypeError appeared in the PHP log on line 9 of app/core/Router.php. The router passes the url value directly to trim(), which expects a string: $rawUrl = isset($_GET[‘url’]) ? trim($_GET[‘url’], ’/’) : ”;
Ejecutar el escaneo. La plantilla de Nuclei compara dos peticiones HTTP. Primero verifica que la ruta normal funcione. Después envía el parámetro url como arreglo. La coincidencia exige que ambas respuestas cumplan la condición status_code_1 == 200 && status_code_2 == 500. Petición en el servidor local Resultado: GET /contacto HTTP 200. Se cargó la página de contacto. GET /?url%5B%5D=contacto HTTP 500. El parámetro url llegó como arreglo. Nuclei registró una coincidencia. En el log de PHP apareció un TypeError en la línea 9 de app/core/Router.php. El enrutador pasa el valor de url directamente a trim(), que espera una cadena: $rawUrl = isset($_GET[‘url’]) ? trim($_GET[‘url’], ’/’) : ”;
View the revised router line. We classified the finding as low in the template because the test demonstrated a server error in that request, with scope limited to the reproduced case. The proposed fix is to check the type of url before normalizing it and return HTTP 400 when receiving an array. The regression test must maintain the 200 of the valid route and check that the 500 disappears on the invalid input.
Ver la línea del enrutador revisada. Clasificamos el hallazgo como bajo en la plantilla porque la prueba demostró un error de servidor en esa petición, con alcance limitado al caso reproducido. La corrección propuesta es comprobar el tipo de url antes de normalizarlo y devolver HTTP 400 al recibir un arreglo. La prueba de regresión debe mantener el 200 de la ruta válida y comprobar que desaparece el 500 en la entrada inválida.
Integrating Nuclei into the publishing flow. The workflow packages the commit, excludes local configuration, and verifies PHP syntax. Then it launches the package copy, executes Nuclei, and saves resultados-nuclei.jsonl as an execution artifact. Preparation and scanning were verified locally with 47 validated PHP files and one reproduced finding. The publishing stage is activated manually from GitHub Actions. It is configured to transfer the package to InfinityFree via FTP with TLS and check a marker with the commit on the server. Execution #2 was blocked by billing on GitHub before starting the job. The website was already available on InfinityFree and the automated upload remains pending.
Integrar Nuclei al flujo de publicación. El workflow empaqueta el commit, excluye la configuración local y verifica la sintaxis de PHP. Luego levanta la copia del paquete, ejecuta Nuclei y guarda resultados-nuclei.jsonl como artefacto de la ejecución. La preparación y el escaneo se verificaron localmente con 47 archivos PHP validados y un hallazgo reproducido. La etapa de publicación se activa manualmente desde GitHub Actions. Está configurada para transferir el paquete a InfinityFree por FTP con TLS y comprobar en el servidor un marcador con el commit. La ejecución #2 quedó bloqueada por facturación en GitHub antes de iniciar el trabajo. La web ya estaba disponible en InfinityFree y la subida automatizada queda pendiente.
Conclusion. The most useful part of the test was being able to relate an application response to a line of code. The template allows repeating that check when the team changes the router.
Conclusión. Lo más útil de la prueba fue poder relacionar una respuesta de la aplicación con una línea de código. La plantilla permite repetir esa comprobación cuando el equipo cambie el enrutador.