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/python-bcrypt-3.1.7/src/_csrc/bcrypt.c Examining data/python-bcrypt-3.1.7/src/_csrc/bcrypt_pbkdf.c Examining data/python-bcrypt-3.1.7/src/_csrc/blf.c Examining data/python-bcrypt-3.1.7/src/_csrc/blf.h Examining data/python-bcrypt-3.1.7/src/_csrc/pycabcrypt.h Examining data/python-bcrypt-3.1.7/src/_csrc/sha2.c Examining data/python-bcrypt-3.1.7/src/_csrc/sha2.h Examining data/python-bcrypt-3.1.7/src/_csrc/timingsafe_bcmp.c Examining data/python-bcrypt-3.1.7/src/_csrc/portable_endian.h FINAL RESULTS: data/python-bcrypt-3.1.7/src/_csrc/pycabcrypt.h:18:9: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define snprintf _snprintf data/python-bcrypt-3.1.7/src/_csrc/pycabcrypt.h:18:18: [4] (format) _snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define snprintf _snprintf data/python-bcrypt-3.1.7/src/_csrc/sha2.c:226:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(context->state.st32, sha256_initial_hash_value, data/python-bcrypt-3.1.7/src/_csrc/sha2.c:409:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&context->buffer[usedspace], data, freespace); data/python-bcrypt-3.1.7/src/_csrc/sha2.c:416:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&context->buffer[usedspace], data, len); data/python-bcrypt-3.1.7/src/_csrc/sha2.c:432:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(context->buffer, data, len); data/python-bcrypt-3.1.7/src/_csrc/sha2.c:487:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(digest, context->state.st32, SHA256_DIGEST_LENGTH); data/python-bcrypt-3.1.7/src/_csrc/sha2.c:498:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(context->state.st64, sha512_initial_hash_value, data/python-bcrypt-3.1.7/src/_csrc/sha2.c:685:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&context->buffer[usedspace], data, freespace); data/python-bcrypt-3.1.7/src/_csrc/sha2.c:692:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&context->buffer[usedspace], data, len); data/python-bcrypt-3.1.7/src/_csrc/sha2.c:708:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(context->buffer, data, len); data/python-bcrypt-3.1.7/src/_csrc/sha2.c:772:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(digest, context->state.st64, SHA512_DIGEST_LENGTH); data/python-bcrypt-3.1.7/src/_csrc/sha2.c:783:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(context->state.st64, sha384_initial_hash_value, data/python-bcrypt-3.1.7/src/_csrc/sha2.c:809:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(digest, context->state.st64, SHA384_DIGEST_LENGTH); data/python-bcrypt-3.1.7/src/_csrc/bcrypt.c:91:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). key_len = (u_int8_t)(strlen(key) + 1); data/python-bcrypt-3.1.7/src/_csrc/bcrypt.c:98:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). key_len = strlen(key); data/python-bcrypt-3.1.7/src/_csrc/bcrypt.c:124:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(salt) * 3 / 4 < BCRYPT_MAXSALT) ANALYSIS SUMMARY: Hits = 17 Lines analyzed = 2365 in approximately 0.10 seconds (22917 lines/second) Physical Source Lines of Code (SLOC) = 1674 Hits@level = [0] 1 [1] 3 [2] 12 [3] 0 [4] 2 [5] 0 Hits@level+ = [0+] 18 [1+] 17 [2+] 14 [3+] 2 [4+] 2 [5+] 0 Hits/KSLOC@level+ = [0+] 10.7527 [1+] 10.1553 [2+] 8.3632 [3+] 1.19474 [4+] 1.19474 [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.