Skip to main content
Skip to content

끌어오기 요청에 대한 AI 검사

AI Scan은 AI 기반 검색 엔진을 사용하여 적용되지 CodeQL않는 언어 및 프레임워크에 대한 끌어오기 요청에서 보안 취약성을 찾습니다.

AI Scan for pull requests produces additional security findings with an AI-based scanning engine that runs on pull requests and complements CodeQL.

AI Scan expands code scanning coverage for pull requests without requiring a separate scanning tool or build configuration.

AI Scan for pull requests is one of the independently controlled features grouped under AI Scan in GitHub settings. See AI Scan 정보.

Availability

Availability depends on who owns the repository and its visibility.

Repository ownerVisibilityAvailability and requirement
OrganizationPublicAvailable without an active-committer license
OrganizationPrivate or internalAvailable with GitHub Code Security or GitHub Advanced Security
Personal accountPublicAvailable
Personal accountPrivateNot available

AI Scan for pull requests is not available for repositories in a managed user account's personal namespace, even if code scanning is enabled for the repository.

You do not need a GitHub Copilot license to use AI Scan.

Billing

AI Scan usage is separate from active-committer licensing and is reported under the Code Security AI credits SKU. Usage begins only when a qualifying pull request is scanned.

For organization-owned repositories, usage is billed to the account responsible for the organization's billing.

For public repositories owned by a personal account, usage is billed to that personal account unless the repository owner has a GitHub Copilot license provided by an organization or enterprise. In that case, usage is billed to the organization or enterprise that provides the license.

If the billing account receives included AI credits through a GitHub Copilot entitlement, AI Scan uses those credits first. After the included credits are exhausted, or if the account has no included credits, usage is metered and governed by the applicable budgets. If a hard budget leaves no Code Security AI credits available, AI Scan cannot produce findings. Scanning resumes when an administrator increases the limiting budget or a new billing cycle begins.

For details about the billing model, see GitHub Advanced Security 라이선스 결제.

How AI Scan works

AI Scan runs automatically when all the following conditions are met:

  • Code scanning is enabled for the repository.
  • The repository's AI Scan on pull requests setting is enabled.
  • A pull request that is not from a fork or created by Dependabot contains changes in a supported language or framework that CodeQL does not cover.

Scans run when a pull request is created and after each new commit, as they do for CodeQL.

AI Scan does not require CodeQL default setup and does not depend on the state of CodeQL analysis. If CodeQL analysis fails or is in a waiting state, AI Scan will still run.

Results are posted to the pull request as they are found. If the CodeQL scan takes longer to complete, you may see AI Scan findings before CodeQL results appear, or vice versa.

Findings are advisory. They do not fail the Code scanning check and cannot block pull request merges through ruleset requirements. They provide signals about where code security can be improved without interrupting your workflow.

The scanning engine analyzes pull request code without requiring a build system and may use code search to gather more context from the repository before flagging an issue. It uses specialized prompts, not custom instruction files such as /.github/copilot-instructions.md or /CLAUDE.md.

How AI Scan findings appear on pull requests

AI Scan findings appear alongside CodeQL alerts on the Conversation and Files changed tabs of a pull request. Each finding is labeled with an "AI" indicator so you can distinguish it from CodeQL alerts.

Each finding describes the security issue and explains the risk. Most findings also include a suggested remediation. When available, Copilot Autofix recommends a code change, as it does for CodeQL alerts.

You can use the thumbs up or thumbs down control to provide feedback and help improve detection quality.

Limitations

  • AI Scan findings cannot yet be used in rulesets to enforce merge requirements.
  • AI Scan does not run on pull requests from forks or pull requests created by Dependabot.
  • Self-hosted runners are not supported.
  • Detection categories and supported languages may change as the feature evolves.
  • As with any AI-based tool, AI Scan findings may include false positives. Use the feedback mechanism to report inaccurate results.

Supported languages

AI Scan on pull requests supports selected languages and frameworks that CodeQL does not currently cover. Examples include PHP, Shell/Bash, Terraform configuration (HCL), Dockerfiles, JSP for Java, and Blazor for C#.

To check whether CodeQL supports a language, see CodeQL을 사용하여 코드 검색.

Detection categories

AI Scan currently classifies findings into the following categories. Coverage may change as the feature evolves.

  • String injection — Unsafe string-built SQL, HTML, shell, JSON, or YAML with missing or incorrect escaping or sanitization.
  • Weak cryptography — Weak algorithms, small keys, insecure randomness, missing encryption, or weak password hashing.
  • Broken access control — Path traversal, CSRF gaps, or user-driven open redirects.
  • Sensitive data exposure — Secrets, tokens, passwords, or stack traces stored, logged, or sent without adequate protection.
  • Security misconfiguration — Risky defaults or settings, such as disabling security controls or enabling debug features.
  • Authentication failures — Missing TLS or validation, insecure authentication flows, or missing rate limiting.
  • Data integrity failures — Unsafe deserialization, HTTP for sensitive actions, prototype pollution, or executing untrusted content.
  • Server-side request forgery (SSRF) — Server fetches attacker-controlled URLs, hosts, or protocols.
  • Supply chain risks — Unpinned third-party actions, packages, or images, or downloads without integrity checks.

Enabling AI Scan

AI Scan for pull requests and AI applications scanning are separate features under AI Scan. AI applications scanning has its own Scan for AI applications control and detects risks such as indirect prompt injection in AI applications and agents. Enabling either feature doesn't enable the other. For more information about AI applications scanning, see 풀 리퀘스트를 검색하는 AI 애플리케이션.

Before enabling AI Scan on pull requests for an organization, confirm repository eligibility, review the billing account's included AI credits, and configure budgets for metered usage.

Enabling the organization setting enables AI Scan immediately for all eligible repositories where code scanning is enabled. Repository administrators can then opt out, but qualifying pull requests can consume Code Security AI Credits before they do.

You do not need to select a model to enable AI Scan.

  • Enterprise: Enterprise owners can allow or prevent organizations from enabling AI Scan. The policy is set to "Not allowed" by default. This policy controls both AI Scan on pull requests and AI Scan for a repository's backlog. Allowing AI Scan does not enable it automatically. See 엔터프라이즈에 대한 코드 보안 및 분석을 위한 정책 적용.
  • Organization: Organization owners and security managers can enable AI Scan for pull requests for eligible repositories. Repositories inherit the organization setting. See 조직에 대한 글로벌 보안 설정 구성.
  • Organization-owned repository: People with admin access to the repository can opt out when the organization has enabled AI Scan. They cannot opt in when the organization setting is disabled.
  • Public repository owned by a personal account: People with admin access to the repository enable or disable AI Scan directly by using the AI Scan for pull requests toggle under "Code scanning".

Organization owners and security managers can review the effective enablement status of AI Scan for pull requests in the "Coverage" view of security overview. See 보안 기능 채택 평가.

People with access to security overview can also monitor AI Scan findings across an organization or enterprise:

  • The Prevention tab on the overview dashboard shows trends in AI Scan findings, how many findings were resolved, and how often developers accepted a Copilot Autofix suggestion.
  • The AI Scan tab in the "Code scanning on pull requests" report shows findings over time, the availability of Copilot Autofix suggestions, and the outcomes of findings with and without suggestions.

For more information, see 풀 리퀘스트에 대한 코드 검사.

You can use the REST API to manage the organization or repository AI Scan setting. Use the pr_scan property to enable or disable AI Scan for pull requests. The same endpoints manage AI Scan for repositories through the repository_scan property. See 리포지토리 백로그용 AI 스캔 and 코드 검색에 대한 REST API 엔드포인트.