Skip to content

Latest commit

 

History

History
58 lines (42 loc) · 3.73 KB

advanced-security-must-be-enabled.md

File metadata and controls

58 lines (42 loc) · 3.73 KB
title shortTitle intro allowTitleToDifferFromFilename type topics versions
Error: "Advanced Security must be enabled for this repository to use code scanning"
Advanced Security must be enabled
If you see this error, make sure that {% data variables.product.prodname_GH_advanced_security %} is enabled.
true
reference
Code scanning
Errors
Troubleshooting
fpt ghes ghec
*
*
*

About this error

Advanced Security must be enabled for this repository to use code scanning
403: GitHub Advanced Security is not enabled

This error is reported if you try to run {% data variables.product.prodname_code_scanning %} in a repository where {% data variables.product.prodname_GH_advanced_security %} is not enabled or where use of this feature is blocked by a policy.

{% ifversion fpt or ghec %}You will only see this error for repositories with private or internal visibility. {% data variables.product.prodname_GH_advanced_security %} is enabled by default for all public repositories.{% endif %}

Confirming the cause of the error

{% ifversion fpt %} If you are on a free, pro, or team plan, you can only use {% data variables.product.prodname_code_scanning %} on repositories that are publicly available. To enable {% data variables.product.prodname_code_scanning %} for private or internal repositories, you must upgrade to GitHub Enterprise with {% data variables.product.prodname_GH_advanced_security %} and enable {% data variables.product.prodname_GH_advanced_security %} for the repository. For more information, see "AUTOTITLE" and "AUTOTITLE."

{% else %}

{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} {% data reusables.user-settings.security-analysis %}

  1. Scroll down to "{% data variables.product.prodname_GH_advanced_security %}."

  2. If there is an associated and active Enable button, {% data variables.product.prodname_GH_advanced_security %} is available for this repository but not yet enabled.

  3. If use of {% data variables.product.prodname_GH_advanced_security %} is blocked by a policy, the Enable button is inactive and the owner of the policy is listed.

    Screenshot of the "{% data variables.product.prodname_GH_advanced_security %}" setting. The owner of the enterprise policy and the inactive "Enable" button are highlighted with a dark orange outline.

Fixing the problem

If {% data variables.product.prodname_GH_advanced_security %} is available to your repository, you can enable it on the settings page. If {% data variables.product.prodname_GH_advanced_security %} is blocked by a policy, you first need to request access.

Requesting access to {% data variables.product.prodname_GH_advanced_security %}

  1. In the "{% data variables.product.prodname_GH_advanced_security %}" settings, click the enterprise name to display a list of users with access to edit the policy that controls access to {% data variables.product.prodname_GH_advanced_security %}. For more information, see "AUTOTITLE."
  2. Follow your company's policy for requesting access to additional features.

Enabling {% data variables.product.prodname_GH_advanced_security %}

  1. In the "{% data variables.product.prodname_GH_advanced_security %}" settings, click Enable.
  2. Rerun {% data variables.product.prodname_code_scanning %}.

{% endif %}