Dealing with Variability in API Misuse Specification

05/11/2021
by   Rodrigo Bonifácio, et al.
0

APIs are the primary mechanism for developers to gain access to externally defined services and tools. However, previous research has revealed API misuses that violate the contract of APIs to be prevalent. Such misuses can have harmful consequences, especially in the context of cryptographic libraries. Various API misuse detectors have been proposed to address this issue including CogniCrypt, one of the most versatile of such detectors and that uses a language CrySL to specify cryptographic API usage contracts. Nonetheless, existing approaches to detect API misuse had not been designed for systematic reuse, ignoring the fact that different versions of a library, different versions of a platform, and different recommendations or guidelines might introduce variability in the correct usage of an API. Yet, little is known about how such variability impacts the specification of the correct API usage. This paper investigates this question by analyzing the impact of various sources of variability on widely used Java cryptographic libraries including JCA, Bouncy Castle, and Google Tink. The results of our investigation show that sources of variability like new versions of the API and security standards significantly impact the specifications. We then use the insights gained from our investigation to motivate an extension to the CrySL language named MetaCrySL, which builds on meta programming concepts. We evaluate MetaCrySL by specifying usage rules for a family of Android versions and illustrate that MetaCrySL can model all forms of variability we identified and drastically reduce the size of a family of specifications for the correct usage of cryptographic APIs

READ FULL TEXT

page 1

page 3

page 9

page 19

page 21

page 23

page 25

page 27

research
07/14/2022

Automated Change Rule Inference for Distance-Based API Misuse Detection

Developers build on Application Programming Interfaces (APIs) to reuse e...
research
10/02/2017

CrySL: Validating Correct Usage of Cryptographic APIs

Various studies have empirically shown that the majority of Java and And...
research
10/19/2020

Verifying Correct Usage of Context-Free API Protocols (Extended Version)

Several real-world libraries (e.g., reentrant locks, GUI frameworks, ser...
research
06/18/2018

CHIRON: Deployment-quality Detection of Java Cryptographic Vulnerabilities

Cryptographic API misuses threaten software security. Examples include e...
research
06/18/2018

RIGORITYJ: Deployment-quality Detection of Java Cryptographic Vulnerabilities

Cryptographic API misuses threaten software security. Examples include e...
research
12/01/2017

A Systematic Evaluation of API-Misuse Detectors

Application Programming Interfaces (APIs) often have usage constraints, ...
research
12/01/2017

A Systematic Evaluation of Static API-Misuse Detectors

Application Programming Interfaces (APIs) often have usage constraints, ...

Please sign up or login with your details

Forgot password? Click here to reset