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/sassc-3.6.1/sassc_version.h Examining data/sassc-3.6.1/win/posix/getopt.c Examining data/sassc-3.6.1/win/posix/getopt.h Examining data/sassc-3.6.1/sassc.c FINAL RESULTS: data/sassc-3.6.1/sassc.c:122:9: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(source_string, buffer); data/sassc-3.6.1/sassc.c:209:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(i == 0 ? ".\n" : ","); data/sassc-3.6.1/sassc.c:365:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(source_map_file, outfile); data/sassc-3.6.1/sassc.c:366:13: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(source_map_file, extension); data/sassc-3.6.1/win/posix/getopt.c:121:11: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. (void)vfprintf(stderr,fmt,ap); data/sassc-3.6.1/sassc.c:254:43: [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. sass_option_set_include_path(options, getenv("SASS_PATH")); data/sassc-3.6.1/sassc.c:275:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "vhslm::Map:t:I:P:", long_options, &long_index)) != -1) { data/sassc-3.6.1/win/posix/getopt.c:354:22: [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. posixly_correct = (getenv("POSIXLY_CORRECT") != NULL); data/sassc-3.6.1/win/posix/getopt.c:531:1: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. getopt(int nargc, char * const *nargv, const char *options) data/sassc-3.6.1/win/posix/getopt.c:551:1: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. getopt_long(int nargc, char * const *nargv, const char *options, data/sassc-3.6.1/win/posix/getopt.h:29:12: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. extern int getopt(int nargc, char * const *nargv, const char *options); data/sassc-3.6.1/win/posix/getopt.h:77:12: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. extern int getopt_long(int nargc, char * const *nargv, const char *options, data/sassc-3.6.1/sassc.c:66:24: [2] (misc) fopen: 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). FILE* fp = fopen(outfile, "wb"); data/sassc-3.6.1/sassc.c:94:5: [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 buffer[BUFSIZE]; data/sassc-3.6.1/sassc.c:326:48: [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). sass_option_set_precision(options, atoi(optarg)); // TODO: make this more robust data/sassc-3.6.1/win/posix/getopt.c:182:6: [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 **) nargv)[pos] = nargv[cstart]; data/sassc-3.6.1/win/posix/getopt.c:184:6: [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 **)nargv)[cstart] = swap; data/sassc-3.6.1/sassc.c:111:17: [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). size += strlen(buffer); data/sassc-3.6.1/sassc.c:364:45: [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). char* source_map_file = calloc(strlen(outfile) + strlen(extension) + 1, sizeof(char)); data/sassc-3.6.1/sassc.c:364:63: [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). char* source_map_file = calloc(strlen(outfile) + strlen(extension) + 1, sizeof(char)); data/sassc-3.6.1/win/posix/getopt.c:218:22: [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). current_argv_len = strlen(current_argv); data/sassc-3.6.1/win/posix/getopt.c:226:7: [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(long_options[i].name) == current_argv_len) { ANALYSIS SUMMARY: Hits = 22 Lines analyzed = 1059 in approximately 0.04 seconds (25921 lines/second) Physical Source Lines of Code (SLOC) = 770 Hits@level = [0] 36 [1] 5 [2] 5 [3] 7 [4] 5 [5] 0 Hits@level+ = [0+] 58 [1+] 22 [2+] 17 [3+] 12 [4+] 5 [5+] 0 Hits/KSLOC@level+ = [0+] 75.3247 [1+] 28.5714 [2+] 22.0779 [3+] 15.5844 [4+] 6.49351 [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.