Compliance

NIS2 and DORA: what they require you to test

Neither law says 'buy a pentest every year' in those words. Both make it hard to prove compliance without one.

Illustration: NIS2 and DORA: what they require you to test

Two EU laws now shape how a large share of European companies must think about security testing. NIS2 covers a wide set of sectors, from energy and health to digital infrastructure and managed service providers. DORA covers the financial sector and the ICT providers it depends on. Both talk about testing. Neither is as simple as "do one pentest a year", and the differences matter.

This guide sets out what each law says about testing, quoting the articles, and what that means for a company that builds or runs web applications and APIs. It is not legal advice; check how your member state transposed NIS2 and what your supervisor expects.

When they apply

NIS2 is a directive, so each member state writes it into national law. Member states had to adopt their measures by 17 October 2024 and apply them from 18 October 2024. The exact obligations and the date they took effect depend on how and when your country transposed it.

Source: NIS2 Article 41

DORA is a regulation, so it applies directly in every member state. It has applied since 17 January 2025.

Source: DORA Article 64

What NIS2 says about testing

NIS2 Article 21 requires essential and important entities to take "appropriate and proportionate" measures to manage cybersecurity risk. Article 21(2) lists the minimum measures. Four of them bear directly on testing web applications and APIs:

21(2)(d)
Supply chain security, including security aspects of the relationships with direct suppliers and service providers.
21(2)(e)
Security in network and information systems acquisition, development and maintenance, including vulnerability handling and disclosure.
21(2)(f)
Policies and procedures to assess the effectiveness of cybersecurity risk-management measures.
21(2)(j)
The use of multi-factor authentication or continuous authentication solutions, where appropriate.

Source: NIS2 Article 21

Our analysis: NIS2 does not name penetration testing. But point (f) asks you to assess whether your measures actually work, and point (e) asks you to handle vulnerabilities in the systems you develop. A pentest is the most direct evidence for both: it shows which controls held, which failed and that you fixed what was found. For many entities, a test of their internet-facing applications will be the easiest way to show a supervisor that point (f) is more than a policy document.

Suppliers are in scope too

Point (d) means that if you supply software or services to an entity covered by NIS2, expect security questionnaires and requests for test evidence, even if NIS2 does not apply to you directly. For many SaaS companies, this is how NIS2 arrives: through customers. Our Danish case study shows why supervisors now care about supplier access.

Fines

Article 34 sets maximum fines of at least €10 million or 2 percent of total worldwide annual turnover for essential entities, and at least €7 million or 1.4 percent for important entities, whichever is higher.

Source: NIS2 Article 34

What DORA says about testing

DORA is much more explicit. Chapter IV, "Digital operational resilience testing", sets out what financial entities must test, how often and how.

Article 24: a testing programme, and annual tests

Financial entities other than microenterprises must make sure that appropriate tests are carried out on all ICT systems and applications supporting critical or important functions at least yearly.

Source: DORA Article 24

Article 25: which tests

The testing programme must provide for a range of tests. The list in Article 25(1) includes vulnerability assessments and scans, open-source analyses, network security assessments, gap analyses, physical security reviews, questionnaires and scanning software solutions, source code reviews where feasible, scenario-based tests, compatibility testing, performance testing, end-to-end testing and penetration testing.

Source: DORA Article 25

Article 26: threat-led penetration testing

Financial entities identified by their competent authority must also carry out advanced testing by means of threat-led penetration testing (TLPT) at least every three years. Each TLPT must cover several or all critical or important functions and be performed on live production systems supporting them. Most smaller financial entities are not selected for TLPT, but they remain subject to Articles 24 and 25.

Source: DORA Article 26

NIS2 and DORA side by side

NIS2DORA
Legal formDirective, transposed nationallyRegulation, directly applicable
WhoEssential and important entities in listed sectorsFinancial entities and, indirectly, their ICT providers
Names penetration testingNo; requires assessing effectiveness of measuresYes, in Article 25(1)
FrequencyNot fixed in the directiveAt least yearly for systems supporting critical or important functions
Advanced testingNot specifiedTLPT at least every three years for identified entities

What to do if you build software

  1. Find out whether you are in scope directly, or as a supplier to entities that are. Most SaaS companies selling to banks, insurers, hospitals or utilities are at least the second.
  2. List the systems that support critical functions. For DORA this is the starting point of the testing programme. For NIS2 it is the basis of your risk assessment.
  3. Test those systems at least yearly, including authenticated tests of your web applications and APIs, and after significant changes.
  4. Keep the evidence: scope, methodology, findings, fixes and retests. Supervisors and customers will ask for the chain, not just the report.
  5. Check MFA everywhere, since 21(2)(j) names it and a pentest will test it.

Our analysis: a yearly test is the floor, not the target. Exploitation now follows disclosure within days, as we describe in AI agents now hack web apps, and a test from eleven months ago says little about the release you shipped last week. We built PentestLynx so EU companies can test after each significant change, with EU-hosted AI and reports signed by senior pentesters.

Frequently asked questions

Does NIS2 require penetration testing?

NIS2 does not name penetration testing. Article 21 requires policies and procedures to assess whether your cybersecurity measures work, and a pentest is one of the most direct ways to show that.

Does DORA require penetration testing?

Yes. Article 25 lists penetration testing among the tests a financial entity's testing programme must provide for, and Article 24 requires yearly tests of systems supporting critical or important functions.

What is TLPT under DORA?

Threat-led penetration testing: an advanced test, required at least every three years for financial entities identified by their competent authority, run on live production systems supporting critical or important functions.

See what an attacker would find in your app

Our AI agents attack your web app or API with your permission, prove each finding with a working exploit, and senior pentesters review and sign the report.

15-minute call

Talk to our team

A 15-minute call about your app, your deadline and what your auditor, insurer or customer needs to see.