Anyone with read permission for a repository can see code scanning annotations on pull requests. For more information, see Triaging code scanning alerts in pull requests.
Viewing the alerts for a repository
You need write permission to view a summary of all the alerts for a repository on the Security tab.
By default, the code scanning alerts page is filtered to show alerts for the default branch of the repository only.
-
En GitHub, navegue hasta la página principal del repositorio.
-
Debajo del nombre del repositorio, haz clic en Security. Si no puedes ver la pestaña "Security", selecciona el menú desplegable y, después, haz clic en Security.

-
En la barra lateral de la izquierda, haz clic en Code scanning.
-
Optionally, use the free text search box or the dropdown menus to filter alerts. For example, you can filter by the tool that was used to identify alerts.

-
Debajo de "Code scanning", haz clic en la alerta que quieras explorar para mostrar la página de alerta detallada. El estado y los detalles de la página de alertas solo reflejan el estado de la alerta en la rama predeterminada del repositorio, incluso si la alerta existe en otras ramas. Puede ver el estado de la alerta en ramas no predeterminadas en la sección Ramas afectadas del lado derecho de la página de alertas. Si una alerta no existe en la rama predeterminada, el estado de la alerta se mostrará como "en la solicitud de incorporación de cambios" o "en la rama", y tendrá un color gris. En la sección Desarrollo se muestran ramas vinculadas y solicitudes de incorporación de cambios que corregirán la alerta.
-
Optionally, if the alert highlights a problem with data flow, click Show paths to display the path from the data source to the sink where it's used.

-
Alerts from CodeQL analysis include a description of the problem. Click Show more for guidance on how to fix your code.
-
Opcionalmente, asigna la alerta a alguien para corregirla mediante el control Usuarios asignados que se muestra a la derecha, consulte Asignación de alertas.
For more information, see Acerca de las alertas de análisis de código.
Nota:
You can see information about when code scanning analysis last ran on the tool status page. For more information, see Acerca de la página de estado de la herramienta para el examen de código.
Viewing metrics for CodeQL pull request alerts for an organization
For code scanning alerts from CodeQL analysis, you can use security overview to see how CodeQL is performing in pull requests in repositories where you have write access across your organization, and to identify repositories where you may need to take action. For more information, see Viewing metrics for pull request alerts.
Filtering code scanning alerts
You can filter the alerts shown in the code scanning alerts view. This is useful if there are many alerts as you can focus on a particular type of alert. There are some predefined filters and a range of keywords that you can use to refine the list of alerts displayed.
When you select a keyword from either a drop-down list, or as you enter a keyword in the search field, only values with results are shown. This makes it easier to avoid setting filters that find no results.

If you enter multiple filters, the view will show alerts matching all these filters. For example, is:closed severity:high branch:main will only display closed high-severity alerts that are present on the main branch. The exception is filters relating to refs (ref, branch and pr): is:open branch:main branch:next will show you open alerts from both the main branch and the next branch.
Tenga en cuenta que si ha filtrado las alertas en una rama no predeterminada, pero las mismas alertas existen en la rama predeterminada, en la página de alertas de cualquier alerta se seguirá reflejando el estado de la alerta en la rama predeterminada, incluso si ese estado entra en conflicto con el de una rama no predeterminada. Por ejemplo, una alerta que aparece en la lista "Abrir" en el resumen de alertas para branch-x podría mostrar un estado de "Corregido" en la página de alertas, si ya se ha corregido en la rama predeterminada. Puede ver el estado de la alerta de la rama filtrada en la sección Ramas afectadas del lado derecho de la página de alertas.
You can prefix the tag filter with - to exclude results with that tag. For example, -tag:style only shows alerts that do not have the style tag.
Restricting results to application code only
You can use the "Only alerts in application code" filter or autofilter:true keyword and value to restrict results to alerts in application code. For more information about the types of code that are automatically labeled as not application code, see Acerca de las alertas de análisis de código.
Searching code scanning alerts
You can search the list of alerts. This is useful if there is a large number of alerts in your repository, or if you don't know the exact name for an alert for example. GitHub performs the free text search across:
- The name of the alert
- The alert details (this also includes the information hidden from view by default in the Show more collapsible section)
| Supported search | Syntax example | Results |
|---|---|---|
| Single word search | injection | Returns all the alerts containing the word injection |
| Multiple word search | sql injection | Returns all the alerts containing sql or injection |
| Exact match search (use double quotes) | "sql injection" | Returns all the alerts containing the exact phrase sql injection |
| OR search | sql OR injection | Returns all the alerts containing sql or injection |
| AND search | sql AND injection | Returns all the alerts containing both words sql and injection |
Sugerencia
- The multiple word search is equivalent to an OR search.
- The AND search will return results where the search terms are found anywhere, in any order in the alert name or details.
- En GitHub, navegue hasta la página principal del repositorio.
- Debajo del nombre del repositorio, haz clic en Security. Si no puedes ver la pestaña "Security", selecciona el menú desplegable y, después, haz clic en Security.

- En la barra lateral de la izquierda, haz clic en Code scanning.
- To the right of the Filters drop-down menus, type the keywords to search for in the free text search box.

- Press return. The alert listing will contain the open code scanning alerts matching your search criteria.
Auditing responses to code scanning alerts
Puedes auditar las acciones realizadas en respuesta a las alertas de code scanning mediante las herramientas de GitHub. Para más información, consulta Auditoría de alertas de seguridad.