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/xsp-4.2/lib/fpm_helper.c
Examining data/xsp-4.2/lib/fpm_helper.h
Examining data/xsp-4.2/shim/shim.c

FINAL RESULTS:

data/xsp-4.2/shim/shim.c:110:5:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
    chmod (path, 0660);
data/xsp-4.2/shim/shim.c:38:3:  [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 (PREFIX, getpid (), time_str ());
data/xsp-4.2/shim/shim.c:54:5:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vprintf(fmt, argptr);
data/xsp-4.2/shim/shim.c:143:9:  [4] (shell) execv:
  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.
    if (execv (*params, params) == -1) {
data/xsp-4.2/shim/shim.c:194:26:  [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 * verbose_env = getenv("VERBOSE");
data/xsp-4.2/shim/shim.c:195: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.
    char * debug_env = getenv("DEBUG");
data/xsp-4.2/shim/shim.c:26: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 time_buffer[50];
data/xsp-4.2/shim/shim.c:67: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 [size + 1];
data/xsp-4.2/shim/shim.c:157:9:  [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 [BUFFER_SIZE];
data/xsp-4.2/shim/shim.c:61:29:  [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).
    return send (fd, value, strlen (value) + 1, 0);
data/xsp-4.2/shim/shim.c:87:9:  [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 (path) >= UNIX_PATH_MAX) {
data/xsp-4.2/shim/shim.c:91:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy (local.sun_path, path, UNIX_PATH_MAX - 1);
data/xsp-4.2/shim/shim.c:98:27:  [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).
    socklen_t local_len = strlen (path) + sizeof (local.sun_family);

ANALYSIS SUMMARY:

Hits = 13
Lines analyzed = 489 in approximately 0.07 seconds (6838 lines/second)
Physical Source Lines of Code (SLOC) = 299
Hits@level = [0]   8 [1]   4 [2]   3 [3]   2 [4]   3 [5]   1
Hits@level+ = [0+]  21 [1+]  13 [2+]   9 [3+]   6 [4+]   4 [5+]   1
Hits/KSLOC@level+ = [0+] 70.2341 [1+] 43.4783 [2+] 30.1003 [3+] 20.0669 [4+] 13.3779 [5+] 3.34448
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.