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/r-cran-progress-1.2.2/inst/include/RProgress.h Examining data/r-cran-progress-1.2.2/tests/testthat/progresstest/src/RcppExports.cpp Examining data/r-cran-progress-1.2.2/tests/testthat/progresstest/src/test.cpp FINAL RESULTS: data/r-cran-progress-1.2.2/inst/include/RProgress.h:290:20: [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. char *v = std::getenv("RSTUDIO"); data/r-cran-progress-1.2.2/inst/include/RProgress.h:297:20: [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. char *v = std::getenv("R_GUI_APP_VERSION"); data/r-cran-progress-1.2.2/inst/include/RProgress.h:259:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char symbols[4] = {'-', '\\', '|', '/'}; data/r-cran-progress-1.2.2/tests/testthat/progresstest/src/test.cpp:16:5: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep( (useconds_t) (2.0 / 100 * 1000000)); ANALYSIS SUMMARY: Hits = 4 Lines analyzed = 554 in approximately 0.02 seconds (25007 lines/second) Physical Source Lines of Code (SLOC) = 407 Hits@level = [0] 0 [1] 1 [2] 1 [3] 2 [4] 0 [5] 0 Hits@level+ = [0+] 4 [1+] 4 [2+] 3 [3+] 2 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 9.82801 [1+] 9.82801 [2+] 7.37101 [3+] 4.914 [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.