About default setup
Default setup for code scanning is the quickest, easiest, most low-maintenance way to enable code scanning for your repository. Based on the code in your repository, default setup will automatically create a custom code scanning configuration. After enabling default setup, the code written in CodeQL-supported languages in your repository will be scanned:
- On each push to the repository's default branch, or any protected branch. For more information on protected branches, see 보호된 분기 정보.
- When creating or committing to a pull request based against the repository's default branch, or any protected branch, excluding pull requests from forks.
- On a weekly schedule.
If you need more granular control over your code scanning configuration, you should instead configure advanced setup.
Supported languages
나중에 리포지토리에 하나 이상의 CodeQL 지원 언어가 포함될 가능성이 있는 경우 적격 리포지토리에 대한 기본 설정을 사용하도록 설정하는 것이 좋습니다. CodeQL 지원 언어를 포함하지 않는 리포지토리에서 기본 설정을 사용하면 기본 설정에서 검사를 실행하거나 GitHub Actions분을 사용하지 않습니다. CodeQL 지원 언어가 리포지토리의 기본 분기에 추가되면 기본 설정에서 자동으로 CodeQL 지원 언어를 검사하고 GitHub Actions분을 사용하기 시작합니다. CodeQL 지원 언어에 대한 자세한 정보는 CodeQL을 사용하는 코드 검사 안내을(를) 참조하세요.
If the code in a repository changes to include any CodeQL-supported languages, GitHub will automatically update the code scanning configuration to include the new language. If code scanning fails with the new configuration, GitHub will resume the previous configuration automatically so the repository does not lose code scanning coverage.
Available runners
You can use default setup for all CodeQL-supported languages on self-hosted runners or GitHub-hosted runners.
You can assign self-hosted runners for default setup by giving the runners the default code-scanning label, or you can optionally give them custom labels so that individual repositories can use different runners.
Unless you have a specific use case, we recommend that you only assign runners with the default code-scanning label. However, you may want to use custom labels to:
- Assign more powerful self-hosted runners to critical repositories for faster code scanning analysis.
- Run your code scanning analyses on a particular platform (for example, macOS).
- Have granular control over the workload for your GitHub-hosted runners and self-hosted runners.
About advanced setup
Advanced setup for code scanning is helpful when you need to customize your code scanning. By creating and editing a workflow file, you can define how to build compiled languages, choose which queries to run, select the languages to scan, use a matrix build, and more. You also have access to all the options for controlling workflows, for example: changing the scan schedule, defining workflow triggers, specifying specialist runners to use.
You can also configure code scanning with third-party tools.
여러 구성을 사용하여 코드 검사를 실행할 때 경고의 분석 원본이 여러 개 있는 경우가 가끔 있습니다. 경고에 여러 분석 원본이 있는 경우 경고 페이지에서 각 분석 원본에 대한 경고 상태를 볼 수 있습니다. 자세한 내용은 코드 검사 경고 정보을(를) 참조하세요.
Next steps
You can enable default setup for a single repository, multiple repositories, or all repositories in an organization at the same time.
- For a single repository, see 코드 검사에 대한 기본 설정 구성.
- For bulk enablement, see 대규모 코드 검사를 위한 기본 설정 구성.
To configure advanced setup instead, see 코드 검사에 대한 고급 설정 구성.