On a Friday evening, the release notes of a SaaS accounting product gain two modest lines: "sign in with corporate SSO" and "faster loading of the customer dashboard." Behind the first line sits a new identity provider, code that parses its responses, and logic that links external accounts to local ones. Behind the second sits a CDN caching layer in front of pages that used to be served straight from the application server. Automated tests are green, users are happy, there are no regressions. The annual pentest took place two months ago; the next one is scheduled in ten.
This is a hypothetical example, but the question behind it is entirely practical. What happens if the cache mistakenly starts serving one customer a page built for another? Can someone link a stranger's corporate account to their own user by tampering with a parameter in the provider's response? Has password reset behaviour changed for people who now sign in through SSO? None of these problems has to break the advertised feature. Functional tests can catch them when they include explicit assertions about tenant isolation, account linking and recovery behaviour; an ordinary happy-path suite may miss them. And the report from two months ago describes a system that no longer exists.
Change-triggered penetration testing is the answer to exactly this situation. The idea is to schedule an authorized security assessment not only by the calendar, but also when the system changes in substance: when permissions, data flows, trust boundaries or the handling of untrusted input change. Below we look at which changes genuinely deserve hands-on testing, how to scope a delta pentest, how to build it into delivery, how to accept the results and what to ask a provider.
Why a calendar pentest is sometimes not enough
A scheduled pentest once a year or once a quarter is convenient: the budget is predictable, coverage is broad, and the report can go into the auditor's folder. Its weakness is the gap between the moment a defect appears and the moment it is found. If a team ships every week, dozens of changes will pile up before the next scheduled assessment, and some of them will touch precisely what matters for security.
Risk moves with code, configuration and trust boundaries. It makes sense for testing to move with them. The point of the approach, however, is not to turn every commit into a paid pentest. The point is to connect specific changes to the system properties they affect and to agree in advance which changes get a targeted manual check, which are covered by regression automation, and which can comfortably wait for the next broad assessment.
What follows concerns web applications, APIs and the infrastructure that directly serves them. Any testing described here assumes written authorization from the parties empowered to grant it for the specific systems, an agreed scope and documented rules of engagement. Nothing in this article grants or implies permission to test anything.
One more important caveat: public standards contain no single mandatory list of changes that require a pentest. The trigger logic below is practical guidance, not a regulatory requirement, and each organization calibrates it to its own releases, data and obligations.
Which changes alter the attack surface
It helps to start with three questions for any change. Has it changed who can do what in the system? Has it changed which data crosses which boundary? Has it changed how untrusted input is handled? If the answer to at least one question is "yes" or "not sure", the change should go to triage.
Notice the property such changes share: the feature keeps working afterwards. A relaxed CORS policy, a missing CSP directive, a new default for a cookie attribute, a cache in front of authenticated pages — users notice nothing and the "page loads" test passes. What changes is not the feature but a security property, which is exactly why these changes slip through so easily.
Authentication, sessions and authorization
HTTP itself does not keep state between requests, but that does not mean it has no sessions. Cookies, tokens and server-side session stores add state, and an ordinary web application can perfectly well keep sessions on the server. So any change to how that state is created, transmitted, extended and revoked is a trigger candidate. That includes a new identity provider, a move to SSO, a changed MFA flow, a new token format, new cookie attributes, a different session lifetime and modified logout logic.
Authorization deserves separate attention: a new role, a new object type with its own access rights, a rewritten resource ownership check. Scanners struggle with such defects because the request is formally valid — it was simply made by the wrong user. We covered how to test these scenarios systematically in our article on business logic security testing.
Do not mix human authentication with workload credentials. Changing MFA for employees and rotating the key one microservice uses to call another are different changes with different risks and different tests, even if the ticket calls both of them "authentication improvements".
Security headers and browser policies
Content Security Policy, CORS, Cross-Origin Resource Policy and Permissions Policy are the mechanisms an application uses to tell the browser what to trust. They are usually changed for the sake of an integration: a payment widget was added, analytics were connected, an API was opened to a new frontend on another domain. Allowing any origin "temporarily", or reflecting back whatever Origin arrives, is easier than working out why a request fails — and such decisions tend to stay for a long time.
Infrastructure in the request path
A new proxy, cache, load balancer or CDN, or a protocol change — for example upgrading a connection to WebSocket — changes how a request reaches the application and how the response returns to the user. Redirects and caching are especially sensitive here. A mistake in the cache key can hand a personal page to a stranger, and a proxy may interpret headers the application relies on for access decisions in its own way. Once established, a WebSocket connection lives by its own rules, and checks that used to run on every HTTP request may simply be absent inside it.
Code that builds commands, paths and markup
Code that assembles OS commands, database queries, file paths or HTML from user input is a natural candidate for manual review. These weakness classes feature in the CWE Top 25, and CISA, in its Secure by Design series, separately urged vendors to eliminate cross-site scripting, OS command injection and directory traversal as entire classes of defects. A new file upload or download feature, template-based report generation, data import from an external format — these are all places where such defects appear.
Dependencies, platforms, integrations and tenants
A major framework or platform upgrade, a move to a different hosting environment, merging tenants, data stores or trust domains, a new third-party integration — after changes like these, not one feature shifts but several of the assumptions security relied on. New external endpoints and APIs, especially administrative ones, should be treated as a separate attack surface; for a methodical way to test them, see our guide to REST API security assessment.
What does not need a manual test
The trigger list exists not to test everything but to spend expert time where it pays off. Cosmetic UI tweaks, content updates, refactoring without changes to data flows, and minor dependency updates without behavioural changes are usually covered by static analysis, dependency scanning, dynamic scanning in the pipeline and code review.
There is a trap here. "Refactoring" in a ticket sometimes means moving an authorization check from one layer to another, and a "minor library update" can mean a changed default in a parser. So the decision that a change needs no manual check should be made by someone who has looked at the diff with the questions from the previous section in mind, not by someone who read the ticket title.
It is convenient to organize decisions into tiers. Below is a recommended model that you should calibrate on your own data.
Scroll sideways to compare
| Tier | Which changes | What we do | How we confirm it |
|---|---|---|---|
| 0 — automation only | Data flows, trust boundaries and security controls do not change: UI, content, refactoring without new data paths | Static analysis, dependency scanning, dynamic scanning in the pipeline | A successful pipeline run and a diff review with a security-impact flag |
| 1 — targeted review | A limited change to input handling or configuration in one component | Security review and selected test cases mapped to the affected requirements | A list of performed checks with versioned requirement identifiers |
| 2 — delta pentest | Authentication, authorization, sessions, security headers, external APIs, infrastructure in the request path | An authorized manual test of the changed components and their nearest connections, followed by a retest | A report with scope, environment, findings and retest results |
| 3 — full reassessment | Architectural changes, new trust domains, platform migration or deltas accumulated since the last baseline | A broad pentest under the new scope | A new baseline against which later deltas are compared |
Sensitive data, internet reachability and an applicable weakness class highlighted by the CWE Top 25 or MITRE's KEV-based weakness analysis are useful signals when deciding whether to raise a change by one tier. A CWE ranking is only one input: test depth still depends on the reachable attack path, likely impact, existing controls and the quality of evidence available. Lower a trigger type only when sufficiently broad, representative past assessments found no relevant issues, the testing quality and coverage are understood, and compensating automated controls are shown to work. We described how to turn such signals into a work order in our piece on risk-based vulnerability prioritization.
How to scope a delta pentest
A dangerous mistake is to treat the delta as "the list of changed files". The delta is the changed components plus their nearest interactions with what did not change. Back to the hypothetical example. The new SSO may be implemented carefully, but old mechanisms keep living next to it: password reset, email change, inviting users to an organization, API tokens issued before the switch. If you test only the new sign-in flow, one question remains unanswered: can a user with a local password bypass mandatory SSO through an old endpoint?
So when defining scope it helps to work through three layers. The first is the change itself: new endpoints, parameters, roles, headers, configuration. The second is the neighbouring mechanisms that trust the changed component or that it depends on. The third is the assumptions the change may have broken: what the architecture used to guarantee and only code now guarantees.
For the cache in the same example, the scope looks different: which responses are cached, what the cache key is built from, how cookies and the Authorization header are taken into account, what happens to error responses and redirects, and whether the cache can be made to store a response intended for another user. This is not a large pentest of the whole application, but it is not a single check of the Cache-Control header either.
Test case content can conveniently come from the OWASP Web Security Testing Guide: a delta test selects only the categories that match the change. A change to cookie handling calls for session management tests, a change to CSP for client-side tests, a new identity provider for authentication and authorization tests. Running the whole guide for a single change makes no sense.
Requirements can conveniently be tagged against OWASP ASVS. They have versioned identifiers such as v5.0.0-1.2.5, and OWASP explicitly warns that identifiers can change between versions, so the report must state which version the tagging used. Requirement lists are published in machine-readable CSV and JSON, so the "change — requirement — check" link can be partly automated. Remember that such tagging shows which requirements were checked, but on its own it does not prove conformity with the standard.
If your organization practises assume-breach assessment, a delta test can have an agreed starting point — for example, an ordinary user account in one of the tenants. But the report must state explicitly that the test began from a pre-agreed compromised state and does not prove that such initial access could actually have been obtained.
If you have an upcoming release with tier 2 changes and it is unclear where the delta boundary lies, you can work through that question concretely with the Pentest.red team: which components change, which neighbouring mechanisms trust them, which environment is acceptable for testing, and what evidence you need at the end. A convenient starting point is the pentest scope form.
Standards as a shared language, not a ritual
NIST SP 800-115 is a technical guide to security testing published in 2008. It covers planning tests, conducting them, analysing findings and developing mitigation strategies, and it formally divides an assessment into planning, execution and post-execution phases. The document predates modern CI/CD pipelines, but its logic maps well onto a change-triggered model: planning becomes defining the delta, execution focuses on the changed components, post-execution covers analysis and recommendations. Separately from those phases, many teams run their own working cycle of "find — fix — retest — close"; that is a practice, not NIST's own wording. The document also stresses that every technique has strengths and limitations — a useful reminder to choose techniques for the specific environment and to avoid actions that could disrupt availability.
OWASP Top 10 and the CWE Top 25 can contribute to prioritization by highlighting weakness classes worth considering when a change touches them. They do not, by rank alone, determine the required test depth. Classifying a finding under a CWE describes the nature of the defect; it does not mean that a particular vulnerability has been exploited by anyone — that requires separate evidence.
The hidden requirement of the whole scheme is version discipline. References get updated: OWASP Top 10 has 2017, 2021 and 2025 editions, ASVS identifiers change, WSTG publishes new versions. If you want to compare this quarter's delta test with last year's, every report must state which reference versions were used — for example, WSTG 4.2, ASVS 5.0.0 and OWASP Top 10 2025 at the time of that specific assessment. When a new edition of any of them is released, revisit both the tier model and the mapping of tests to requirements.
Trade-offs: delta versus calendar
The main advantage of the change-triggered approach is relevance. Testers spend their time on what actually changed, and findings surface while the engineers who made the change still have the context fresh. The second advantage is evidence: a significant release comes with its own assessment record.
The main risks are blind spots and overload. A pure delta approach can miss vulnerabilities in components nobody touched, interactions between several changes that each looked harmless on their own, and configuration drift that never went through the formal change process at all: someone edited a load balancer rule by hand. A fast-moving team may also generate more triggers than the budget can cover.
A calendar-only approach gives a predictable budget and broad coverage, but findings can lag releases by months. A change-only approach is precise and timely, but risks missing baseline drift and cross-component problems. Where an organization needs to address both sets of blind spots, a hybrid is one option: a periodic broad assessment creates and refreshes the baseline, delta tests cover significant changes in between, and automated checks handle predefined repeatable scenarios. The balance depends on release frequency, data sensitivity, contractual obligations and available evidence; there is no universal ratio.
It is also fair to admit a limitation: the reviewed source pack for this article contains no quantitative comparison of the effectiveness or cost of change-triggered and scheduled tests. It is a reasonable hypothesis worth testing in your own programme — for example, by tracking how many findings each delta test produces in the changed components.
How to build change-triggered pentesting into delivery
Implementation starts not with the testing team but with change management. Add a security-impact field to your pull request or change request template: does the change affect authentication, authorization, sessions, input handling, security headers, external interfaces, workload credentials or infrastructure in the request path? A "yes" to at least one item sends the change to triage. For how to check that such control points actually work in your pipeline rather than existing only on paper, see our guide to DevSecOps security assessment.
- Ticket flagThe change author answers whether it affects permissions, sessions, input, headers, external interfaces or the request path.
- Triage and tierThe security owner reviews the diff, assigns a tier from 0 to 3 and records the decision together with the reason.
- Scope and rulesFor tiers 2 and 3, the delta, neighbouring mechanisms, environment, timing, contacts and stop conditions are agreed.
- Test and analysisTesters examine the changed components and their connections; findings are tagged to the affected requirements.
- Retest and linkageThe fix is retested in the agreed environment and the finding is linked to the change that introduced it.
Triage is a decision that must leave a trace. If a change was assigned tier 0, the ticket should record who decided that and why.
Execution must respect authorization requirements. Delta tests are usually run in an agreed test environment as close to production as possible, under written rules of engagement that set out scope, timing, contacts and stop conditions. Authorization must come from the parties empowered to grant it for the specific systems, including services hosted by third parties: a cloud provider, a SaaS platform, an external payment gateway. A provider should never assume such authorization by default.
The test environment is a compromise. Results obtained there cannot be carried over to production without caveats: cache configuration, WAF rules, service versions and the set of integrations may differ. If the differences matter for the change under test, describe them in the report, and agree certain safe checks — for example of headers and browser policies — for the production environment.
Test logs need attention too. They should not retain tokens, passwords or keys in clear text, sensitive data should be minimized, and access to logs and their retention periods should be restricted and agreed in advance.
Retesting and evidence of closure
The cycle closes only when a finding has been fixed, retested and linked to the change that introduced it. A retest is not "the developer said it's fixed"; it is a repeat run of the attack scenario and its reasonable variants. If the finding was that the redirect_uri parameter is not validated, after the fix you need to test not only the original value but also subdomains, alternative encodings, extra slashes and other variants that bypass naive validation.
Retest conclusions are bounded to the environment and the variants that were actually tested. Saying "the vulnerability has been eliminated" without naming the environment, build version and tested variants promises more than has been confirmed. For more on building such checks, see our article on penetration test remediation validation.
Scroll sideways to compare
| Artefact | What it must contain | How to check at acceptance | Warning sign |
|---|---|---|---|
| Triage record | The change, the assigned tier, who decided and why | Spot-check several tier 0 changes against their diffs | Tier 0 assigned to changes that touch sessions or permissions |
| Scope definition | Changed components, neighbouring mechanisms, environment, exclusions, starting state | Confirm that neighbouring mechanisms are named explicitly rather than implied | Scope equals the list of changed files |
| Delta test report | Reference versions, checks performed, findings with reproduction steps, environment differences from production | Reproduce one or two findings from the report's description | No environment or versions stated, findings without reproduction steps |
| Retest result | Build, environment, bypass variants tested, final status | Check that a "closed" status is tied to a specific build and set of variants | "Fixed" on the developer's word without a repeat test |
Over time these records produce programme-specific data that public sources do not contain: how many findings each trigger type yields, how quickly they are fixed, and which triggers may need review. A low finding count supports lowering a tier only when the underlying tests were sufficiently broad and well executed, the releases were representative, and compensating controls remain effective.
How to choose a provider for delta pentests
Procurement works better once an internal trigger and tier model has taken shape. Without one, the first engagement must also define how changes enter scope, which can make results harder to compare across releases. Providers name such services differently: continuous pentesting, pentest-as-a-service, on-demand retesting. The name matters less than the ability to test a given delta consistently and with a traceable methodology at the response time the parties actually agree.
CISA's Secure by Demand guide is written for software customers in procurement conversations, and its core stance applies to buying testing as well: ask for evidence, not promises. In practice that comes down to a few questions. Which WSTG and ASVS versions are the tests tied to, and do reports reference versioned identifiers? How does the provider define the delta, and how does it account for interactions with unchanged components? What trigger-to-test timeframe can be agreed, and how are urgent pre-release checks handled? Is retesting of fixes included, and how is closure of findings confirmed? How are rules of engagement, scope approval and stop conditions documented for each engagement? How are the CWE Top 25, the KEV-based weakness list or OWASP Top 10 used to focus effort? Can results be exported in a structured format and linked to change records? What is automated, what do specialists do, and which limitations does the provider state itself?
Be wary of promises of full coverage through automation alone, an inability to explain how results stay comparable across reference versions, and willingness to start testing without documented authorization for every affected environment. Also remember that a pentest is not certification, attestation or an assurance opinion. It shows what could and could not be found within the agreed scope, environment and time, and it does not guarantee the absence of vulnerabilities. Its report can be evidence used in a broader conformity evaluation, but a formal conformity assessment remains separate work for the appropriately qualified body or auditor.
If you are building a hybrid model, you can discuss with Pentest.red what a baseline assessment might look like and which changes are sensible to move into delta checks: what evidence your internal processes need, which environments are available for testing and who in your organization signs the authorization. The description of our penetration testing service and the scope form will help you prepare for that conversation.
Conclusion
Change-triggered penetration testing ties security assessment to moments when the risk profile changes: permissions changed, data crossed a new boundary, untrusted input gained a new path. It can complement a periodic baseline assessment and automated regression checks; whichever operating model is chosen, it needs trigger tiers tied to specific system properties, versioned references and retesting with honestly bounded conclusions.
The sources reviewed for this article do not prove that this approach is always cheaper or more effective — that has to be measured in your own programme. But it offers a verifiable way to keep assessment in step with delivery and to answer the question that any attentive reader of your release notes will sooner or later ask: did anyone actually test this change?
PENTEST.RED
Discuss pentest scope and pricing
We start by agreeing on systems, access, constraints and the expected evidence.
Based on in-depth research, edited for clarity and practical use.