Skip to main content

Results are different than expected

If your code scanning results are different than you expected, you can check which configurations are active.

If your code scanning results are different than you expected, you may have both default and advanced setup configured for your repository. When you enable default setup, this disables the existing CodeQL workflow file and blocks any CodeQL API analysis from uploading results.

To check if default setup is enabled, navigate to the main page of the repository, then click Settings. In the "Security" section of the sidebar, click Advanced Security. In the "Code scanning" section of the page, next to "CodeQL analysis", click . If there is a Switch to advanced option, you are currently using default setup.

If you want to return to using advanced setup and get code scanning results from your custom workflow file, click Disable CodeQL to disable default setup. Then you should re-enable your pre-existing workflows to start triggering and uploading results from advanced setup. For more information, see Отключение и включение рабочего процесса and Configuring advanced setup for code scanning.

В некоторых случаях репозиторий может использовать несколько конфигураций code scanning. Эти конфигурации могут создавать повторяющиеся оповещения. Кроме того, устаревшие конфигурации, которые больше не выполняются, будут отображать устаревшие состояния оповещений, и устаревшие оповещения будут оставаться открытыми на неопределенный срок. Чтобы избежать устаревших оповещений, следует удалить устаревшие конфигурации code scanning из ветви. Дополнительные сведения о нескольких конфигурациях и удалении устаревших конфигураций см. в разделе [AUTOTITLE и О предупреждениях о сканировании кода](/code-security/code-scanning/managing-code-scanning-alerts/resolving-code-scanning-alerts#removing-stale-configurations-and-alerts-from-a-branch).