For private and internal repositories, code scanning is available when GitHub Advanced Security features are enabled for the repository. If you see the error Error: "Advanced Security must be enabled for this repository to use code scanning", check that GitHub Advanced Security is enabled. For more information, see "Managing security and analysis settings for your repository."
Error: "Advanced Security must be enabled for this repository to use code scanning"
If you see this error, make sure that GitHub Advanced Security is enabled.
Code scanning is available for all public repositories on GitHub.com. Code scanning is also available for private repositories owned by organizations that use GitHub Enterprise Cloud and have a license for GitHub Advanced Security. For more information, see "About GitHub Advanced Security."