Flawfinder version 2.0.10, (C) 2001-2019 David A. Wheeler. Number of rules (primarily dangerous function names) in C/C++ ruleset: 223 Examining data/irony-mode-1.4.0+7.g76fd37f/server/cmake/LibClangDiagnosticsChecker.cpp Examining data/irony-mode-1.4.0+7.g76fd37f/server/src/Command.cpp Examining data/irony-mode-1.4.0+7.g76fd37f/server/src/Command.h Examining data/irony-mode-1.4.0+7.g76fd37f/server/src/CompDBCache.cpp Examining data/irony-mode-1.4.0+7.g76fd37f/server/src/CompDBCache.h Examining data/irony-mode-1.4.0+7.g76fd37f/server/src/Irony.cpp Examining data/irony-mode-1.4.0+7.g76fd37f/server/src/Irony.h Examining data/irony-mode-1.4.0+7.g76fd37f/server/src/Style.h Examining data/irony-mode-1.4.0+7.g76fd37f/server/src/TUManager.cpp Examining data/irony-mode-1.4.0+7.g76fd37f/server/src/TUManager.h Examining data/irony-mode-1.4.0+7.g76fd37f/server/src/main.cpp Examining data/irony-mode-1.4.0+7.g76fd37f/server/src/support/CIndex.h Examining data/irony-mode-1.4.0+7.g76fd37f/server/src/support/CommandLineParser.cpp Examining data/irony-mode-1.4.0+7.g76fd37f/server/src/support/CommandLineParser.h Examining data/irony-mode-1.4.0+7.g76fd37f/server/src/support/NonCopyable.h Examining data/irony-mode-1.4.0+7.g76fd37f/server/src/support/TemporaryFile.cpp Examining data/irony-mode-1.4.0+7.g76fd37f/server/src/support/TemporaryFile.h Examining data/irony-mode-1.4.0+7.g76fd37f/server/src/support/iomanip_quoted.h FINAL RESULTS: data/irony-mode-1.4.0+7.g76fd37f/server/src/support/TemporaryFile.cpp:22:32: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (const char *dir = std::getenv(envVar)) data/irony-mode-1.4.0+7.g76fd37f/server/src/main.cpp:152:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). logFile.open(argv[optCount]); data/irony-mode-1.4.0+7.g76fd37f/server/src/support/TemporaryFile.cpp:68:20: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). openedFile_->open(tmpDir + pathOrPattern_, std::ios_base::out); data/irony-mode-1.4.0+7.g76fd37f/server/src/Irony.cpp:108:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ifs.read(&outBuf[0], outBuf.size()); data/irony-mode-1.4.0+7.g76fd37f/server/src/TUManager.cpp:69:13: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. !std::equal(flagsCache.begin(), flagsCache.end(), flags.begin())) { ANALYSIS SUMMARY: Hits = 5 Lines analyzed = 2251 in approximately 0.09 seconds (24592 lines/second) Physical Source Lines of Code (SLOC) = 1418 Hits@level = [0] 3 [1] 2 [2] 2 [3] 1 [4] 0 [5] 0 Hits@level+ = [0+] 8 [1+] 5 [2+] 3 [3+] 1 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 5.64175 [1+] 3.52609 [2+] 2.11566 [3+] 0.705219 [4+] 0 [5+] 0 Dot directories skipped = 1 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.