Back to Developer Guide

Quality Gates

Every check enforced from developer workstation to production deployment — aligned with BSI C5, OWASP Top 10, EHDS regulation, and WCAG 2.2 AA.

Pipeline Overview

Four-stage quality pipeline from commit to compliance

Stage 1 — Pre-commit Hooks

Configured in .pre-commit-config.yaml. Run automatically before every git commit.

HookToolSeverityGate
Trailing whitespacepre-commitAuto-fixReports
End-of-file fixerpre-commitAuto-fixReports
YAML / JSON syntaxpre-commitErrorBlocks
Large file check (> 5 MB)pre-commitErrorBlocks
Merge conflict markerspre-commitErrorBlocks
Private key detectionpre-commitErrorBlocks
Dockerfile lintingHadolint v2.14ErrorBlocks
Shell script lintingShellCheck v0.11ErrorBlocks
Code formattingPrettier v3.1Auto-fixReports
TypeScript type-checktsc --noEmitErrorBlocks
ESLint (max 55 warnings)Next.js lintErrorBlocks
Secret scan (staged diff)GitleaksErrorBlocks

Stage 2 — Pre-push Gates

Run before git push. These catch issues that are too slow for pre-commit.

Unit Tests

vitest run --bail 1 — stops on first failure

Blocks

Dependency Audit

npm audit --audit-level=high — HIGH + CRITICAL CVEs

Blocks

Stage 3 — CI Pipeline

GitHub Actions workflow .github/workflows/test.yml — 13 jobs on every push. View latest run →

JobTestsToolStandardGate
UI Tests (Vitest)1,613Vitest 4 + v8 coverageBSI C5 DEV-03Blocks
Neo4j Proxy Tests10Vitest 4BSI C5 DEV-03Blocks
LintNext.js ESLintBSI C5 DEV-02Blocks
Secret ScanGitleaks v8.27.2BSI C5 DEV-08Blocks
Dependency Auditnpm audit (HIGH+)OWASP A06Blocks
Trivy ScanTrivy v0.69.3OWASP A06Reports
K8s PostureKubescape (NSA + CIS)NSA K8s GuideBlocks
E2E Tests778Playwright v1.58Reports
WCAG 2.2 AA Audit93axe-core/playwrightEN 301 549Blocks
Security Pentest40+OWASP/BSI patternsOWASP Top 10Reports
SBOM Generation2CycloneDX npmEU CRA Art. 13Blocks
Licence Compliancelicense-checkerBSI C5 OPS-04Blocks
Lighthouse CI12Lighthouse CI (4 pages × 3 runs)Core Web VitalsReports

Supply-Chain Hardening

  • Gitleaks and Trivy binaries pinned to exact versions with SHA-256 checksum verification
  • Trivy v0.69.3 used explicitly — versions 0.69.4–0.69.6 were compromised (CVE-2026-33634)
  • Two dev-only secrets allowlisted in .gitleaksignore (JAD stack in-memory credentials)

Security Headers (Runtime)

Configured in next.config.js (BSI C5 DEV-07 / OWASP A05):

X-Frame-Options: DENY
X-Content-Type-Options: nosniff
Referrer-Policy: strict-origin-when-cross-origin
Permissions-Policy: camera=(), microphone=(), geolocation=()
Content-Security-Policy: default-src 'self' + scoped allowlist

Stage 4 — Protocol Compliance

Weekly + on push to main. Workflow: .github/workflows/compliance.yml View latest run →

DSP 2025-1 TCK

Dataspace Protocol

84.8%28/33 passed

DCP v1.0

Decentralised Claims

90.9%20/22 passed

EHDS Domain

EHDS Art. 3–51

64.0%16/25 passed

Infrastructure Requirements

Protocol compliance tests require the full JAD stack (19 services, 8 GB RAM). In CI, the workflow starts JAD infrastructure with graceful fallback — tests produce results only when the controlplane is healthy.

Local execution: ./scripts/run-dsp-tck.sh, ./scripts/run-dcp-tests.sh, ./scripts/run-ehds-tests.sh

Current Coverage

93.78%
Statements
+793% from baseline
81.65%
Branches
+1,147% from baseline
89.57%
Functions
+1,162% from baseline
94.73%
Lines
+826% from baseline

Test Inventory

1,613
Unit Tests
778
E2E Tests
80
Compliance Tests

Future Quality Gates

Recommended improvements prioritised by impact and regulatory alignment.

