Skip to main content

Applying the GitHub-recommended security configuration to your enterprise

Secure your code with the security enablement settings created, managed, and recommended by GitHub.

¿Quién puede utilizar esta característica?

Enterprise owners and members with the admin role

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.

  1. En la esquina superior derecha de GitHub, haz clic en la fotografía del perfil.

  2. 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.

  3. En el lado izquierdo de la página, en la barra lateral de la cuenta de empresa, haz clic en Configuración.

  4. In the left sidebar, click Code security.

  5. 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.

  6. 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.

  7. 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.

  1. En la esquina superior derecha de GitHub, haz clic en la fotografía del perfil.
  2. 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.
  3. En el lado izquierdo de la página, en la barra lateral de la cuenta de empresa, haz clic en Configuración.
  4. In the left sidebar, click Code security.
  5. In the "Configurations" section, select "GitHub recommended".
  6. 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.