By NHI Mgmt Group Editorial TeamDomain: Cyber SecuritySource: Bishop FoxPublished July 17, 2026

TL;DR: Agent harnesses combined with Model Context Protocol servers and persistent knowledge stores can cut time to find issues from days to hours and surfaced two information leaks totaling more than 12 million records, according to Bishop Fox. The practical shift is not replacing testers, but giving them deterministic tooling, better coverage, and tighter human oversight.


At a glance

What this is: The post explains how MCP-connected AI agent harnesses can speed penetration testing across external, application, and cloud assessments while keeping human supervision in the loop.

Why it matters: It matters to IAM practitioners because the same orchestration patterns that improve testing also sharpen how teams think about tool access, scoped execution, and accountability for AI-driven security workflows.

By the numbers:

👉 Read Bishop Fox's analysis of MCP agent harnesses in penetration testing


Context

MCP changes the operational model for security testing by letting an AI system call tools, retain context, and execute repeatable tasks instead of relying on ad hoc prompting. In this article's context, the important question is not whether AI can help, but how much control, scope, and auditability remain when a model is driving real penetration test workflow.

For IAM and NHI practitioners, the identity angle is straightforward: once an AI system can access scanners, cloud CLIs, HTTP proxies, and stored credentials, it begins to behave like a governed non-human actor. That makes tool authorization, session scoping, and human accountability part of the security design, not just the test methodology.

The article's starting position is typical of mature practitioner guidance: AI is being used to extend human capacity, but the governance burden does not disappear.


Key questions

Q: How should security teams govern AI agents used for offensive testing?

A: Treat offensive AI agents as distinct workloads with explicit ownership, scoped tools, and logged approvals. Give them only the environments, credentials, and actions needed for authorised testing. Separate research targets from production systems, and review retries, data access, and output handling as part of standard governance, not as an afterthought.

Q: What breaks when an AI tester has broad tool access?

A: Broad tool access makes the agent harder to audit, easier to misdirect, and more likely to overreach its intended scope. It also increases the chance that credentials, findings, or commands are reused in the wrong context, which turns a helpful assistant into an uncontrolled operator.

Q: How do you know an agentic testing workflow is actually under control?

A: You know it is controlled when every delegated action is attributable, repeatable, and bounded by the intended test plan. If the workflow cannot show which tools were used, what data informed the decision, and why the next step was chosen, the control model is too weak.

Q: Who is accountable when an AI system used for security testing crosses into abuse?

A: Accountability sits with the organisation that grants access, defines scope, and approves the workflow. That usually includes security leadership, platform owners, and the teams managing the AI toolchain. If a model can act on behalf of a business process, the business must control the identity, permissions, and audit trail behind it.


Technical breakdown

How MCP servers change penetration test execution

Model Context Protocol is a standard way for an AI system to obtain tools, files, and structured context during runtime. In penetration testing, that means the model can delegate tasks to specific tools such as scanners, parsers, or cloud CLIs while retaining state about what has already been checked. The practical effect is better task decomposition: the model can move from reconnaissance to validation to reporting without losing the thread of the engagement. The risk is not the protocol itself, but the breadth of authority granted to the connected tools and the quality of the guardrails around their use. Practical implication: constrain MCP toolsets to the smallest effective action set and log every delegated step.

Practical implication: constrain MCP toolsets to the smallest effective action set and log every delegated step.

Why persistent knowledge stores improve agentic testing

A persistent knowledge store gives the agent a working memory across steps, test plans, and sub-tasks. That matters because penetration testing is cumulative: evidence from a port scan can inform a later exploitability check, and findings from one target can shape the next prompt or branch of testing. Without persistence, the model re-derives context and wastes tokens; with it, the workflow becomes more deterministic and repeatable. For practitioners, the key architectural point is that state retention increases both efficiency and blast radius if the wrong artefacts are exposed to the model. Practical implication: separate engagement data, credentials, and artefacts so the agent only sees what it needs.

Practical implication: separate engagement data, credentials, and artefacts so the agent only sees what it needs.

Where prompting patterns affect control and auditability

Prompting determines whether an AI system behaves like a loose brainstorming assistant or a scoped operational worker. The article shows a progression from broad instructions to structured test plans, explicit proxying, and command tracking. That progression matters because it creates observable intent, repeatable execution, and a clearer audit trail for human review. The governance lesson is that prompt design is part of the control plane: it can narrow behaviour, but it cannot substitute for out-of-band monitoring or scope enforcement. Practical implication: treat prompts as policy inputs and pair them with technical controls that can verify what the agent actually did.

Practical implication: treat prompts as policy inputs and pair them with technical controls that can verify what the agent actually did.


NHI Mgmt Group analysis

Agent harnesses are becoming a practical control surface, not just a productivity layer. Once an LLM can call scanners, proxy tools, and cloud CLIs, the workflow itself becomes a governed security asset. That means permissioning, logging, and review matter as much as the quality of the prompts. For identity teams, this is a reminder that machine actors need scoped access models, not informal trust.

Persistent context creates a new form of operational memory risk. The same knowledge store that helps an agent avoid duplicate work can also preserve credentials, findings, and environmental details that should not be broadly reusable. This is especially relevant for NHI governance because the agent is acting as a non-human consumer of sensitive artefacts. The security boundary is therefore the data slice, not just the model session.