1

Enforce Coverage Thresholds

Done — vitest.config.ts

Minimum coverage thresholds in vitest.config.ts: 85% statements, 70% branches, 80% functions, 85% lines. Vitest fails if coverage drops below.

Current coverage (93%+ statements) is well above these thresholds. Enforcement prevents silent regression.

BSI C5 DEV-03
2

Mutation Testing

Medium — new tool + CI job

Add Stryker Mutator to measure test effectiveness. Target mutation score > 60%.

94% line coverage does not guarantee tests catch bugs. Mutation testing verifies tests detect real defects.

OWASP Testing Guide v4.2
3

Licence Compliance Scanning

Done — implemented in test.yml

license-checker in CI with allowlist: MIT, Apache-2.0, ISC, BSD-2/3-Clause, 0BSD, CC0-1.0, CC-BY-4.0. Blocks build on copyleft violations.

EU CRA and SIMPL-Open require licence transparency. EUPL compatibility must be verified for all transitive dependencies.

EU CRA Art. 13, BSI C5 OPS-04, SIMPL-Open
4

API Contract Testing

Medium — schemas + validation

Add OpenAPI schema validation for all 36 API routes using swagger-parser or Prism.

No formal schema enforces response shapes. Contract tests prevent frontend/backend drift.

DSP 2025-1 §4.2
5

SBOM Generation

Done — implemented in test.yml

CycloneDX 1.5 SBOM generated on every CI run for UI and Neo4j Proxy. Uploaded as 90-day artifact. Required by EU CRA Art. 13(5) and critical for SIMPL-Open supply chain transparency.

Supply chain attacks (XZ Utils, Trivy compromise) make SBOMs non-negotiable. SIMPL-Open must provide SBOMs for downstream consumers. EU CRA mandates machine-readable SBOMs by 2027.

EU CRA Art. 13, NTIA SBOM, SIMPL-Open
6

Performance Regression Testing

Done — Lighthouse CI in test.yml

Lighthouse CI with Core Web Vitals budgets: LCP < 4s (error), CLS < 0.1 (error), TBT < 300ms (warn), bundle < 500 KB (warn). Runs on 4 key pages.

Healthcare professionals use the platform under time pressure. Performance regressions now blocked in CI.

WCAG 2.2 SC 2.2.1, Core Web Vitals
7

Runtime ODRL Policy Enforcement

High — new engine + tests

Implement ODRL engine — validate API responses respect the caller's permitted datasets and temporal limits.

Currently ODRL policies are decorative. Any authenticated user can query any dataset. This is the largest EHDS compliance gap.

EHDS Art. 44, ODRL 2.2 §3
8

WCAG Blocking Gate

Done — removed continue-on-error

WCAG 2.2 AA audit promoted to blocking gate — zero-violation budget enforced. Build fails on accessibility regressions.

Current state is zero violations. Now enforced — any new component that introduces violations will block the build.

EN 301 549, EU Directive 2016/2102
9

IaC Policy Enforcement

Done — blocking in test.yml

Kubescape promoted to blocking on critical findings (--severity-threshold critical). NSA and CIS frameworks enforced.

K8s manifests define production topology. Critical security findings now block the build.

BSI C5 OPS-01, NSA K8s Guide
10

Dependency Freshness

Done — renovate.json

Renovate Bot configured: auto-merge patches, weekly PRs for minor, manual review for major. Security updates bypass schedule.

Automated dependency updates prevent CVE accumulation. Supply chain freshness is critical for CRA compliance.

OWASP A06, EU CRA Art. 14

Compliance Mapping

Quality GateBSI C5OWASPEHDSWCAG
TypeScript strictDEV-01
ESLintDEV-02A03
Unit tests + coverage thresholdsDEV-03
Secret scan (Gitleaks)DEV-08A07
Dependency auditDEV-05A06
Trivy vuln scanDEV-05A06
Security headersDEV-07A05
WCAG 2.2 AA (blocking)2.2 AA
DSP 2025-1 TCKArt. 50
DCP v1.0 complianceArt. 50
EHDS domain testsArt. 3–51
SBOM (CycloneDX 1.5)OPS-04A06Art. 50
Licence complianceOPS-04Art. 50
Lighthouse perf budget2.2 SC2.2.1
Kubescape (blocking)OPS-01
Renovate freshnessDEV-05A06
ODRL enforcement (planned)A01Art. 44

Related Documentation