Repository navigation
chore(codeql): exclude tests and remove invalid local pack reference - #133
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resumen
Dos correcciones al workflow de CodeQL (
.github/workflows/codeql.yml), en commits separados:f4bfb03— Excluye la suite de pruebas del análisis añadiendopaths-ignorea la configuración inline.6a71190— Elimina la referencia inválida al pack personalizado local (packs:), que producía un warning en cada ejecución y nunca cargaba.1. Excluir pruebas (
paths-ignore)Justificación (datos reales de code scanning): 32 alertas históricas, 0 abiertas; 15 en
tests/, todas descartadas (ruido de payloads intencionados:py/incomplete-url-substring-sanitization,py/reflective-xss). Se usapaths-ignore(nopaths: [src]) para preservar el análisis de cualquier Python futuro fuera detests/.src/queda íntegramente cubierto.Efecto documentado: deja de analizarse
tests/testserver.py(servidor local real de los tests de integración, alertas ya descartadas; solo escucha en localhost, no distribuido). Riesgo bajo, aceptado.2. Eliminar la referencia al pack local (
packs:)Problema: el bloque
referenciaba un model pack local sin publicar por ruta. Cada ejecución emitía:
Causa raíz (verificada): el campo
packsdel code scanning config solo resuelve packs por nombrescope/name[@version]desde GHCR.codeql-actionno soporta rutas locales (:path) ni añade el checkout al search path (--additional-packsno está expuesto como input). Por tanto el pack nunca cargó; las barreraspath-injectionderesolve_and_validate_path/validate_export_path_onlyno tenían efecto.Solución: se elimina la referencia rota. El warning desaparece de todas las ejecuciones. Los archivos del pack se conservan en
.github/codeql/extensions/ciberwebscan-python-models/como especificación inerte.Si en el futuro se quiere que el pack cargue: debe publicarse en GHCR (
codeql pack publish, requierepermissions: packages: write) y referenciarse por nombrehc-online/ciberwebscan-python-models. Es trabajo aparte, no incluido aquí.Verificación
Ejecución de CodeQL en este PR: success. Log de
init: sinInvalid CodeQL pack; config augmentado contiene solopaths-ignore(los 4 patrones); 0 alertas abiertas.