By NHI Mgmt Group Editorial TeamBased on Checkmarx: “When the AI Lies: A New Threat Emerges for “Human-in-the-Loop” Security” (October 21, 2025)

TL;DR: Malicious code or dependencies can be crafted to mislead AI coding assistants and human reviewers through contextual cues, feedback loops, and convincing explanations, according to Checkmarx. The finding from Checkmarx Zero shows that human-in-the-loop workflows can still be manipulated, so trust in AI-assisted development now needs stronger verification and traceability controls.


At a glance

What this is: Checkmarx describes lies-in-the-loop attacks as a way to manipulate AI coding assistants into approving or reinforcing malicious code that appears benign under review.

Why it matters: This matters because AI-assisted development can turn trust, feedback, and explanation into attack surfaces, so IAM, security, and engineering teams need stronger verification around code review workflows.


Context

Lies-in-the-loop attacks target the trust relationship inside AI-assisted software development, not just the model output itself. A malicious package or code fragment can look harmless during review, then change behaviour when the surrounding context or runtime state shifts.

The governance gap is that human-in-the-loop review assumes human correction will compensate for AI uncertainty. In practice, the human may be nudged into accepting unsafe code by persuasive AI explanations, which means the control needs traceability, verification, and independent security checks.

This is a software supply chain and developer workflow problem with a genuine identity angle: the assistant acts as a non-human participant whose recommendations can influence privileged change decisions. That makes the review process itself part of the security boundary.


Key questions

Q: How do lies-in-the-loop attacks bypass AI-assisted code review?

A: They exploit the gap between what an assistant can explain and what the code actually does. A malicious package can look safe in the review context, then activate harmful behaviour when runtime conditions change. If the assistant learns from feedback, it may also reinforce the wrong conclusion and increase the chance of future approval.

Q: Why is human-in-the-loop review not enough for AI coding assistants?

A: Because a human reviewer can still be influenced by a confident AI explanation, especially when deadlines are tight. Human-in-the-loop reduces blind automation, but it does not remove manipulation risk. Teams still need independent checks, secure build controls, and evidence-based review before code is accepted.

Q: What signs show that an AI coding assistant is being conditioned by feedback?

A: Watch for repeated approval of the same risky pattern, shifting recommendations after user correction, and explanations that stay persuasive but stop matching security evidence. Those are signs the assistant is learning a biased decision pattern rather than improving judgement. Regression testing is the best way to confirm whether that drift is happening.

Q: Should organisations trust AI explanations when approving external dependencies?

A: No. Explanations are useful, but they are not proof that a dependency is safe. External code needs independent scanning, behavioural testing, and provenance checks because the dangerous path may only appear in a later execution context. Treat the explanation as input to review, not as the review outcome.


Technical breakdown

How lies-in-the-loop attacks weaponise context-sensitive code

Lies-in-the-loop attacks use code, dependencies, or behavioural cues that present as benign in one context and harmful in another. The attacker designs the artefact so static review, dynamic scanning, or developer inspection sees the safe path first, while the malicious path appears only when runtime state, input, or environment changes. That is different from simple obfuscation because the artefact is not merely hidden, it is selectively truthful. The assistant then learns the wrong lesson from the interaction and may generalise unsafe approval patterns into later recommendations.

Practical implication: Treat context-sensitive behaviour as a control failure until proven otherwise, and test code paths under multiple runtime states before approval.

Why human-in-the-loop review can still fail

Human-in-the-loop is not the same as human-proof. If an AI assistant provides a confident explanation, developers often anchor on that answer, especially under delivery pressure. LITL attacks exploit that bias by making the assistant appear consistent, helpful, and technically plausible even when the underlying code is unsafe. Once the developer accepts the recommendation, the interaction itself can reinforce the assistant’s future behaviour. In effect, the review loop becomes part of the attack surface rather than a compensating control.

Practical implication: Do not let AI explanation quality substitute for independent verification, especially when external packages or generated code are involved.

Why traceability and regression checks matter for AI coding assistants

AI coding assistants that learn from feedback, memory, or prompt history need governance that looks more like change control than chat moderation. Traceability shows what the assistant saw, why it recommended a decision, and whether the recommendation changed after feedback. Regression checks catch cases where a previously blocked pattern becomes acceptable after training on attacker-influenced interactions. Without those controls, the assistant can quietly drift toward approving the same risky pattern again, turning a single deception into repeated exposure.

Practical implication: Use logging, reproducible prompts, and regression testing so AI-assisted approvals can be audited and challenged later.


Threat narrative

Attacker objective: The attacker wants malicious code or dependencies to be approved, committed, and repeatedly trusted through the AI-assisted review process.

  1. Entry occurs when a malicious actor plants code or a dependency that appears benign during initial review.
  2. Credential or decision access is gained when the AI assistant treats the artefact as safe and the developer trusts the assistant’s explanation.
  3. Escalation happens as the misleading pattern is reinforced through feedback, making future approvals more likely and widening the exposure window.
  4. Impact is the commit or approval of malicious code into the development workflow, with downstream supply chain and production risk.

Read and download The State of NHI & AI Agent Breach Report 2026, covering 200+ breaches impacting Non-Human Identities including AI Agents.


NHI Mgmt Group analysis

Lies-in-the-loop is a trust exploitation pattern, not just an AI accuracy problem. The control failure is not that the model makes a mistake, but that the workflow rewards persuasive explanations over independent verification. In software delivery, that distinction matters because the decision to merge code is a privileged governance action, not a casual suggestion. Practitioners should treat explanation quality as a risk signal, not a trust signal.

