Compositional Taint Analysis for Enforcing Security Policies at Scale
Authors:
- Subarno BanerjeeSBSubarno Banerjee
- Siwei CuiSCSiwei Cui
- Michael EmmiMEMichael Emmi
- Antonio FilieriAFAntonio Filieri
- Liana HadareanLHLiana Hadarean
- Peixuan LiPLPeixuan Li
- Linghui LuoLLLinghui Luo
- Goran PiskachevGPGoran Piskachev
- Nicolás RosnerNRNicolás Rosner
- Aritra SenguptaASAritra Sengupta
- Omer TrippOTOmer Tripp
- Jingbo WangJWJingbo Wang
Open Access
- 30 November 2023
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 1985-1996
Abstract
Automated static dataflow analysis is an effective technique for detecting security critical issues like sensitive data leak, and vulnerability to injection attacks. Ensuring high precision and recall requires an analysis that is context, field and object sensitive. However, it is challenging to attain high precision and recall and scale to large industrial code bases. Compositional style analyses in which individual software components are analyzed separately, independent from their usage contexts, compute reusable summaries of components. This is an essential feature when deploying such analyses in CI/CD at code-review time or when scanning deployed container images. In both these settings the majority of software components stay the same between subsequent scans. However, it is not obvious how to extend such analyses to check the kind of contextual taint specifications that arise in practice, while maintaining compositionality. In this work we present contextual dataflow modeling, an extension to the compositional analysis to check complex taint specifications and significantly increasing recall and precision. Furthermore, we show how such high-fidelity analysis can scale in production using three key optimizations: (i) discarding intermediate results for previously-analyzed components, an optimization exploiting the compositional nature of our analysis; (ii) a scope-reduction analysis to reduce the scope of the taint analysis w.r.t. the taint specifications being checked, and (iii) caching of analysis models. We show a 9.85% reduction in false positive rate on a comprehensive test suite comprising the OWASP open-source benchmarks as well as internal real-world code samples. We measure the performance and scalability impact of each individual optimization using open source JVM packages from the Maven central repository and internal AWS service codebases. This combination of high precision, recall, performance, and scalability has allowed us to enforce security policies at scale both internally within Amazon as well as for external customers.Keywords
This publication has 23 references indexed in Scilit:
- Graspan2017
- Heap Abstractions for Static AnalysisACM Computing Surveys, 2016
- Bottom-Up Context-Sensitive Pointer Analysis for JavaLecture Notes in Computer Science, 2015
- Moving Fast with Software Verification2015
- A Framework For Efficient Modular Heap AnalysisFoundations and Trends® in Programming Languages, 2015
- FlowDroidACM SIGPLAN Notices, 2014
- An Analysis of the Mozilla Jetpack Extension FrameworkLecture Notes in Computer Science, 2012
- Scaling Java Points-to Analysis Using Spark2003
- Precise interprocedural dataflow analysis via graph reachability1995
- Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints1977