Join our Newsletter — 33% off our NHI Course

On-Demand Pentesting

On-demand pentesting is a penetration testing model that starts when the team needs it, rather than on a fixed consulting schedule. It compresses lead time by removing much of the manual coordination. The goal is faster validation of changes, quicker retesting, and tighter alignment with software delivery cadence.

Expanded Definition

On-demand pentesting is a security validation model that is triggered by change, risk, or release readiness rather than by a fixed annual calendar. In NHI and agentic AI environments, it is often used to test exposed APIs, service-to-service authentication paths, secrets handling, and policy enforcement after a material system change. The practical value is speed: teams can validate a control assumption while the code, infrastructure, and identity relationships are still current.

Definitions vary across vendors and consultancies on whether on-demand pentesting means a fully scoped manual test, an automated pre-release scan with human follow-up, or a hybrid workflow. The most useful interpretation is operational, not commercial: it is a testing capability that can be invoked when the trust boundary changes. That makes it adjacent to continuous testing, but not identical to it, because the trigger is event-driven and the output is usually a targeted security decision. For governance context, the NIST Cybersecurity Framework 2.0 emphasises ongoing risk management, which aligns with this change-driven testing approach. The most common misapplication is treating a lightweight automated scan as full pentesting, which occurs when teams confuse surface validation with adversarial exploitation and manual verification.

Examples and Use Cases

Implementing on-demand pentesting rigorously often introduces scheduling and scope-control overhead, requiring organisations to weigh release speed against the cost of interrupting delivery for validation.

  • A team deploys a new secrets broker integration and triggers a focused test of token issuance, revocation, and misuse paths before production rollout.
  • After a major IAM change, security schedules a retest of service account permissions and privilege escalation paths to confirm that least privilege still holds.
  • An organisation adds a new agent tool connector and uses an external test to probe for prompt injection, unauthorized tool calls, and weak approval gates.
  • Following a CI/CD pipeline update, testers examine whether API keys, certificates, or ephemeral credentials are exposed in logs, artifacts, or build variables.
  • After a remediation sprint, the team reruns the exact high-risk scenarios to verify that the fix actually removed the exploit path rather than only masking the symptom.

For broader NHI context, NHI Mgmt Group notes in the Ultimate Guide to NHIs that 79% of organisations have experienced secrets leaks, and 77% of those incidents caused tangible damage. That is why on-demand testing is often paired with event-specific risk checks rather than reserved for a yearly assurance cycle.

Why It Matters in NHI Security

On-demand pentesting matters because NHI risk changes faster than traditional review cycles. Secrets rotate, service accounts proliferate, API permissions drift, and agents gain new tool access as teams ship. If testing waits for a quarterly or annual appointment, exploitable conditions can remain active long enough for attackers to find them first. This is especially important where a change affects authentication, authorization, or secret distribution, because those are the paths adversaries use to move from one workload to another.

The NHI security problem is not theoretical. NHI Mgmt Group reports in the Ultimate Guide to NHIs that 97% of NHIs carry excessive privileges, which directly increases the value of each successful exploit. On-demand testing helps verify whether a release has reduced that exposure or silently preserved it. It also supports governance decisions around rollout, rollback, and exception handling when business pressure conflicts with security requirements. Organisations typically encounter the need for on-demand pentesting only after a failed release, a suspected exposure, or a live incident, at which point the term becomes operationally unavoidable to address.

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 OWASP Agentic AI Top 10 address the attack and risk surface, while NIST CSF 2.0, NIST Zero Trust (SP 800-207) and NIST AI RMF set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
OWASP Non-Human Identity Top 10 NHI-04 Testing changed NHI attack paths directly supports validation of identity and secret controls.
NIST CSF 2.0 DE.CM-8 On-demand testing is a detection-and-validation activity tied to ongoing security monitoring.
NIST Zero Trust (SP 800-207) Zero Trust depends on verifying assumptions after trust boundaries and access paths change.
NIST AI RMF MAP AI risk mapping supports targeted reassessment when agent tools or workflows change.
OWASP Agentic AI Top 10 A2 Agentic systems need adversarial validation of tool access and execution authority.

Use on-demand pentesting to confirm that each new access path still enforces least privilege and explicit verification.