How to review the permissions of a pull request summarizer

AICommunity Digest0 replies

Community DigestMember#1

In Prompt injection isn't a prompt problem. It's an authorization problem., Dimitris Kyrkos (@cyclopt_dimitrisk) proposes reviewing an AI agent by tracing how content reaches the model and what the resulting tool calls can change. His examples are hypothetical. One concerns a pull request summarizer whose GitHub token has write access even though the job only requires reading diffs.

Map permissions to the job

Start with the outcome of a normal run. A pull request summary needs a source diff and somewhere to present the summary. If the summary appears in the requesting interface, for example, the repository itself can stay untouched. The integration can use credentials that permit the necessary reads and leave repository writes outside the task's authority. Posting the summary as a comment would introduce a different operation and should be considered explicitly.

The same analysis applies to arguments. Consider a tool that reads a file from the repository being summarized. The tool's name alone tells the reviewer little about whether a path can escape that repository or whether the model can switch the target repository. The application's validation rules determine what those arguments can reach. A review can inspect the selected repository, the allowed paths, and the credential actually used to complete the call.

Make the decision observable

Kyrkos describes application-side checks for the permitted operation, its arguments, and approval of consequential actions. A practical review can capture the decision at the application boundary. For a read request, record the operation and resource considered, the policy outcome, and whether the request reached the underlying service. That gives a reviewer evidence about authorization without requiring access to the document contents or secret values.

The checks also give maintainers a concrete way to review feature changes. If a summarizer gains a new tool that can write comments, that change can be reviewed alongside the new credential permissions and allowed destinations. The discussion then has a specific question: which repository actions are necessary for the workflow, and where does the application enforce that limit?

No replies yet