From Ahead-of- to Just-in-Time and Back Again: Static Analysis for Unix Shell Programs
Lukas Lazarek, Seong-Heon Jung, Evangelos Lamprou, ZhuoHan Li, Anirudh Narsipur, Eric Zhao, Michael Greenberg, Κωνσταντίνος Καλλάς, Konstantinos Mamouras, Nikos Vasilakis · 2025
Shell programming is as prevalent as ever. It is also quite complex, due to the structure of shell programs, their use of opaque software components, and their complex interactions with the broader environment. As a result, even when exercising an abundance of care, shell developers discover devastating bugs in their programs only at runtime: at best, shell programs going wrong crash the execution of a long-running task; at worst, they silently corrupt the broader environment in which they execute---affecting user data, modifying system files, and rendering entire systems unusable. Could the shell's users enjoy the benefits of semantics-driven static analysis before their programs' execution---as offered by most other production languages?