Sovereign AI red-teaming is the practice of systematically probing a privately hosted large language model for adversarial vulnerabilities using tools and methods that remain entirely within the organisation’s own infrastructure, so that sensitive prompts, completions, and model weights never leave the controlled environment. For European government bodies and regulated-sector organisations running open-weight models such as Mistral or Llama on-premises, this is not optional security hygiene: it is a direct obligation under EU AI Act Article 9, reinforced by ENISA’s AI Threat Landscape 2024 and NIS-2 Article 21.
Why Sovereign Deployments Face a Different Attack Surface
The threat model for a privately hosted open-weight LLM differs fundamentally from that of a public API model, and understanding this distinction is the starting point for any meaningful red-team programme.
When an organisation queries a public model such as GPT-4 through an API, neither the attacker nor the security tester has access to the underlying weights, gradients, or probability logits. Attacks are necessarily black-box: the attacker observes inputs and outputs only. On a sovereign deployment running Mistral 7B or Llama 3 on dedicated hardware, the red team has full white-box access. This means gradient-based adversarial examples can be constructed directly against the model, membership inference attacks can probe whether specific training records are recoverable, and model inversion techniques can attempt to reconstruct sensitive information from the model’s internal representations.
The four attack categories most relevant to privately hosted models are:
- Prompt injection and jailbreaking: Crafted inputs that override system instructions or bypass safety guardrails. On a sovereign model without a vendor-managed content filter layer, there is no secondary line of defence unless the organisation builds one.
- Model inversion: Techniques that recover training data or sensitive memorised content by querying the model in controlled ways. Particularly significant for models fine-tuned on proprietary or patient-level data.
- Membership inference: Statistical attacks that determine whether a specific record was present in the training set, creating a data protection exposure under GDPR Article 9 if the training set included special-category data.
- Data poisoning: Adversarial manipulation of fine-tuning datasets to embed backdoors or systematically skew outputs. This attack vector is unique to organisations that fine-tune their own model versions.
Regulatory Obligations: AI Act Article 9, ENISA, and NIS-2
EU AI Act Article 9 and ENISA’s AI Threat Landscape 2024 together define the minimum floor for adversarial testing of high-risk AI systems, and NIS-2 Article 21 makes structured security testing a binding obligation for essential and important entities that rely on AI systems in their core workflows.
Article 9 requires providers of high-risk AI systems to establish a continuous risk management system that identifies foreseeable risks throughout the system’s lifecycle, evaluates those risks based on post-market data, and applies appropriate risk mitigation measures. The Article does not use the word “red-teaming” but the obligation to test for “risks that may emerge when the high-risk AI system is used in accordance with its intended purpose” directly maps to structured adversarial evaluation. ENISA operationalises this in its AI Threat Landscape 2024 by cataloguing prompt injection, model extraction, and adversarial example generation as distinct threat categories requiring dedicated technical controls.
As the EU AI Act states in Article 15(1): “High-risk AI systems shall be designed and developed in such a way that they achieve an appropriate level of accuracy, robustness, and cybersecurity, and perform consistently in those respects throughout their lifecycle.” This robustness requirement cannot be satisfied by declaration alone; it requires test evidence.
ENISA has noted: “Adversarial machine learning attacks, including prompt injection and model inversion, represent a distinct and growing threat category that requires dedicated technical controls beyond conventional cybersecurity measures.” (ENISA AI Threat Landscape 2024)
NIS-2 Article 21 adds a parallel obligation: essential and important entities must implement security testing as part of their risk management practices, and a sovereign LLM integrated into clinical, legal, or financial decision support qualifies as a system whose compromise would affect essential service continuity.
Self-Hosted Tooling for Sovereign Adversarial Evaluation
The fundamental constraint for regulated organisations is that red-team tooling must not exfiltrate prompts, completions, or model weights to external services. Three open-source tools meet this constraint.
| Tool | Maintainer | Primary function | Self-hostable | Key strength for sovereign LLMs |
|---|---|---|---|---|
| Garak | NVIDIA / community | LLM vulnerability scanning across probe categories including prompt injection, jailbreak, and hallucination | Yes, fully air-gap compatible | Modular probe library runs against a local model endpoint with no outbound telemetry |
| PyRIT (Python Risk Identification Toolkit) | Microsoft, open-source | Automated multi-turn adversarial dialogue, red-team orchestration | Yes, local deployment mode | Supports orchestration of complex jailbreak chains without cloud dependency when configured with a local model backend |
| Adversarial Robustness Toolbox (ART) | IBM, open-source | White-box and black-box attacks, membership inference, model inversion, data poisoning detection | Yes, pip-installable | The only mature open-source library with native support for membership inference and model inversion against transformer-based models |
Promptfoo, a fourth tool frequently referenced in evaluations, supports adversarial test case generation and can be self-hosted, but its primary strength is functional evaluation and regression testing rather than deep adversarial probing. It complements Garak and ART for coverage of output quality regressions across model updates.
NIST AI RMF 1.0 identifies adversarial robustness testing as a control within the Measure function, which sits alongside Govern, Map, and Manage in the framework. Organisations that map their sovereign AI systems through the full RMF cycle before deployment have a defensible audit trail that satisfies both AI Act and NIS-2 documentation requirements.
Governance Controls and Human Oversight
Adversarial testing of a sovereign AI system handling sensitive regulated-sector data requires governance controls that go beyond those needed for conventional penetration testing.
AI Act Article 14 mandates that high-risk AI systems be designed to allow effective human oversight, including the ability to intervene, halt, or override the system. During a red-team exercise, this translates into three specific requirements. First, the red-team environment must be isolated from production so that successful attacks do not propagate to live systems or real user data. Second, a designated human reviewer must approve any test that involves real or realistic personal data, even in a sandboxed environment. Third, outputs from red-team runs must be reviewed by a person with sufficient AI literacy to distinguish genuine vulnerabilities from test artefacts before findings enter the risk register.
Access controls during adversarial testing must implement strict separation of duties: the team running attacks should not be the same team that certifies remediation. For organisations subject to DORA (the Digital Operational Resilience Act), this mirrors the independence requirement already familiar from threat-led penetration testing under the TIBER-EU framework.
Documenting Findings for AI Act Annex IV and NIS-2 Compliance
Red-team evidence is only regulatory currency if it is documented in a form that satisfies AI Act Annex IV’s conformity assessment requirements and can survive an audit under NIS-2.
Annex IV requires technical documentation covering the system’s intended purpose, risk management measures, training data governance, and accuracy and robustness metrics. Red-team findings must therefore be recorded in a structured format that links each vulnerability to the relevant Article 9 risk category, specifies the tool and method used (for example, a Garak jailbreak probe run or an ART membership inference experiment), documents the remediation action taken, and records any residual risk accepted by the designated risk owner with explicit sign-off.
IBM’s 2024 Cost of a Data Breach Report found that organisations using AI and automation in security identified and contained breaches an average of 98 days faster than those that did not. (IBM, 2024) Organisations that have pre-existing red-team documentation are better positioned to demonstrate rapid detection and response capability, a factor that regulators increasingly weigh in enforcement decisions.
NIS-2 Article 21 security testing obligations are satisfied when documentation shows that testing was systematic, covered foreseeable adversarial scenarios, and produced traceable remediation actions. A Garak scan report alone is insufficient: the organisation must show that findings were reviewed, prioritised, and either remediated or formally accepted as residual risk.
ENISA’s AI Threat Landscape 2024 also references that AI systems were implicated in 17% of significant ICT incidents affecting EU essential entities, underscoring why regulators will scrutinise adversarial testing records with increasing attention. (ENISA, 2024)
Building the Conformity Assessment Dossier
For organisations placing a high-risk AI system on the EU market or putting it into service, the Annex IV dossier is the single artefact that must demonstrate compliance across the full AI Act obligation set. Sovereign red-teaming evidence contributes to three sections of that dossier.
The robustness and cybersecurity section requires quantitative evidence that the system resists adversarial manipulation. ART benchmark results for membership inference resistance and Garak probe pass rates across jailbreak categories are the primary evidence sources. The risk management section must show that the Article 9 risk register was updated after each red-team cycle and that new vulnerabilities triggered reassessment rather than being absorbed into a static document. The post-market monitoring section must demonstrate that adversarial testing is not a one-time pre-deployment exercise but a recurring activity tied to model updates, prompt template changes, and the publication of new attack techniques.
Organisations that treat red-teaming as a continuous programme rather than a project gain a compounding compliance advantage: each cycle’s documentation extends the audit trail, and the organisation can demonstrate to a notified body or national supervisory authority that its risk management system is genuinely continuous, as Article 9 requires, rather than performed once at launch.
FAQ
Can Garak and PyRIT be run entirely on-premises without any cloud dependency?
Yes. Both Garak and PyRIT are open-source tools that can be installed in an air-gapped or on-premises environment. They interact with a local model API endpoint and do not require internet connectivity or external telemetry, making them suitable for sovereign deployments handling classified or sensitive regulated-sector data.
Does EU AI Act Article 9 explicitly require red-teaming, or is adversarial testing implied?
Article 9 requires a continuous risk management system that includes testing to identify and address foreseeable risks throughout the lifecycle. The Regulation does not use the term “red-teaming,” but ENISA’s AI Threat Landscape 2024 and the NIST AI RMF 1.0 Measure function both operationalise the obligation as requiring structured adversarial evaluation, including prompt injection and model inversion testing for high-risk systems.
How does adversarial testing of a sovereign on-premises LLM differ from testing a public API model?
With a public API model, both the attacker and the tester lack access to weights, gradients, and logits, making white-box attacks impossible. On a privately hosted open-weight model such as Mistral or Llama, the red team can run white-box gradient-based attacks, membership inference experiments, and direct weight extraction probes. This broader attack surface makes sovereign deployments simultaneously more testable and more exposed to insider-threat scenarios.
What goes into the Annex IV conformity assessment dossier for a sovereign AI system that has been red-teamed?
Annex IV requires technical documentation covering the system’s intended purpose, risk management measures, training data governance, accuracy and robustness metrics, and post-market monitoring plans. Red-team findings, remediation actions, residual risk acceptance decisions, and the tooling used (for example Garak scan reports or ART benchmark results) form the evidentiary backbone of the robustness and cybersecurity sections of that dossier.
Is NIS-2 Article 21 relevant to AI red-teaming, or does it only cover network and infrastructure security?
NIS-2 Article 21 requires essential and important entities to implement security testing as part of their risk management practices, and this obligation extends to all systems that could affect the continuity of essential services. A sovereign LLM integrated into clinical, legal, or financial workflows qualifies, making adversarial testing of that model a direct NIS-2 obligation rather than merely a best practice.
Hoe Qsentinel dit oplost
Qsentinel is the managed Nextcloud Enterprise workspace, enhanced by Qsentinel with post-quantum encryption and sovereign private AI, hosted in Switzerland or on-premise, out of reach of the CLOUD Act.
