About the GitHub-recommended security configuration
The GitHub-recommended security configuration is a set of industry best practices and features that provide a robust, baseline security posture for enterprises. This configuration is created and maintained by subject matter experts at GitHub, with the help of multiple industry leaders and experts. The GitHub-recommended security configuration is designed to successfully reduce the security risks for low- and high-impact repositories. We recommend you apply this configuration to all the repositories in your enterprise.
Warning
GitHub may add new features to the GitHub-recommended security configuration without warning. If you have concerns and prefer to test out features before they are turned on, we suggest you do not use the GitHub-recommended security configuration.
Applying the GitHub-recommended security configuration to repositories in your enterprise
-
En la esquina superior derecha de GitHub, haz clic en la fotografía del perfil.
-
En función de tu entorno, haz clic en Your enterpriseo en Your enterprises y, a continuación, haz clic en la empresa que deseas ver.
-
En el lado izquierdo de la página, en la barra lateral de la cuenta de empresa, haz clic en Configuración.
-
In the left sidebar, click Code security.
-
In the "GitHub recommended" row of the configurations table for your enterprise, select the Apply to dropdown menu, then click All repositories or All repositories without configurations.
-
Opcionalmente, en el cuadro de diálogo de confirmación, puede optar por aplicar automáticamente el security configuration a los repositorios recién creados en función de su visibilidad. Seleccione el menú desplegable Ninguno y, a continuación, haga clic en Público, en Privado e interno o en ambos.
-
Para aplicar el security configuration, haga clic en Aplicar.
El security configuration se aplica tanto a los repositorios activos como a los archivados porque algunas funciones de seguridad se ejecutan en los repositorios archivados, por ejemplo, secret scanning. Además, si un repositorio se desarchiva más adelante, puede estar seguro de que está protegido por el security configuration seleccionado.
If security configurations fail to apply to some organizations in your enterprise, GitHub will display a banner on the UI to let you know. You can click the links on the banner to get more information about the organizations and repositories involved.
Enforcing the GitHub-recommended security configuration
- En la esquina superior derecha de GitHub, haz clic en la fotografía del perfil.
- En función de tu entorno, haz clic en Your enterpriseo en Your enterprises y, a continuación, haz clic en la empresa que deseas ver.
- En el lado izquierdo de la página, en la barra lateral de la cuenta de empresa, haz clic en Configuración.
- In the left sidebar, click Code security.
- In the "Configurations" section, select "GitHub recommended".
- In the "Policy" section, next to "Enforce configuration", select Enforce from the dropdown menu.
Note
If a user in your enterprise attempts to change the enablement status of a feature in an enforced configuration using the REST API, the API call will appear to succeed, but no enablement statuses will change.
Some situations can break the enforcement of security configurations for a repository. For example, the enablement of code scanning will not apply to a repository if:
- GitHub Actions is initially enabled on the repository, but is then disabled in the repository.
- GitHub Actions required by code scanning configurations are not available in the repository.
- The definition for which languages should not be analyzed using code scanning default setup is changed.