By NHI Mgmt Group Editorial TeamBased on Akeyless: “How We Turned AI Agents Into Security Researchers at Akeyless” (May 11, 2026)

TL;DR: Akeyless describes an AI review pipeline that extracts findings into reusable skills, then applies those skills to every pull request to test authentication, secrets handling, and trust-boundary regressions automatically. The real issue is not review speed but whether security knowledge can be encoded as durable governance without mistaking detection for control.


At a glance

What this is: Akeyless outlines a learning-agent model for PR security review that turns each investigation into a reusable skill and reuses it across future pull requests.

Why it matters: This matters because IAM and security teams must decide whether AI-assisted review is merely faster detection or a control layer that can meaningfully govern authentication, secrets, and trust boundaries.

👉 Read Akeyless's analysis of learning agents for pull request security reviews


Context

The core governance problem is that security review quality degrades when knowledge stays trapped in individual investigations instead of becoming a repeatable control. In identity-heavy systems, that matters most where token scope, trust boundaries, and secrets handling define whether a code change creates a new access path.

Akeyless frames its approach around a learning agent that converts prior findings into skills and applies them to every pull request. That moves the discussion away from static rule matching and toward whether review logic can be maintained as a living part of IAM and NHI governance.

The practical question for practitioners is whether this kind of learned review behavior complements existing controls or simply produces better detection. In mature programmes, the answer depends on whether the findings are tied to enforceable policy, testable controls, and clear ownership for remediation.


Key questions

Q: What is the difference between AI governance and code review?

A: AI governance decides what data, tools, and use cases are allowed. Code review checks whether the output is correct, secure, and maintainable. Both are needed because governance controls the input boundary while review validates the result. Without governance, sensitive data can leak into the model. Without review, insecure AI-generated code can still reach production.

Q: Why do learned security skills matter for pull request reviews?

A: They matter because they let a reviewer carry forward the reasoning behind prior findings instead of starting from scratch on each change. That improves consistency on recurring issues such as token scope, secret handling, and trust-boundary checks, especially in systems where the same identity patterns appear across many features.

Q: How should teams decide whether an AI reviewer can approve security-sensitive changes?

A: Teams should allow approval only where the model’s findings are tied to explicit tests, clear ownership, and a defined fallback to human review. If the change affects authentication, trust boundaries, or secrets paths, the final decision should rest on enforceable controls, not model confidence.

Q: When does AI review create a false sense of security?

A: It creates a false sense of security when teams treat good findings as proof that the underlying control is sound. A strong reviewer can still miss compound failures across caching, validation, or routing, so end-to-end auth-flow verification remains necessary before merge.


Technical breakdown

How skill extraction changes security review

The technical shift here is from one-off findings to reusable review logic. A finding is translated into a skill, which is a structured instruction set describing what to look for, what conditions matter, and how to evaluate the code path. That skill is then loaded alongside later pull requests, so the agent can reason over new diffs using prior investigative context. This is closer to codified security judgement than a simple detector, because it generalises from one incident class to future changes without relying on a fixed signature database.

Practical implication: Treat learned review logic as governed control content, not just model output.

Why token scope and trust boundaries are the core test

The article repeatedly anchors the agent’s reasoning in authentication flows, token lifecycle, and cross-boundary access. That is the right technical focus because most security regressions in identity-sensitive code do not begin with obvious compromise. They begin when a valid credential is accepted in a broader context than intended, or when a request crosses a trust boundary that the system assumes is still intact. In NHI terms, the risk is not only secret exposure. It is unauthorized reuse of valid trust artefacts in the wrong execution path.

Practical implication: Map review rules directly to trust boundaries and token intent, not generic code quality checks.

Why the final merge gate matters more than point findings

The final test described in the article is the most important mechanism because it checks combined system state, not just the changed lines. That matters in identity systems where one pull request may be safe in isolation but unsafe once paired with earlier cache logic, validation changes, or routing decisions. In other words, the security property lives at the system level, not the diff level. A learned agent that only reviews local changes can miss compound failure modes unless it re-evaluates the end-to-end flow before merge.

Practical implication: Require end-to-end security tests for auth flows before merge, not only diff-level findings.


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


NHI Mgmt Group analysis

Security review becomes a governance problem the moment findings are promoted into persistent agent memory: once investigative logic is reused across every pull request, review stops being a one-time control and starts behaving like a governance layer. That is useful, but it also changes the trust model. The organisation now has to govern what the agent learns, when that learning is authoritative, and how exceptions are handled when the learned skill is wrong or incomplete. The implication is that learned review logic needs lifecycle ownership, not just model tuning.

The key concept here is compound security memory: the value is not the agent’s speed, but its ability to carry prior security reasoning forward into later code changes. That is especially relevant in NHI and IAM contexts, where token scope, secret handling, and trust-boundary rules often recur across different features. The practitioner takeaway is that security programmes should ask whether review knowledge persists as a governed asset, or disappears each time a reviewer moves on.

This pattern does not eliminate the need for authoritative controls at issuance time: a learned reviewer can catch regressions, but it cannot by itself define least privilege, rotation policy, or trust boundaries in the underlying platform. Detection can improve continuously while governance remains static. The implication is that teams must avoid treating AI-assisted review as a substitute for actual access control design.

In identity-heavy platforms, the blast radius of a review failure is larger than the code path it examines: Akeyless is right to weight downstream impact because a flaw in credential handling can expose the controls protecting many other systems. That is why learned review systems should be evaluated on whether they reduce identity blast radius, not simply whether they increase review throughput. The practitioner conclusion is straightforward: measure these systems against the access decisions they help prevent, not the number of findings they generate.

