Description
CodeQL's ability to do numerous checks and allow people to develop their own checks makes it a wonderful tool. However, I feel that a freely available sound static analysis tool that is comparable to the commercial tools such as Astree and Polyspace Code Prover is needed to complement CodeQL. The current commercial options are:
These tools are based on the theory of abstract interpretation such that a failure of their checks to find issues in software proves the absence of those issues in the software.
As far as I know, the open source options in this area are currently:
https://github.com/NASA-SW-VnV/ikos
https://github.com/static-analysis-engineering/CodeHawk-C
https://frama-c.com/fc-plugins/eva.html
https://github.com/seahorn/crab
As far as I can tell:
- IKOS does not support concurrency and has some trouble with small integer widths when used as loop counters. It is described by a PDF presentation. Given that NASA uses it to develop aviation software, I consider it to be the most promising of all of the free sound static analysis options, but the lack of concurrency support limits its usefulness.
- CodeHawk has zero documentation describing what it can and cannot do.
- Frama-C EVA did very well in a NIST study, but it cannot handle recursion or branching as far as its documentation suggests, which makes it useless for most code.
- Crab is just a library that is made under the Theory of Abstract Interpretation and could be the starting point for an analyzer like IKOS. It is used by the Clam analyzer, but that does not claim soundness and I only listed it because it is based on Abstract Interpretation.
Microsoft and Google have concluded that 70% of security issues in C/C++ code are from memory safety issues. Sound static analyzers can give developers a way to eliminate all memory safety issues from existing C/C++ code, but they are prohibitively expensive, such that they are only used in very deep pocketed industries where software failures can be fatal. Such tools can be developed for other languages too, but at present as far as I know, production quality sound static analysis tools only exist for C/C++, which is where the greatest need is.
I know that this is asking for very much, but would GitHub either develop a sound static analysis tool comparable to Astree or acquire one, to make available to the broader community alongside CodeQL? A sound static analysis tool will always be limited in what it can check, while unsound static analysis tools such as CodeQL can check far more things, so the two would complement one another.
This is not the best forum for an issue is requesting a sister tool to CodeQL, but I do not know of a better forum for it and I am certain that posting it here will result in it getting the attention of the right people at github. I am also certain that the CodeQL developers will have their own opinions on this idea, which would be most welcome, even if those opinions are only posted internally to github such that I cannot see them.