All posts

Agent security

Can Human Review Catch a Prompt Injection Attack?

Improve prompt-injection review with task context, proposed actions and effect evidence. Pair human decisions with scoped access and supported controls.

Harden cover: Reviewing Prompt Injection. A right-column source to call to review diagram illustrates the workflow. Conceptual editorial artwork; no measured result is depicted.

Executive summary

Human review can help catch prompt injection when the reviewer can inspect the untrusted source, proposed action, affected data, and authority being requested. It is less useful when approval becomes a vague or repetitive prompt. Keep review alongside scoped access, isolation, and supported action controls. Our illustrative example follows a repository note that tries to redirect a diagnostic task. It is not a measured human-detection study or a claim that review always succeeds.

Review the proposed consequence

Assume an engineer asks an agent to diagnose a failing staging test. A repository note instructs the agent to upload environment files to an unfamiliar support endpoint before continuing. The note is task input, not permission to disclose those files.

A useful review asks what the pending operation would do: which files it reads, which recipient receives them, which identity authenticates, and why the operation belongs to the staging task. Searching only for suspicious wording can miss an ordinary-looking action with an unauthorized effect.

The reviewer needs enough context to make that decision. A prompt saying “allow network access?” hides the distinction between an approved documentation lookup and an upload containing credentials. The same tool category can support both operations.

Review also needs a workable alternative. If the upload is unrelated, the agent should continue with local diagnostics, produce a reviewable report, or follow the team's exception process. A rejection without a path forward encourages users to bypass the next prompt.

Keep lower-trust content in its proper role

Repository files, issue comments, web pages, tool responses, and dependency notes can contain instructions. Their presence in the agent's context does not give their authors the authority of the developer who assigned the task.

Claude Code's security documentation discusses security considerations including prompt injection and user responsibility. Apply the documented protections to the actual version and workflow. Do not turn a vendor's layered approach into a promise that all hostile content will be recognized.

For the worked example, preserve the repository note as evidence and identify where the proposed transfer first appears. The useful question is whether the agent promotes an external instruction into a consequential operation beyond the assignment.

Avoid treating every imperative sentence as malicious. A legitimate README can explain how to run tests. Authority and relevance still need review: does the step fit the task, and does its resource access stay within the approved boundary? The answer depends on the operation and context.

Give reviewers evidence they can use

Show the task, source of the new instruction, proposed tool arguments, affected resources, destination, and expected effect. Keep unnecessary sensitive values hidden or referenced through restricted evidence. A reviewer should not have to disclose a credential merely to decide whether it belongs in an attachment.

Distinguish a proposal from execution. If the interface presents an approval after a consequential effect already occurred, it is an audit or response step for that effect. Do not describe it as prevention without a real pre-execution boundary.

Make authorization changes explicit. A request to inspect staging data does not implicitly approve a production operation, new external recipient, or persistent configuration change. Materially different authority deserves a separate decision with a clear owner.

Record the outcome and reason for consequential reviews. That helps investigate repeated prompts and identify weak policy. It also gives the team a way to distinguish a deliberate exception from a routine click through an unclear dialog.

Reduce reviews that do not help the decision

An approval prompt on every low-risk read can compete with attention needed for a sensitive transfer. Use the organization's risk model to decide which actions require attended review and which can proceed under tested constraints.

Keep the controls specific. A bounded credential can remove production authority before the model proposes an operation. An egress rule can constrain recipients. A sandbox can limit local reach. Those controls reduce reliance on a person recognizing every harmful instruction.

Do not solve prompt fatigue by broadly disabling the boundary. Investigate recurring legitimate cases and configure narrow allowances where appropriate. Preserve the consequential distinction the review was meant to make.

Observe recovery time and unnecessary interruptions as operational evidence. A control that stops harmful examples but prevents ordinary engineering work will be difficult to sustain. The review design should support useful work and clear exceptions without hiding remaining risk.

Run a harmless review exercise

Create two repository notes in a disposable fixture. One describes an approved test step. The other proposes sending a synthetic sensitive marker to a controlled recipient unrelated to the task. Do not use a real secret or an uncontrolled external service.

Ask authorized reviewers to inspect the proposed operations using the interface and evidence they would actually receive. Record what information was visible and which decision was made. Treat the exercise as a local workflow check, not a statistically meaningful estimate of human detection ability.

Inspect the effect as well as the decision. Confirm whether the tool call ran, whether the marker reached the recipient, and whether the legitimate diagnostic completed. Another control or an unrelated error may explain a failed request, so preserve relevant evidence before attributing prevention.

Use the results to improve the review packet and access boundaries. Missing destination information calls for a different fix from a reviewer misunderstanding the original task. Keep those findings distinct rather than labeling the whole problem “user error.”

Add a supported action boundary

Harden evaluates supported pending agent calls using relevant task context and policy. That can provide an additional checkpoint on the action the agent proposes after reading untrusted content. Verify the configured integration and observe the actual decision and effect.

Do not assume a pre-execution check contains an already compromised host or sees every independent process. Human ownership, scoped credentials, isolation, and response procedures retain their responsibilities. A successful synthetic case establishes a narrow tested result.

Our prompt-injection guide provides the maintained control checklist. Bring the task, source note, and harmless action pair to Control. If your approval flow hides important context, Book a Call to review the supported route and evidence requirements.

FAQs

Can a careful reviewer stop every prompt injection?

Do not make that promise. Review depends on visible evidence, timing, task understanding, and the operation presented. Use multiple controls to limit available authority and inspect consequential actions. A review exercise can reveal local workflow gaps without establishing universal human detection performance.

Should reviewers read every file the agent encounters?

Choose review scope according to the task and consequences. The reviewer needs relevant source context for consequential operations, but exhaustive manual reading may be impractical. Constrain authority and improve action evidence so the decision does not depend on recognizing every hostile sentence.

Is a trusted repository immune to prompt injection?

Repository trust does not settle every contribution, dependency note, or newly fetched artifact. Inspect changes and sources that influence consequential operations. A familiar project can still contain lower-trust content, and authorized text can be misapplied outside its intended purpose.

What if the agent says the upload is required?

Ask for the source, purpose, data, recipient, and authority. The agent's explanation can guide review, but it cannot grant permission. Use the established exception process if the transfer is genuinely necessary, and keep the approved scope explicit.

Does a blocked operation mean the attack was fully contained?

It establishes only what the relevant evidence supports for that operation. Inspect preceding and subsequent activity, alternate routes, and actual effects. Preserve a useful continuation for the legitimate task while investigating any broader compromise through the organization's response process.