The log and diagnostic information available to you depends on the method you use for code scanning in your repository. You can check the type of code scanning you're using in the Security tab of your repository, by using the Tool drop-down menu in the alert list. To access this page, see Evaluación de alertas de análisis de código para el repositorio.
Logs on GitHub
You can see analysis and diagnostic information for code scanning run using CodeQL analysis on GitHub.
- Analysis information is shown for the most recent analysis in a header at the top of the list of alerts. See Evaluación de alertas de análisis de código para el repositorio.
- Diagnostic information is displayed in the GitHub Actions workflow logs and consists of summary metrics and extractor diagnostics. To access these logs, see Viewing code scanning logs from GitHub Actions.
Summary metrics
Las métricas de resumen incluyen:
- Las líneas de código en la base de código (que se utilizan como línea base), antes de la creación y extracción de la base de datos de CodeQL
- Las líneas de código en la base de datos de CodeQL que se extrajeron del código, incluyendo las bibliotecas externas y los archivos autogenerados
- Las líneas de código en la base de datos de CodeQL, excluyendo los archivos autogenerados y las bibliotecas externas
Source code extraction diagnostics
El diagnóstico de extractor solo cubre los archivos que se vieron durante el análisis, las métricas incluyen:
- Cantidad de archivos que se analizaron con éxito
- Cantidad de archivos que generaron errores de extractor durante la creación de la base de datos
- Cantidad de archivos que generaron alertas del extractor durante la creación de la base de datos
You can see more detailed information about CodeQL extractor errors and warnings that occurred during database creation by enabling debug logging. See Los registros no son lo suficientemente detallados.
Logs for the CodeQL CLI
If you're using the CodeQL CLI outside GitHub, you'll see diagnostic information in the output generated during database analysis. This information is also included in the SARIF results file.
Logs in VS Code
Progress and error messages are displayed as notifications in the bottom right corner of the Visual Studio Code workspace. These link to more detailed logs and error messages in the "Output" window.
You can access separate logs for the CodeQL extension, language server, query Server, or tests. The Language Server log contains more advanced debug logs for CodeQL language maintainers. You should only need these to provide details in a bug report.
To access these logs, see Accessing logs for CodeQL in Visual Studio Code.