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/thunderbolt-tools-0.9.3/common/file.cpp Examining data/thunderbolt-tools-0.9.3/common/file.h Examining data/thunderbolt-tools-0.9.3/tbtacl/write.cpp Examining data/thunderbolt-tools-0.9.3/tbtadm/main.cpp Examining data/thunderbolt-tools-0.9.3/tbtadm/controller.h Examining data/thunderbolt-tools-0.9.3/tbtadm/controller.cpp FINAL RESULTS: data/thunderbolt-tools-0.9.3/common/file.cpp:59:21: [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). : m_fd(perm ? ::open(filename, static_cast<int>(mode) | flags, perm) data/thunderbolt-tools-0.9.3/common/file.cpp:60:21: [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). : ::open(filename, static_cast<int>(mode) | flags)) data/thunderbolt-tools-0.9.3/common/file.cpp:95:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). std::string tbtadm::File::read() data/thunderbolt-tools-0.9.3/common/file.cpp:102:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). auto ret = ::read(m_fd, &c, sizeof(c)); data/thunderbolt-tools-0.9.3/common/file.h:125:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). std::string read(); data/thunderbolt-tools-0.9.3/tbtadm/controller.cpp:118:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). std::string read(const fs::path& path) data/thunderbolt-tools-0.9.3/tbtadm/controller.cpp:121:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). auto content = file.read(); data/thunderbolt-tools-0.9.3/tbtadm/controller.cpp:127:40: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return boost::algorithm::trim_copy(read(path)); data/thunderbolt-tools-0.9.3/tbtadm/controller.cpp:172:29: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). const auto uevent = read(ueventFile); data/thunderbolt-tools-0.9.3/tbtadm/controller.cpp:635:30: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (std::stoi(authorized.read())) data/thunderbolt-tools-0.9.3/tbtadm/controller.cpp:728:56: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bool authorized = std::stoi(authorizedFile.read()); ANALYSIS SUMMARY: Hits = 11 Lines analyzed = 1340 in approximately 0.07 seconds (18794 lines/second) Physical Source Lines of Code (SLOC) = 913 Hits@level = [0] 0 [1] 9 [2] 2 [3] 0 [4] 0 [5] 0 Hits@level+ = [0+] 11 [1+] 11 [2+] 2 [3+] 0 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 12.0482 [1+] 12.0482 [2+] 2.19058 [3+] 0 [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.