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/pscan-tfbs-1.2.2/pscan.cpp FINAL RESULTS: data/pscan-tfbs-1.2.2/pscan.cpp:1413:3: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(d2u.str().c_str()); data/pscan-tfbs-1.2.2/pscan.cpp:1423:3: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(str1.str().c_str()); data/pscan-tfbs-1.2.2/pscan.cpp:1442:3: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(str2.str().c_str()); data/pscan-tfbs-1.2.2/pscan.cpp:1443:3: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system("rm -f .tmp"); data/pscan-tfbs-1.2.2/pscan.cpp:52:7: [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 ALPHABET[4] = {'A','C','G','T'}; data/pscan-tfbs-1.2.2/pscan.cpp:53:7: [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 C_ALPHABET[4] = {'T','G','C','A'}; data/pscan-tfbs-1.2.2/pscan.cpp:57:1: [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. char VI['T' + 1], rc_VI['T' + 1]; data/pscan-tfbs-1.2.2/pscan.cpp:770:16: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). SPLIT[0] = atoi(argv[++i]); data/pscan-tfbs-1.2.2/pscan.cpp:771:16: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). SPLIT[1] = atoi(argv[++i]); data/pscan-tfbs-1.2.2/pscan.cpp:1426:5: [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). in.open(tmpfile_1.c_str()); data/pscan-tfbs-1.2.2/pscan.cpp:1621:8: [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). out.open("pscan.complete_matrix"); data/pscan-tfbs-1.2.2/pscan.cpp:1627:8: [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). out.open(buf.c_str()); data/pscan-tfbs-1.2.2/pscan.cpp:1681:29: [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). out.open("pscan.short_matrix"); data/pscan-tfbs-1.2.2/pscan.cpp:1694:29: [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). out.open(buf.c_str()); data/pscan-tfbs-1.2.2/pscan.cpp:5727:7: [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). fout.open("chip.fasta"); data/pscan-tfbs-1.2.2/pscan.cpp:5733:9: [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). in[a].open(chip_files.at(a).c_str()); ANALYSIS SUMMARY: Hits = 16 Lines analyzed = 6050 in approximately 0.13 seconds (45577 lines/second) Physical Source Lines of Code (SLOC) = 3611 Hits@level = [0] 0 [1] 0 [2] 12 [3] 0 [4] 4 [5] 0 Hits@level+ = [0+] 16 [1+] 16 [2+] 16 [3+] 4 [4+] 4 [5+] 0 Hits/KSLOC@level+ = [0+] 4.43091 [1+] 4.43091 [2+] 4.43091 [3+] 1.10773 [4+] 1.10773 [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.