An agent may read a document, query a tool and then change a system. That chain introduces risks a simple search for dangerous functions cannot fully explain. GitHub announced an AI application code-scanning preview on October 28, bringing alerts into pull requests.

The announcement names indirect prompt injection, sensitive information disclosure and excessive agency. The preview is on github.com with a GitHub Advanced Security licence, not Enterprise Server at this stage. Information was checked on October 29.

What enters the analysis

GitHub describes checks when pull requests are created alongside existing CodeQL analysis. They look for paths where untrusted material reaches a model with access to tools or data. Code scanning and AI application scans need to be enabled.

That does not establish that every attack will be detected. Our reading is narrower: the capability provides another opportunity to identify a risky architecture before shipping it.

Draw a boundary people can explain

To investigate an alert, start with a scenario: an agent reads an external page to prepare an internal answer. Which parts of that page become instructions? Which tools remain accessible afterwards? Who authorises an irreversible action?

Write those answers in the review. Saying that a model is cautious does not describe a security boundary. A useful decision separates consulted data from authority granted to the system.

The same reasoning applies to attachments and issue comments. Existing inside a work platform does not automatically make their contents trusted instructions.

Correct the available power

Our recommendation is to address capabilities first: read-only access where sufficient, a limited data scope, controlled output destinations and approval for sensitive operations.

Prompt wording can help, but it should not carry the entire protection of an account able to transmit files or erase data. Ask what the system could do even if its model made a mistake.

Check indirect access as well. An overly broad search tool can reveal a confidential document without any function explicitly named “export secrets”.

Document which identity performs each operation. Restricting the visible interface achieves little if the underlying service account still exposes a much larger surface through another tool.

Connect an alert to a concrete decision

Imagine an assistant preparing a reply from attachments and able to create a ticket. An attachment instructs it to send a document to an external destination. This is a review example proposed by our editorial team, not an observed incident or proof of exploitability in your tool.

The first decision concerns content: are attachments material to quote or instructions to obey? The second concerns tools: does creating a ticket also allow attaching a file or external link? The third concerns identity: can the service account read more than the person requesting the action?

Those questions produce different corrections. A narrower tool schema can remove an unnecessary channel. An authorisation check can prevent access to a directory. Human approval can stop an action while still allowing a proposed response.

For every correction, write an observable criterion. “The agent follows rules” is vague; “this identity cannot obtain this document” supports a test. Retain a legitimate case too, so fixing a dangerous path does not make the service unusable.

This work does not depend on a particular scanner verdict. It helps decide what an alert needs to change in the architecture and what still requires manual verification.

It also makes future model changes easier to assess: the expected boundary remains explicit even when the wording of an answer or the implementation of a tool evolves.

Test what the scan cannot prove

Build a small collection of test documents without real data: ordinary material, contradictory instructions embedded in a source and a request for an out-of-scope action. Observe permissions and outputs actually exercised.

Keep known limitations visible. A pull request without an alert is not a certificate for the models, tools and settings later deployed into production.

This preview complements secure model integration. Its useful contribution is making boundaries discussable and verifiable earlier, not removing the need to design them.

A pilot succeeds when reviewers can identify the affected trust boundary and explain the correction. Simply accumulating another green check would miss the point.

Cover visual: generated editorial illustration, not an official screenshot.