MCP adoption exposes a control gap between intent and execution. Human operators may define a bounded test, but the agent can still choose tool order, depth, and branching based on intermediate results. That makes auditability and deterministic tool design central. In OWASP Agentic Applications Top 10 terms, the issue maps cleanly to tool misuse and delegated action abuse; practitioners should treat it as a governance problem, not a prompt-tuning issue.

Structured AI-assisted testing validates the case for least privilege in machine workflows. The article's own examples show that better outcomes come from narrower tools, explicit scope, and observable execution. That is the same governance logic that should govern AI agents outside pentesting, including production automation and internal security operations. The practitioner conclusion is simple: if an AI system can act, it should act with the smallest possible identity.

What this signals

Agentic penetration testing will push more security programmes toward explicit machine identity governance, because the same patterns used to speed assessments can also expand operational authority beyond what was intended. The operational question is no longer whether AI can assist, but whether its toolchain is bounded, observable, and revocable in the same way as other privileged non-human actors.

Delegated tool authority: this is the control problem that will matter most as AI systems are wired into scanners, proxies, cloud APIs, and internal evidence stores. If the workflow is not decomposed into narrow, inspectable permissions, the organisation will struggle to distinguish approved automation from uncontrolled execution. That makes access review, logging, and task scoping part of the security architecture, not an afterthought.

For teams aligning to external guidance, this topic sits naturally beside the OWASP Top 10 for Agentic Applications 2026 and the NIST AI Risk Management Framework. The forward signal is clear: programmes that already govern workloads, service accounts, and secrets will adapt fastest to AI-driven testing, while informal access models will struggle to keep pace.


For practitioners

  • Define least-privilege tool bundles for agent harnesses Limit each harness to the minimum set of tools needed for a specific testing phase, such as reconnaissance, HTTP analysis, or cloud enumeration. Separate destructive capabilities from read-only functions and require explicit approval before any workflow can cross that boundary.
  • Separate prompts, plans, and sensitive artefacts Store test plans, credentials, and collected evidence in distinct locations so the model cannot freely reuse data outside the current task. This reduces accidental leakage and makes it easier to review what the agent actually accessed during an engagement.
  • Instrument every delegated command and tool call Log the command, target, input context, and result location for each agent action, then review those logs alongside the final report. If a command cannot be reconstructed after the fact, it was not governed tightly enough.
  • Use human approval for scope expansion Require a human decision before an agent can move from discovery to exploitation validation, from external to authenticated testing, or from public targets to customer-owned internal environments. That keeps execution aligned to client scope and contractual authority.

Key takeaways

  • AI-assisted penetration testing is shifting from prompt quality to governed execution, where the real control is scoped tool access and auditable delegation.
  • The article shows that agent harnesses can compress discovery from days to hours, but that speed only remains safe when prompts, plans, and artefacts are tightly separated.
  • The practical response is to govern AI testers like privileged non-human identities, with least privilege, human approval for scope expansion, and complete command logging.

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 and MITRE ATT&CK address the attack and risk surface, while NIST AI RMF and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Agentic AI Top 10A2The article centres on tool misuse and delegated action in agent workflows.
NIST AI RMFGOVERNAI governance is needed for auditability, ownership, and safe delegated execution.
NIST CSF 2.0PR.AC-4Least privilege and access management govern who or what can use testing tools.
MITRE ATT&CKTA0006 , Credential Access; TA0007 , DiscoveryThe testing workflow models discovery and validation activities central to attacker behaviour.

Limit agent tool access to the smallest necessary privilege set and review entitlements regularly.


Key terms

  • Model Context Protocol: Model Context Protocol is an open protocol that lets AI agents connect to tools and data sources. It expands what an agent can reach, so governance has to cover not only the model and its prompts, but also every system that can receive or return agent-driven data.
  • Agent Harness: The agent harness is the runtime layer that wraps a model and turns it into an acting system. It usually includes the loop, tools, context handling, permissions, hooks, and logs. In security terms, it is often the real place where privilege sits and where identity evidence must be governed.
  • Delegated Tool Authority: Delegated tool authority is the practical permission a model receives when it is allowed to invoke scanners, APIs, shells, or other operational tools. The security risk is not only misuse, but also overreach, because the model may chain actions beyond what a human operator explicitly intended.
  • Persistent Knowledge Store: A persistent knowledge store is long-lived context that preserves findings, plans, and intermediate results across agent steps. It improves efficiency and consistency, but it also expands the sensitivity of the AI workflow because prior artefacts remain available for later decisions.

What's in the full article

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

  • Step-by-step prompt structures for external, application, and cloud penetration tests using MCP-enabled agents
  • Examples of tool descriptions and scoped commands that shape how the agent executes each assessment phase
  • Practical notes on when to use read-only cloud accounts versus client-provided inference environments
  • The article's working assumptions about human oversight, testing ethics, and scope boundaries

👉 The full Bishop Fox article covers prompts, tool patterns, and assessment workflow examples in more depth.

Deepen your knowledge

NHI Foundation Level course, the industry's only accredited NHI security programme, covers NHI governance, machine identity security, secrets management, and identity lifecycle controls. It helps security practitioners apply structured governance to privileged non-human workflows across cloud, AI, and automation.
NHIMG Editorial Note
Published by the NHIMG editorial team on August 11, 2026.
NHI Mgmt Group — the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org