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/supple-1.0.8/lib/supple/capi.c
Examining data/supple-1.0.8/src/wrapper.c

FINAL RESULTS:

data/supple-1.0.8/lib/supple/capi.c:209:7:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
		if (chown(tempdir, 0, 0) != 0) {
data/supple-1.0.8/lib/supple/capi.c:197:2:  [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(tempdir, TEMPDIR_NAME);
data/supple-1.0.8/lib/supple/capi.c:185:24:  [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.
#define TEMPDIR_NAME ((getenv("SUPPLE_MKDTEMP") != NULL) ? \
data/supple-1.0.8/lib/supple/capi.c:186:10:  [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.
		      (getenv("SUPPLE_MKDTEMP")) : ("/var/tmp/suppleXXXXXX"))
data/supple-1.0.8/lib/supple/capi.c:236:17:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
	if (rootly && (chroot(".") != 0)) {
data/supple-1.0.8/src/wrapper.c:33:6:  [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.
	if (getenv("LUA_INIT") != NULL) {
data/supple-1.0.8/src/wrapper.c:34:24:  [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.
		if (luaL_dostring(L, getenv("LUA_INIT")) != 0) {
data/supple-1.0.8/lib/supple/capi.c:196:31:  [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).
	tempdir = lua_newuserdata(L, strlen(TEMPDIR_NAME));

ANALYSIS SUMMARY:

Hits = 8
Lines analyzed = 572 in approximately 0.06 seconds (9624 lines/second)
Physical Source Lines of Code (SLOC) = 407
Hits@level = [0]   0 [1]   1 [2]   0 [3]   5 [4]   1 [5]   1
Hits@level+ = [0+]   8 [1+]   8 [2+]   7 [3+]   7 [4+]   2 [5+]   1
Hits/KSLOC@level+ = [0+] 19.656 [1+] 19.656 [2+] 17.199 [3+] 17.199 [4+] 4.914 [5+] 2.457
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.