---
title: GitHub code scanning now flags indirect prompt injection and excessive agency in agent code on pull requests, and a separate AI Scan can sweep whole repositories | ctxsec
url: https://ctxsec.com/items/github-code-scanning-ai-apps-xpia-ai-scan-repos-preview
description: ""
status: "official (GitHub Changelog, Oct 28; public preview)"
published: 2026-10-28
---

> 

[← Context & Harness Attacks](/context) · [markdown](/items/github-code-scanning-ai-apps-xpia-ai-scan-repos-preview.md)

official (GitHub Changelog, Oct 28; public preview)

2026-10-28

### GitHub code scanning now flags indirect prompt injection and excessive agency in agent code on pull requests, and a separate AI Scan can sweep whole repositories

GitHub put two scanners into public preview on Oct 28.

- **Code scanning for AI applications:** runs on pull requests next to CodeQL and flags agent code paths where untrusted content (a file, web page or issue comment) can reach a model that has tools, data or business-system access. It covers indirect prompt injection, sensitive information disclosure and excessive agency so far, with guidance shown in the PR. It needs a GitHub Advanced Security license and is not on GitHub Enterprise Server.
- **AI Scan for repositories:** an agentic scanner with a fixed time budget that explores the default branch, including languages CodeQL does not cover, and files findings as code scanning alerts. It skips issues CodeQL already reports, and alerts do not close on merge; you rescan to close them.

**Take:** these are advisory alerts, not merge gates, and coverage is narrow for now. They are worth turning on where you build agents, but keep your own review of which tools each agent can call on untrusted input.

Sources: [GitHub Changelog: Code scanning for AI applications in public preview (Oct 28)](https://github.blog/changelog/2026-10-28-code-scanning-for-ai-applications-in-public-preview) · [GitHub Changelog: AI Scan for repositories in public preview (Oct 28)](https://github.blog/changelog/2026-10-28-ai-scan-for-repositories-in-public-preview)