AI coding assistants are becoming governance participants inside the development lifecycle. Once an assistant can shape code acceptance, it influences security outcomes in the same way a reviewer or approver does. That makes the identity of the assistant relevant to governance: it is a non-human actor participating in a decision chain that affects software integrity. Security teams need controls that bind recommendations to evidence, traceability, and review provenance.

Blast-radius control is now a code review requirement, not an optional hardening step. If an assistant can be nudged into approving unsafe patterns, the next question is how far that approval can travel through packages, repositories, and downstream builds. This is where supply chain thinking meets AI governance: the risk is propagation, not just a single bad suggestion. Practitioners should limit how far an AI-assisted decision can travel before independent checks revalidate it.

Security teams should assume feedback-trained assistants can be conditioned over time. A one-off deceptive interaction is bad enough, but the more dangerous issue is drift. If the assistant updates heuristics from user responses, attacker-influenced feedback can shape future recommendations in subtle ways. That means the governance model must include regression testing and prompt provenance, or else the organisation inherits invisible approval bias.

From our research library:

What this signals

AI coding assistants now need governance that treats recommendations as security-relevant decisions. The practical problem is not merely hallucination, it is the possibility that feedback-trained systems will normalise unsafe approval patterns over time. That makes provenance, reproducibility, and regression testing central to code review governance.

Agentic and assistant-style systems create a boundary problem for identity and trust. Checkmarx's research shows that a non-human participant can influence privileged software changes, which means review workflows must verify both the artefact and the decision source. In the 2026 Infrastructure Identity Survey, 69% of security leaders agree identity management must fundamentally shift to address agentic AI systems.


For practitioners

  • Treat AI output as untrusted input Require independent validation for any assistant recommendation touching external packages, generated code, or dependency updates. The review should be based on observable evidence, not on how convincing the explanation sounds.
  • Add regression checks for AI-assisted approvals Re-run known risky prompts, code patterns, and package scenarios after feedback updates to see whether the assistant has drifted toward unsafe approval behaviour.
  • Log prompt, response, and approval provenance Capture what the assistant saw, what it recommended, who approved it, and whether feedback changed the result so later investigations can reconstruct the decision path.
  • Constrain package blast radius before merge Use dependency scoping and change gates so a trusted-looking component cannot spread unreviewed behaviour across repositories or downstream builds.

Key takeaways

  • Lies-in-the-loop attacks exploit the space between context-sensitive code behaviour and AI-assisted trust decisions, which makes review bias part of the threat model.
  • The Checkmarx experiment shows that a malicious dependency can survive assistant review, developer challenge, and feedback-driven reinforcement if verification is weak.
  • Independent validation, regression testing, and provenance logging are the controls that limit how far a deceptive AI-assisted approval can spread.

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, OWASP Agentic Skills Top 10 and MITRE ATT&CK address the attack and risk surface, while NIST AI RMF sets the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Agentic AI Top 10ASI03 — Identity & Privilege AbuseThe article shows a non-human assistant influencing privileged code decisions through trust manipulation.
ASI09 — Human-Agent Trust ExploitationThe attack works by persuading developers to trust misleading AI explanations.
Recommendation — Bind assistant recommendations to evidence and limit approval authority for high-risk code changes. Challenge persuasive AI output with independent review before accepting security-sensitive recommendations.
OWASP Agentic Skills Top 10Permission inheritance in skill executionThe assistant's learned behaviour can carry unsafe approval patterns into later decisions.
Recommendation — Separate learned decision support from approval rights so feedback cannot expand execution scope.
MITRE ATT&CKTA0006;TA0008 — Credential Access; Lateral MovementThe attack path leads from deceptive entry to wider propagation through development and review workflows.
Recommendation — Map deceptive dependency behaviour to credential access and lateral movement techniques in your detections.
NIST AI RMFGOVERN — AI Governance and AccountabilityThe article is fundamentally about governance failure in AI-assisted decision-making.
Recommendation — Define accountability for AI-assisted approvals and require traceable decision records.

Key terms

  • Lies-in-the-Loop attack: A Lies-in-the-Loop attack is a deception pattern that uses misleading code, dependencies, or feedback signals to persuade an AI assistant and human reviewer that unsafe behaviour is acceptable. The goal is to corrupt the decision process, not just hide malicious logic in source code.
  • Human-in-the-Loop Review: Human-in-the-loop review is a governance pattern that requires a person to validate, approve, or override an AI-influenced decision. It matters most when automated output affects people, regulated data, or high-risk actions where traceability and accountability are mandatory.
  • Feedback-Driven Conditioning: Feedback-driven conditioning is the gradual shaping of an AI system's future recommendations based on previous user responses, approvals, or corrections. In security terms, it can turn a one-off deceptive interaction into a persistent bias that keeps reinforcing unsafe behaviour.
  • Package blast radius: Package blast radius is the amount of downstream code, build logic, credentials, or production behaviour a dependency can influence if it is accepted into a workflow. Limiting blast radius reduces the damage caused by a malicious or compromised package and makes review failures less consequential.

Deepen your knowledge

NHI Foundation Level course, the industry's only accredited NHI security programme, covers NHI governance, agentic AI identity, machine identity security, and secrets management. It helps practitioners connect identity control to the review, approval, and trust decisions that modern development workflows depend on.
NHIMG Editorial Note
Published by the NHIMG editorial team on August 2, 2026.
Updated on October 12, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org