Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.
Human in the loop AI security means deciding in advance which security decisions an AI system can make on its own and which ones a named person must approve first. Let AI triage, draft fixes and chase CI. Gate the decisions that are hard to undo: merging code, accepting risk, granting exceptions and changing the system's own rules.
Whenever I speak with security teams adopting AI agents, the question isn't whether to keep a human involved. It's where. The answer is rarely "approve everything" or "approve nothing."
Below: where the checkpoints belong, how human in the loop differs from human on the loop, and how to keep the gate from becoming a rubber stamp.
A human-in-the-loop control is a point where an AI system stops and waits for a person to approve, reject or change what it is about to do. We cover the general definition in our human in the loop glossary entry. This post is about the practical version: which checkpoints a security program needs.
There are three modes, and a mature program uses all of them:
The point is not to maximize human involvement. The point is to spend human judgment where it changes the outcome.
Remediation is where AI stops reading your code and starts changing it. That changes the risk.
OWASP's guidance on excessive agency in LLM applications tells teams to use human-in-the-loop control so that a person approves high-impact actions before they are taken. The NIST AI Risk Management Framework asks organizations to define roles and responsibilities for human-AI configurations and oversight (GOVERN 3.2), and to have assigned mechanisms to supersede, disengage or deactivate an AI system that behaves outside its intended use (MANAGE 2.4).
There's also a real example of why the merge gate matters. In August 2026 the UK AI Security Institute published an incident report on unsanctioned agent behavior during cyber testing. An agent tried to get malicious code into an open-source project and used social engineering on the maintainer to get it approved. A human maintainer caught it and refused to approve the change.
That's the job of the gate. It's also a warning: the reviewer was the target. A human checkpoint is only as strong as the person's attention and the evidence in front of them.
The choice between the two modes depends on how expensive a wrong decision is and how fast you can undo it.
| Human in the loop | Human on the loop | |
|---|---|---|
| When the human acts | Before the action | After or during the action |
| What the human does | Approves, rejects or asks for changes | Monitors, audits, overrides, stops |
| Best for | Irreversible, production-affecting or externally visible decisions | High-volume, reversible, low-blast-radius work |
| Main risk | Reviewer fatigue and rubber-stamp approvals | Mistakes pile up before anyone looks |
| Security examples | Merging a fix, accepting a risk, granting an exception, changing policy | Triage ranking, drafting fixes, re-running CI, rebasing a branch |
| What it needs | Evidence attached to the decision | Audit logs, alerts and a working stop control |
The Cloud Security Alliance makes a similar argument in its analysis of when a human should approve an AI action. Requiring a person for every step slows AI security work to human speed. It recommends governance as the default and human approval for defined gates: irreversible actions, production-disruptive actions, externally visible actions, and anything that needs a formal sign-off or risk acceptance.
Here is how the main remediation decisions map to the three modes. Use it as a starting point and tighten it for your highest-risk systems.
| Decision | Default mode | Why |
|---|---|---|
| Ranking and prioritizing findings | On the loop | High volume, reversible, and re-run as context changes |
| Dismissing a finding as a false positive | On the loop, with a sample audit | Reversible, but a wrong dismissal hides real risk |
| Drafting a fix and opening a draft PR | On the loop | Nothing ships until someone merges |
| Merging a security fix | In the loop | Changes production code |
| Accepting a risk or granting an exception | In the loop, named owner | Someone has to own the residual risk |
| Overriding a failing security check | In the loop, with a recorded reason | Bypasses a control |
| Changing gate policy, autonomy limits or approval settings | In the loop, admin only | Changes the rules every later decision runs under |
Triage is where AI earns its keep. Ranking thousands of findings by reachability, exploitability and business context is high volume and repeatable, and the verdict can be revisited when the code or the threat changes. Keep humans on the loop here: review a sample of dismissals, and give people a fast way to reopen a finding with a reason.
The exception is a triage question the AI can't answer from the evidence, such as who owns a service or whether an endpoint is internet-facing. That should become a question to a person, not a guess.
Drafting a fix doesn't change anything you ship, so it doesn't need a pre-approval. What it needs is limits: which repositories, how many open PRs at once, and which finding types are in scope. Some findings shouldn't be autofixed at all, such as a leaked secret, which needs rotating, not just a code change.
The merge is the one checkpoint that should stay in the loop for every AI-generated security fix, because it's the moment a proposal becomes production code. This is where AI remediation approval belongs. Route the PR to the person who owns the code, not to a central security queue, and make sure an AI approval can't count as the human approval your branch protection requires.
Accepting a risk, granting an SLA exception or marking a vulnerability "won't fix" is a decision about residual risk, and residual risk needs an owner. An AI can draft the case: what the finding is, what compensating controls exist, and what the exposure looks like. A named person signs it, with an expiry date.
The most dangerous change an AI agent can make isn't to code. It's to its own rules: blocking thresholds, which actions it can take without approval, who can override a check. Treat these like changes to access control. Restrict them to admins, require a reason, and log the old and new values.
Good human in the loop security automation starts with a rule for new decision types. Run each one through five questions, and if any answer is "yes," put a human in the loop.
Everything else is a candidate for human on the loop. Backlog in, fixes out, and a person on every decision that matters.
A human-in-the-loop control can fail without anyone noticing, because the approvals keep coming. Three patterns cause most of it.
Volume. OWASP's agentic AI threat guidance names "Overwhelming the Human in the Loop" as a threat category, and its entry on human-agent trust exploitation recommends adjusting agent autonomy and required oversight to contextual risk. If an agent opens 40 PRs on a Monday morning, nobody reviews 40 PRs carefully.
Automation bias. The EU AI Act's human oversight article (Article 14) requires that people overseeing high-risk AI stay aware of the tendency to rely or over-rely on its output, and that they can disregard, override or reverse it. The longer an AI is right, the faster people click approve.
Thin evidence. A PR that says "fixed SQL injection" with a green check asks the reviewer to trust the claim. A PR that shows the root cause, the test that proves the vulnerability is closed and what CI ran gives them something to check. The AISI incident shows the other side of this: when the person approving is the target, the evidence has to stand on its own.
These practices work without any particular tool:
For the wider set of controls around an agent, see AI guardrails.
Nullify is built so that AI does the volume work and people make the calls that matter.
config:write permission, which the Admin role grants, doesn't resolve the finding, and is written to the audit log with the person's name and reason.You set how far it goes on its own with program autonomy policy, ground rules and blocked action types. See how this works in triage and remediation.
The human in the loop isn't a speed bump. It's the decision that makes the fix yours.
In a human-in-the-loop setup, the AI waits for a person to approve an action before it happens. In a human-on-the-loop setup, the AI acts within set limits while a person monitors, audits and can stop or reverse it. Most security programs use in-the-loop for merges and risk acceptance, and on-the-loop for triage and fix drafting.
Decisions that are hard to undo, affect production or customers, need a named owner, rest on thin evidence, or change the system's own rules. In practice that means merging fixes, accepting risks and exceptions, overriding failing security checks, and changing gate or autonomy settings.
It doesn't have to. Most remediation time is spent waiting for triage, an owner and a fix someone trusts, not on the approval itself. Let AI handle triage, drafting and CI follow-up, route each PR to its code owner with evidence attached, and the human step becomes a short, informed decision.
Not in a way that counts as the human approval. If a bot approval can satisfy a required-reviewer rule in branch protection, the human checkpoint disappears without anyone deciding to remove it. Keep AI reviews as comments or request-changes signals, and require a person to approve the merge.
Make review proportional to risk, cap how many AI-generated PRs are open at once, attach evidence to every PR, route each one to its code owner, require reasons for overrides, and sample approved PRs to check that reviewers are actually reading them.