Nota: Las Escaneo de secretos para los repositorios privados se encuentran actualmente en beta y están sujetas a cambios. Para solicitar acceso al beta,, únete a la lista de espera.
Note: Escaneo de secretos is enabled by default on public repositories and cannot be turned off. You can configure escaneo de secretos for your private repositories only.
Enabling escaneo de secretos for private repositories
-
En GitHub, visita la página principal del repositorio.
-
Debajo de tu nombre de repositorio, da clic en Configuración.

-
En la barra lateral izquierda, da clic en Seguridad & análisis.

-
If Advanced Security is not already enabled for the repository, to the right of "GitHub Advanced Security", click Enable.

-
Review the impact of enabling Advanced Security, then click Enable GitHub Advanced Security for this repository.
-
When you enable Advanced Security, escaneo de secretos may automatically be enabled for the repository due to the organization's settings. If "Escaneo de secretos" is shown with an Enable button, you still need to enable escaneo de secretos by clicking Enable. If you see a Disable button, escaneo de secretos is already enabled.

Excluding alerts from escaneo de secretos in private repositories
You can use a secret_scanning.yml file to exclude directories from escaneo de secretos. For example, you can exclude directories that contain tests or randomly generated content.
-
En GitHub, visita la página principal del repositorio.
-
En la parte superior de la lista de archivos, utilizando el menú desplegable de Agregar archivo, da clic en Crear archivo nuevo.

-
In the file name field, type .github/secret_scanning.yml.
-
Under Edit new file, type
paths-ignore:followed by the paths you want to exclude from escaneo de secretos.paths-ignore: - "foo/bar/*.js"You can use special characters, such as
*to filter paths. For more information about filter patterns, see "Workflow syntax for GitHub Actions."Notes:
- If there are more than 1,000 entries in
paths-ignore, escaneo de secretos will only exclude the first 1,000 directories from scans. - If secret_scanning.yml is larger than 1 MB, escaneo de secretos will ignore the entire file.
- If there are more than 1,000 entries in
You can also ignore individual alerts from escaneo de secretos. For more information, see "Managing alerts from escaneo de secretos."