TUM Logo

Using Static Code Analysis for GDPR Compliance Checks

Using Static Code Analysis for GDPR Compliance Checks

Supervisor(s): Immanuel Kunz
Status: finished
Topic: Others
Author: Andreas Binder
Submission: 2023-05-15
Type of Thesis: Masterthesis
Thesis topic in co-operation with the Fraunhofer Institute for Applied and Integrated Security AISEC, Garching

Description

Abstract:

Compliance with the General Data Protection Regulation (GDPR) is of great importance for
companies, as violations can result in expensive legal consequences as well as reputational
damage. Software systems are especially affected by the requirements mandated by the
GDPR, as they primarly process personal data. Therefore, software engineers are also
required to design software systems in a way that complies with the GDPR. To ensure
compliance, expensive privacy experts such as lawyers or professional auditors are involved
in the software development process to manually review the developed software. However,
a manual review using methods such as privacy threat modeling can be time-consuming
and must be repeated, especially in agile software development with changing requirements.
Furthermore, integrating this time-consuming process into the short development cycles in
agile development can be difficult. Faster and automated methods are required to reduce the
effort of a manual review.
The objective of this Thesis is to provide a solution for the time and effort-intensive process
of conducting a manual assessment of software systems to determine their compliance with
GDPR regulations. Therefore we develop a static code analysis tool that can check source code
for compliance to individual articles of the GDPR semi-automatically. First, we use a fictitious
generic example to present potential workflows that a service provider can implement to
comply with relevant articles of the GDPR. We analyze properties of these workflows and
derive code properties from them to develop compliance checks that enable automated
verification of the source code. Subsequently, we use an existing graph-based static code
analysis tool as a basis and extend it accordingly in order to be able to automatically extract
the necessary code properties for compliance from source code. Afterwards, we develop
compliance checks using reusable queries in the Cypher query language to check via the
developed static code analysis tool whether the necessary properties for compliance are
present in the analyzed source code. We expect this approach results in a significant reduction
in effort compared to a manual assessment.
Zusammenfassung:

Die Einhaltung der Datenschutz-Grundverordnung (DSGVO) ist für Unternehmen von großer
Bedeutung, da Verstöße teure rechtliche Konsequenzen und Rufschädigung nach sich ziehen
können. Die DSGVO schreibt Anforderungen für alle vor, die personenbezogene Daten verarbeiten,
darunter auch Softwaresysteme. Daher sind auch Software-Ingenieure verpflichtet,
Softwaresysteme so zu gestalten, dass sie mit der DSGVO konform sind. Um die Einhaltung
der Vorschriften zu gewährleisten, werden teure Datenschutzexperten wie Anwälte in den Softwareentwicklungsprozess
einbezogen, um die entwickelte Software manuell zu überprüfen.
Eine manuelle Überprüfung mit Methoden wie der Modellierung von Datenschutzbedrohungen
kann jedoch zeitaufwändig sein und muss wiederholt werden, insbesondere bei
einer agilen Softwareentwicklung mit wechselnden Anforderungen. Außerdem kann es
schwierig sein, diesen zeitaufwändigen Prozess in die kurzen Entwicklungszyklen der agilen
Entwicklung zu integrieren. Hier sind schnellere und automatisierte Methoden gefragt, um
den Aufwand einer manuellen Überprüfung zu reduzieren.
Das Ziel dieser Thesis ist es, eine Lösung für den zeit- und arbeitsintensiven Prozess
der manuellen Überprüfung von Softwaresystemen auf ihre Konformität mit den GDPRVorschriften
zu finden. Dazu entwickeln wir ein statisches Code-Analyse-Tool, das Quellcode
semi-automatisch auf die Einhaltung der einzelnen Artikel der DSGVO überprüfen kann.
Zunächst stellen wir anhand eines fiktiven generischen Beispiels mögliche Arbeitsabläufe
vor, die ein Dienstanbieter implementieren kann, um die relevanten Artikel der DSGVO
einzuhalten. Wir analysieren die Eigenschaften dieser Abläufe und leiten daraus Code-
Eigenschaften ab, um Compliance-Checks zu entwickeln, die eine automatische Überprüfung
des Quellcodes ermöglichen. Anschließend verwenden wir ein graphen-basiertes statisches
Code-Analyse-Tool als Grundlage und erweitern dieses entsprechend, um die für die Konformität
notwendigen Code-Eigenschaften automatisch aus dem Quellcode extrahieren zu
können. Anschließend entwickeln wir Konformitätsprüfungen mit wiederverwendbaren
Abfragen in der Abfragesprache Cypher, um über das entwickelte statische Code-Analyse-
Tool zu prüfen, ob die für die Konformität notwendigen Eigenschaften im analysierten
Quellcode vorhanden sind. Wir gehen davon aus, dass dieser Ansatz im Vergleich zu einer
manuellen Bewertung zu einer erheblichen Verringerung des Aufwands führt.