Join our Newsletter — 33% off our NHI Course
Home› FAQ› Agentic AI & Autonomous Identity› Why do AI agents create more risk than…
Agentic AI & Autonomous Identity

Why do AI agents create more risk than ordinary automation in pull request workflows?

← Back to all FAQ
By NHI Mgmt Group Editorial Team Updated October 22, 2026 Domain: Agentic AI & Autonomous Identity

Because an agent does not just execute a fixed script. It can reinterpret text, choose tools, and carry out actions under a human identity, which means a malicious PR can change the agent’s goal mid-session. That makes the trust problem dynamic instead of deterministic, especially when the workflow spans multiple projects.

Why agentic pull request workflows are riskier than ordinary automation

Ordinary automation follows a fixed path, so its failure modes are mostly about bad inputs or broken logic. An AI agent can reinterpret the review text, change its behaviour mid-session, and act with delegated authority, so a malicious pull request can steer the workflow into doing something the original operator never intended. That makes the control problem about trust, not just execution.

In practice, the difference is that ordinary automation is predictable within its script boundary, while an agent can decide which steps matter, which tools to call, and how to respond to ambiguous language. That means the attack surface includes the model’s interpretation layer, the tool layer, and the identity it is using, especially when the same workflow can touch more than one repository or project.

When a PR workflow gives an agent permission to comment, approve, trigger checks, or open follow-up actions, the agent is no longer just processing a file. It is making decisions that can change repository state, move secrets, or alter downstream work queues, so the security boundary has to cover both code changes and the agent’s authority to act on them.

How prompt and instruction attacks change the trust model

The central risk is that a PR can contain text designed to influence the agent, not just code that the pipeline compiles. A malicious description, diff comment, or embedded instruction can hijack the agent’s goal, causing it to treat attacker-controlled text as higher priority than the review task itself. Agentic AI Security Guide is useful because this is the same class of problem as goal hijack, tool misuse, and trust boundary failure.

That is why the trust model becomes dynamic instead of deterministic. A static workflow can be reviewed once, but an agent may re-evaluate context as it reads, searches, summarizes, or drafts output, which creates multiple opportunities for untrusted text to influence action selection. The risk rises when the agent can reach external services, issue commands, or access shared context that outlives the current review.

Attackers do not need to break the entire system if they can make the agent “helpfully” do the wrong thing. In a pull request workflow, the most dangerous outcome is often not direct code execution, but an apparently legitimate action taken under a trusted workflow identity that looks normal to surrounding systems and reviewers.

What makes the blast radius larger in real workflows

pull request automation becomes materially more dangerous when one agent session spans multiple projects, environments, or repositories. A prompt injection in one PR can influence later decisions in another context if the workflow reuses memory, tokens, or approvals, which turns a local review problem into a broader trust and containment problem. AI Agent Authorisation Guide addresses this by emphasising task-scoped access, per-action policy decisions, and human approval for sensitive actions.

Agents also create risk when their authority is borrowed from a human or shared identity rather than a tightly bounded service identity. If the workflow can act “as the user,” the downstream system may not distinguish between a legitimate review step and an attacker-induced action. That is especially hazardous when the same credentials, session, or approval path can be reused across repositories, branches, or vendors.

In other words, ordinary automation fails closed more often, while agents can fail interestingly, and sometimes usefully for an attacker. The more the workflow can reason, branch, and act across tools, the more the defender has to assume that the PR itself may be part of the attack.

Risk and Threat Considerations

Agentic PR workflows expand the attack surface because they combine untrusted text, tool access, and delegated authority in one control path. That creates a realistic path for instruction injection, over-broad action selection, and cross-project impact when the same session or identity is reused.

Failure mechanism: The agent parses attacker-controlled PR content as operational guidance, then uses legitimate tools or credentials to perform an action the attacker influenced.

Impact: Review outcomes can be altered, changes can be approved or propagated incorrectly, and a single manipulated workflow can affect more than one repository or environment.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Agentic AI Top 10 addresses the attack and risk surface, while NIST SP 800-53 Rev 5 sets the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Agentic AI Top 10ASI01 — Agent Goal HijackPR text can steer an agent away from its intended review goal.
ASI02 — Tool MisuseThe risk centers on unsafe tool calls made from a review workflow.
ASI03 — Identity & Privilege AbuseAgentic PR workflows can act under delegated human authority and overbroad access.
Recommendation — Detect and block goal hijack attempts in PR content and workflow context. Restrict tool invocation to approved actions with per-request policy checks. Constrain agent authority to least privilege and separate it from the human principal.
NIST SP 800-53 Rev 5AC-6 — Least PrivilegeThe workflow risk increases when the agent can act beyond the minimum needed.
IA-5 — Authenticator ManagementReused sessions, tokens, and credentials can widen impact across PR workflows.
Recommendation — Limit each agent workflow to the minimum permissions needed for the review task. Rotate and bound credentials or tokens that can be reused across agent sessions.

Practitioner Guidance

What to prioritise: Treat the agent’s permissions as the primary control boundary, not the human user’s intent. If the workflow can merge, approve, trigger deployment, or access secrets, those actions need explicit per-action policy and narrow scope.

What to verify: Confirm whether the agent can be redirected by PR text, comments, linked issues, or retrieved context. Also verify whether the same session, token, or approval path can be reused after the workflow context changes.

Common mistake: Teams often harden the model prompt but leave tool access broad. That reduces some confusion but still leaves the agent able to take damaging actions if it is socially or contextually steered.

Practitioner takeaway: The real control objective is not to make the agent “smart enough” to resist all manipulation, but to ensure that any action it can take remains narrowly scoped, attributable, and reversible when the PR turns adversarial.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on October 22, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org