Access review logic and runtime enforcement are being pulled apart: the article shows an agent that learns from past investigations and applies that memory to future diffs, but that is still upstream of runtime behaviour. Security teams should see the distinction clearly. The field is moving toward AI-assisted pre-merge governance, while runtime identity controls remain the boundary that actually contains damage when review misses something.

From our research library:

What this signals

Compound security memory: the most important shift is not AI-assisted speed, but the conversion of security reasoning into persistent review logic. That changes how identity teams think about governance because the organisation now has to control what the agent learns, how it is updated, and when humans must override it.

When pull request review starts spanning authentication, secrets handling, and trust-boundary changes, the programme needs stronger separation between detection and enforcement. Review can become more consistent, but only policy and runtime controls can stop credential misuse or over-scoped access when a bad change lands.

AI governance assumptions are moving quickly. According to the 2026 Infrastructure Identity Survey, 53% of security leaders expect AI to run major portions of their infrastructure autonomously within the next three years, and 19% of organisations already give AI systems dramatically more access than human employees, nearly one in five granting unrestricted privilege.


For practitioners

  • Define review-to-control boundaries Specify which identity and secrets findings the agent may recommend and which outcomes still require human approval. Tie those decisions to code paths that affect authentication, token scope, and trust-boundary crossings.
  • Convert repeated findings into governed skills Store recurrent review logic as controlled policy content with ownership, versioning, and review criteria. Do not let agent memory become an informal substitute for security standards.
  • Require end-to-end auth-flow tests Validate complete token issuance, validation, and secret retrieval paths before merge, not just the changed lines in a pull request. This is where compound regressions appear.
  • Separate detection from enforcement Use the agent to surface issues early, but keep access policy, secret rotation, and authorization boundaries enforced outside the model. A learned review can support governance, not replace it.

Key takeaways

  • The article describes a learning-agent model for pull request review, but the deeper issue is whether security reasoning can be made persistent and governable across changes.
  • The strongest use case is identity-sensitive code, where token scope, authentication flow, and trust-boundary regressions recur often enough to benefit from reusable review logic.
  • The limiting factor is not model speed but control design: review quality still depends on ownership, tested findings, and runtime enforcement outside the agent.

Standards & Framework Alignment

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

OWASP Non-Human Identity Top 10 and MITRE ATT&CK address the attack and risk surface, while NIST CSF 2.0 sets the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Non-Human Identity Top 10NHI-04 — Insecure AuthenticationThe article centres on token validation, trust boundaries, and how valid credentials are judged in code review.
NHI-05 — Overprivileged NHIThe article repeatedly focuses on scoping access for machine credentials and downstream blast radius.
NHI-07 — Long-Lived SecretsThe source references token rotation windows and credential coexistence as a concrete risk pattern.
Recommendation — Map PR review rules to authentication paths and verify that valid tokens are still constrained to intended use. Review NHI access paths for scope creep and block changes that expand credential reach without justification. Audit token lifecycle assumptions and prevent long-lived secrets from persisting across review and merge cycles.
MITRE ATT&CKTA0006;TA0008 — Credential Access; Lateral MovementThe article discusses attacker-style reasoning about credential abuse and moving across trust boundaries.
Recommendation — Map credential-centric review findings to credential access and lateral movement techniques in detection content.
NIST CSF 2.0PR.AA-05 — Access Permissions, Entitlements and AuthorizationsThe article is fundamentally about whether review logic can govern permissions and authorization paths in code.
Recommendation — Tie AI review findings to entitlement checks and validate that authorization remains enforced outside the model.

Key terms

  • Compound Security Memory: A governed pattern where security findings are extracted, stored, and reused so future reviews can apply prior reasoning. In AI-assisted review, this turns one investigation into durable review logic, but it must still be versioned and owned like any other control content.
  • Trust Boundary: A trust boundary is the point where one system’s authority should stop and another system’s authority should begin. For internal automation, weak trust boundaries let monitoring, remediation, and execution share privileges that should have remained separate.
  • Token scope: Token scope is the set of actions and systems a credential can reach. In non-human identity governance, narrow scope limits blast radius, while broad scope lets a stolen token publish packages, access cloud services, or mutate repositories far beyond its intended purpose.
  • Review-to-Control Gap: The distance between a security finding and an enforceable policy or runtime control. It appears when a system can detect a problem in code review but cannot ensure the underlying access rule, secret policy, or authorization boundary is actually enforced in production.

What's in the full article

Akeyless's full article covers the operational detail this post intentionally leaves for the source:

  • The exact four-stage pull request pipeline, including review, test, re-test, and final merge gating
  • The mechanics of converting an investigation into a reusable skill that persists across future reviews
  • Examples of how the agent evaluates token validation, trust boundaries, and response leakage in code
  • The platform-specific reasoning behind distributed trust, gateway boundaries, and downstream blast radius

👉 Akeyless's full post covers the review pipeline, skill extraction method, and merge-gate logic in detail.

Deepen your knowledge

NHI governance, agentic AI identity, and machine identity lifecycle are core topics in our NHI Foundation Level course, the industry's only accredited NHI security programme. If you are responsible for identity security strategy or NHI governance in your organisation, it is worth exploring.
NHIMG Editorial Note
Published by the NHIMG editorial team on June 23, 2026.
Updated on October 7, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org