PVS-Studio roadmap 2021
- PVS-Studio product as a whole
- Related links
Over a few meetings at the beginning of this year, our team developed an internal roadmap for 2021. The roadmap includes goals for the PVS-Studio company and product. We decided to draw some of them up for you into an article. Is the unpublished part a secret? No, but we doubt our readers want to know how and when we plan to train employees and purchase servers. What we will present here for you is how we plan to develop the PVS-Studio product and its positioning.
PVS-Studio product as a whole
PVS-Studio is a general-purpose static analyzer, and we will keep guiding its development in this direction. However, this year we will tilt our product's positioning towards the market of application security static testing tools (SAST). For this purpose, we'll focus on CWE, OWASP, SEI CERT, MISRA, and AUTOSAR support.
PVS-Studio can currently analyze programs written in C, C++, C#, and Java. It also supports some C++ language extensions, for example, C++/CLI and C++/CX. In 2021, we do not plan to implement support for new languages, but we plan to expand the analyzer. We want to support several new compilers (C, C++) for micro controllers and some development environments, such as CLion.
Aside from the upgrades we listed a little bit further in this article, this year we plan to enhance the cores of all the analyzers (C++, C #, Java). We intend to do the following:
- Support new versions of programming languages;
- Improve existing diagnostics to reduce the number of false positives;
- Implement new general purpose diagnostics (GA);
- Annotate functions in popular libraries manually to boost defect detection;
- Advance internal analyzer mechanisms, such as data flow analysis, symbolic execution, interprocedural and intermodule analysis etc.
We decided to start with listing all these points, so as not to repeat them below for each of the languages.
Note. If you are not familiar with the terms "data flow analysis" and "manual function annotations", then we recommend the following publication: "Technologies used in the PVS-Studio code analyzer for finding bugs and potential vulnerabilities".
The analyzer's new website
The analyzer's constant evolution requires the website's upgrade so that the site displays up-to-date information and provides user-friendly access to new features with documentation. At some point the product overgrows the ideology and the capabilities of the current website. We have reached this point. And in the first half of 2021 we will upgrade our website entirely - this includes changing the design and reworking how the information is presented.
News email subscription
When we were getting everything ready for the new website, we categorized and tagged our articles. This approach will let us create relevant newsletters. For example, one will be able to subscribe to release announcements, or theoretical articles, or articles about project testing.
MISRA C, MISRA C++, AUTOSAR
We will continue to support the MISRA C and MISRA C++ coding standards. However, it's time to also support a more modern set of rules described in The AUTSAR C++14 Coding Guidelines. This document is the MISRA C++:2008 standard update, and is also based on leading code standards and research papers prepared by AUTOSAR.
Intermodule data flow analysis
PVS-Studio for C# and Java is built on cores that can to some extent do intermodule analysis. Implementing intermodule analysis in the C++ analyzer is more complex, which is why we've been postponing it. Now, in 2021, we feel strong enough to introduce intermodule data flow analysis. This will make it possible to find errors similar to the following: a null pointer is passed to a function, and this function, implemented in another translation unit, dereferences this pointer without performing a preliminary check.
Just to clarify. No, we are not talking about modules from C++ 20. Module support is a different task. We'll target it as well, but maybe not this year. Here we mean analysis that takes into account the interaction of functions implemented in different *.cpp files (in different translation units).
We plan to partially support extra information extraction from code that has the Microsoft Source-Code (SAL) annotation language mark-up.
Compilers for embedded platforms
Over the past few years, PVS-Studio for C and C ++ significantly expanded support for a variety of compilers. We concentrated mainly on compilers for the ARM platform. This year we'll also focus on more exotic platforms.
We will explore the possibility to port the C++ analyzer's core to the Elbrus platform. About a year ago we considered this experiment, but the compiler for this platform falls behind the modern C++ language standard. As a rule, we use the language's latest innovations when writing the PVS-Studio analyzer, because we need to practice new C++ structures :). However, writing code in this style has a negative effect on this goal. We'll see how things are this year, but we can't promise anything.
We plan to release a plugin for the CLion development environment. It is a cross-platform IDE for C and C++ developed by JetBrains. By the way, if you want to become this plugin's beta tester, you can click this link and fill out the form. We'll contact you when we have the plugin's first implementation.
Right now, it is possible to use the PVS-Studio analyzer for C++ in Unix-like operating systems (Linux, macOS) together with most IDEs and build systems. However, integration with such cross-platform IDEs is carried out through the standard tools of the IDE itself. The analyzer report is usually displayed as compiler warnings. In general, this way of integration is quite sufficient for the job. However, it is not as good as integrating the analyzer through an extension (plugin) for an IDE, as is the case with the PVS-Studio plugin for Visual Studio. The PVS-Studio plugin for an IDE provides access to the analyzer's many additional features, such as warning suppression, convenient mark-up of false positives, and others.
Unlike Windows with its Visual Studio, Unix-like systems do not have one most common IDE. So up to this point we've been choosing not to develop a plugin for a cross-platform C++ IDE. However, now we can see a trend that CLion from JetBrains is becoming more and more popular with our users every year. And since we already support the IntelliJ IDEA and Rider environments that are "close" to CLion, we decided it's time to support CLion.
When implementing new diagnostics, we plan to focus on OWASP, and especially on OWASP Top 10. In our opinion, the static analyzer for C# will greatly benefit from an increase in the security diagnostics number.
We plan to support .NET 5 projects and .NET 5 SDK. We will also add analysis for C# 9 code.
According to the Roadmap from Microsoft, they plan to issue a new .NET version every year. This means, in 2021 we expect the new .NET 6 that we plan to support.
Familiarize old diagnostics with the new features in C# 8 and C# 9
We would like to audit old diagnostics in order to see how well they work with new features from C# 8 and C# 9. We hope to perfect some diagnostics so that they produce warnings for code that uses the most up-to-date structures. Such cases are likely to be few, but the audit will definitely be beneficial.
We intend to tag some of the existing diagnostics so that they match the OWASP classification of potential vulnerabilities. We also plan to use OWASP and OWASP Top 10 as a reference and create new diagnostics.
Visual Studio Code
This year we may produce a plugin for Visual Studio Code. It will let you comfortably view reports generated by the analyzer's console version. The PVS-Studio distribution currently includes the C and C++ Compiler Monitoring UI utility that you can use to read reports. You can also convert reports into HTML. These approaches work very well, but a Visual Studio Code plugin will make working with a report and fixing code more convenient.
When we talked above about supporting CLion, we also described a situation with a "zoo" of various IDEs for Unix-like systems. Right now, we can see a trend that Visual Studio Code, thanks to its modules and open architecture, has a chance to become the most versatile IDE for many languages, compilers and platforms. This is another reason why in the upcoming year we plan to focus on this IDE.